Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
2b1eb8ee
Commit
2b1eb8ee
authored
Mar 15, 2023
by
wd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://47.99.244.21:9999/root/joshine
into developer
parents
aa14c0e4
94b125f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
180 additions
and
0 deletions
+180
-0
app/design/frontend/Joshine/breeze/Magento_Sales/templates/order/items.phtml
+92
-0
app/design/frontend/Joshine/breeze/Magento_Sales/templates/order/items/renderer/default.phtml
+88
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Sales/templates/order/items.phtml
0 → 100644
View file @
2b1eb8ee
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate
/** @var \Magento\Sales\Block\Order\Items $block */
?>
<div
class=
"table-wrapper order-items"
>
<table
class=
"data table table-order-items"
id=
"my-orders-table"
summary=
"
<?=
$block
->
escapeHtml
(
__
(
'Items Ordered'
))
?>
"
>
<caption
class=
"table-caption"
>
<?=
$block
->
escapeHtml
(
__
(
'Items Ordered'
))
?>
</caption>
<thead>
<?php
if
(
$block
->
isPagerDisplayed
())
:
?>
<tr>
<td
colspan=
"5"
data-block=
"order-items-pager-top"
class=
"order-pager-wrapper order-pager-wrapper-top"
>
<?=
$block
->
getPagerHtml
()
?>
</td>
</tr>
<?php
endif
?>
<tr>
<th
class=
"col name"
>
<?=
$block
->
escapeHtml
(
__
(
'Product Name'
))
?>
</th>
<th
class=
"col thumb"
>
<?=
$block
->
escapeHtml
(
__
(
'Product Thumb'
))
?>
</th>
<th
class=
"col sku"
>
<?=
$block
->
escapeHtml
(
__
(
'SKU'
))
?>
</th>
<th
class=
"col price"
>
<?=
$block
->
escapeHtml
(
__
(
'Price'
))
?>
</th>
<th
class=
"col qty"
>
<?=
$block
->
escapeHtml
(
__
(
'Qty'
))
?>
</th>
<th
class=
"col subtotal"
>
<?=
$block
->
escapeHtml
(
__
(
'Subtotal'
))
?>
</th>
</tr>
</thead>
<?php
$items
=
$block
->
getItems
();
?>
<?php
$giftMessage
=
''
?>
<?php
foreach
(
$items
as
$item
)
:
if
(
$item
->
getParentItem
())
:
continue
;
endif
;
?>
<tbody>
<?=
$block
->
getItemHtml
(
$item
)
?>
<?php
if
(
$this
->
helper
(
\Magento\GiftMessage\Helper\Message
::
class
)
->
isMessagesAllowed
(
'order_item'
,
$item
)
&&
$item
->
getGiftMessageId
())
:
?>
<?php
$giftMessage
=
$this
->
helper
(
\Magento\GiftMessage\Helper\Message
::
class
)
->
getGiftMessageForEntity
(
$item
);
?>
<tr>
<td
class=
"col options"
colspan=
"5"
>
<a
href=
"#"
id=
"order-item-gift-message-link-
<?=
(
int
)
$item
->
getId
()
?>
"
class=
"action show"
aria-controls=
"order-item-gift-message-
<?=
(
int
)
$item
->
getId
()
?>
"
data-item-id=
"
<?=
(
int
)
$item
->
getId
()
?>
"
>
<?=
$block
->
escapeHtml
(
__
(
'Gift Message'
))
?>
</a>
<?php
$giftMessage
=
$this
->
helper
(
\Magento\GiftMessage\Helper\Message
::
class
)
->
getGiftMessageForEntity
(
$item
);
?>
<div
class=
"order-gift-message"
id=
"order-item-gift-message-
<?=
(
int
)
$item
->
getId
()
?>
"
role=
"region"
aria-expanded=
"false"
tabindex=
"-1"
>
<a
href=
"#"
title=
"
<?=
$block
->
escapeHtml
(
__
(
'Close'
))
?>
"
aria-controls=
"order-item-gift-message-
<?=
(
int
)
$item
->
getId
()
?>
"
data-item-id=
"
<?=
(
int
)
$item
->
getId
()
?>
"
class=
"action close"
>
<?=
$block
->
escapeHtml
(
__
(
'Close'
))
?>
</a>
<dl
class=
"item-options"
>
<dt
class=
"item-sender"
><strong
class=
"label"
>
<?=
$block
->
escapeHtml
(
__
(
'From'
))
?>
</strong>
<?=
$block
->
escapeHtml
(
$giftMessage
->
getSender
())
?>
</dt>
<dt
class=
"item-recipient"
><strong
class=
"label"
>
<?=
$block
->
escapeHtml
(
__
(
'To'
))
?>
</strong>
<?=
$block
->
escapeHtml
(
$giftMessage
->
getRecipient
())
?>
</dt>
<dd
class=
"item-message"
>
<?=
/* @noEscape */
$this
->
helper
(
\Magento\GiftMessage\Helper\Message
::
class
)
->
getEscapedGiftMessage
(
$item
)
?>
</dd>
</dl>
</div>
</td>
</tr>
<?php
endif
?>
</tbody>
<?php
endforeach
;
?>
<tfoot>
<?php
if
(
$block
->
isPagerDisplayed
())
:
?>
<tr>
<td
colspan=
"5"
data-block=
"order-items-pager-bottom"
class=
"order-pager-wrapper order-pager-wrapper-bottom"
>
<?=
$block
->
getPagerHtml
()
?>
</td>
</tr>
<?php
endif
?>
<?=
$block
->
getChildHtml
(
'order_totals'
)
?>
</tfoot>
</table>
</div>
<?php
if
(
$giftMessage
)
:
?>
<script
type=
"text/x-magento-init"
>
{
"a.action.show, a.action.close"
:
{
"giftMessage"
:
{}
}
}
</script>
<?php
endif
;
?>
app/design/frontend/Joshine/breeze/Magento_Sales/templates/order/items/renderer/default.phtml
0 → 100644
View file @
2b1eb8ee
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
$objectManager
=
\Magento\Framework\App\ObjectManager
::
getInstance
();
$pr
=
$objectManager
->
create
(
'Magento\Catalog\Model\ProductRepository'
);
$imageHelper
=
$objectManager
->
get
(
'Magento\Catalog\Helper\Image'
);
/** @var $block \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer */
$_item
=
$block
->
getItem
();
$product
=
$pr
->
getById
((
int
)
$_item
->
getProductId
());
$productImage
=
$imageHelper
->
init
(
$product
,
'category_page_list'
)
->
getUrl
();
?>
<tr
id=
"order-item-row-
<?=
(
int
)
$_item
->
getId
()
?>
"
>
<td
class=
"col name"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Product Name'
))
?>
"
>
<strong
class=
"product name product-item-name"
>
<?=
$block
->
escapeHtml
(
$_item
->
getName
())
?>
</strong>
<?php
if
(
$_options
=
$block
->
getItemOptions
())
:
?>
<dl
class=
"item-options"
>
<?php
foreach
(
$_options
as
$_option
)
:
?>
<dt>
<?=
$block
->
escapeHtml
(
$_option
[
'label'
])
?>
</dt>
<?php
if
(
!
$block
->
getPrintStatus
())
:
?>
<?php
$_formatedOptionValue
=
$block
->
getFormatedOptionValue
(
$_option
)
?>
<dd
<?=
(
isset
(
$_formatedOptionValue
[
'full_view'
])
?
' class="tooltip wrapper"'
:
''
)
?>
>
<?=
$block
->
escapeHtml
(
$_formatedOptionValue
[
'value'
],
[
'a'
])
?>
<?php
if
(
isset
(
$_formatedOptionValue
[
'full_view'
]))
:
?>
<div
class=
"tooltip content"
>
<dl
class=
"item options"
>
<dt>
<?=
$block
->
escapeHtml
(
$_option
[
'label'
])
?>
</dt>
<dd>
<?=
$block
->
escapeHtml
(
$_formatedOptionValue
[
'full_view'
])
?>
</dd>
</dl>
</div>
<?php
endif
;
?>
</dd>
<?php
else
:
?>
<?php
$optionValue
=
isset
(
$_option
[
'print_value'
])
?
$_option
[
'print_value'
]
:
$_option
[
'value'
]
?>
<dd>
<?=
$block
->
escapeHtml
(
$optionValue
)
?>
</dd>
<?php
endif
;
?>
<?php
endforeach
;
?>
</dl>
<?php
endif
;
?>
<?php
$addtInfoBlock
=
$block
->
getProductAdditionalInformationBlock
();
?>
<?php
if
(
$addtInfoBlock
)
:
?>
<?=
$addtInfoBlock
->
setItem
(
$_item
)
->
toHtml
()
?>
<?php
endif
;
?>
<?=
$block
->
escapeHtml
(
$_item
->
getDescription
())
?>
</td>
<td
class=
"col thumb"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'thumb'
))
?>
"
>
<img
style=
"width: 5em"
src=
"
<?php
echo
$productImage
;
?>
"
loading=
"lazy"
/></img>
</td>
<td
class=
"col sku"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'SKU'
))
?>
"
>
<?=
/* @noEscape */
$block
->
prepareSku
(
$block
->
getSku
())
?>
</td>
<td
class=
"col price"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Price'
))
?>
"
>
<?=
$block
->
getItemPriceHtml
()
?>
</td>
<td
class=
"col qty"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Qty'
))
?>
"
>
<ul
class=
"items-qty"
>
<?php
if
(
$block
->
getItem
()
->
getQtyOrdered
()
>
0
)
:
?>
<li
class=
"item"
>
<span
class=
"title"
>
<?=
$block
->
escapeHtml
(
__
(
'Ordered'
))
?>
</span>
<span
class=
"content"
>
<?=
(
float
)
$block
->
getItem
()
->
getQtyOrdered
()
?>
</span>
</li>
<?php
endif
;
?>
<?php
if
(
$block
->
getItem
()
->
getQtyShipped
()
>
0
)
:
?>
<li
class=
"item"
>
<span
class=
"title"
>
<?=
$block
->
escapeHtml
(
__
(
'Shipped'
))
?>
</span>
<span
class=
"content"
>
<?=
(
float
)
$block
->
getItem
()
->
getQtyShipped
()
?>
</span>
</li>
<?php
endif
;
?>
<?php
if
(
$block
->
getItem
()
->
getQtyCanceled
()
>
0
)
:
?>
<li
class=
"item"
>
<span
class=
"title"
>
<?=
$block
->
escapeHtml
(
__
(
'Canceled'
))
?>
</span>
<span
class=
"content"
>
<?=
(
float
)
$block
->
getItem
()
->
getQtyCanceled
()
?>
</span>
</li>
<?php
endif
;
?>
<?php
if
(
$block
->
getItem
()
->
getQtyRefunded
()
>
0
)
:
?>
<li
class=
"item"
>
<span
class=
"title"
>
<?=
$block
->
escapeHtml
(
__
(
'Refunded'
))
?>
</span>
<span
class=
"content"
>
<?=
(
float
)
$block
->
getItem
()
->
getQtyRefunded
()
?>
</span>
</li>
<?php
endif
;
?>
</ul>
</td>
<td
class=
"col subtotal"
data-th=
"
<?=
$block
->
escapeHtml
(
__
(
'Subtotal'
))
?>
"
>
<?=
$block
->
getItemRowTotalHtml
()
?>
</td>
</tr>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment