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
8a11492c
Commit
8a11492c
authored
Jun 09, 2023
by
liumengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮件详情增加产品图片功能
parent
f7b7e7ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
app/design/frontend/Joshine/breeze/Magento_Sales/templates/email/items/order/default.phtml
+75
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Sales/templates/email/items/order/default.phtml
0 → 100644
View file @
8a11492c
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate
// phpcs:disable Magento2.Files.LineLength, Generic.Files.LineLength
/** @var $block \Magento\Sales\Block\Order\Email\Items\DefaultItems */
/** @var $_item \Magento\Sales\Model\Order\Item */
/** @var \Magento\Framework\Escaper $escaper */
$_item
=
$block
->
getItem
();
$_order
=
$_item
->
getOrder
();
$width
=
120
;
$height
=
150
;
$_imagehelper
=
$this
->
helper
(
'Magento\Catalog\Helper\Image'
);
if
(
$childProd
=
current
(
$_item
->
getChildrenItems
())){
$productImage
=
$_imagehelper
->
init
(
$childProd
->
getProduct
(),
'category_page_list'
,
array
(
'height'
=>
$height
,
'width'
=>
$width
))
->
getUrl
();
}
else
{
$productImage
=
$_imagehelper
->
init
(
$_item
->
getProduct
(),
'category_page_list'
,
array
(
'height'
=>
$height
,
'width'
=>
$width
))
->
getUrl
();
}
?>
<tr>
<td
class=
"item-info
<?=
(
$block
->
getItemOptions
()
?
' has-extra'
:
''
)
?>
"
>
<div
style=
"width:100%"
>
<div
style=
"width:30%;float:left;"
>
<p
class=
"sku"
><img
src=
"
<?=
$productImage
?>
"
title=
"
<?=
$block
->
escapeHtml
(
$_item
->
getName
())
?>
"
alt=
"
<?=
$block
->
escapeHtml
(
$_item
->
getName
())
?>
"
/></p>
</div>
<div
style=
"width:70%;float:left;"
>
<p
class=
"product-name"
>
<?=
$escaper
->
escapeHtml
(
$_item
->
getName
())
?>
</p>
<p
class=
"sku"
>
<?=
$escaper
->
escapeHtml
(
__
(
'SKU'
))
?>
:
<?=
$escaper
->
escapeHtml
(
$block
->
getSku
(
$_item
))
?>
</p>
<?php
if
(
$block
->
getItemOptions
())
:
?>
<dl
class=
"item-options"
>
<?php
foreach
(
$block
->
getItemOptions
()
as
$option
)
:
?>
<dt><strong><em>
<?=
$escaper
->
escapeHtml
(
$option
[
'label'
])
?>
</em>
:
</strong>
<?=
/* @noEscape */
nl2br
(
$option
[
'value'
])
?>
</dt>
<?php
endforeach
;
?>
</dl>
<?php
endif
;
?>
<?php
$addInfoBlock
=
$block
->
getProductAdditionalInformationBlock
();
?>
<?php
if
(
$addInfoBlock
)
:?>
<?=
$addInfoBlock
->
setItem
(
$_item
)
->
toHtml
()
?>
<?php
endif
;
?>
<?=
$escaper
->
escapeHtml
(
$_item
->
getDescription
())
?>
</div>
</div>
</td>
<td
class=
"item-qty"
>
<?=
(
float
)
$_item
->
getQtyOrdered
()
?>
</td>
<td
class=
"item-price"
>
<?=
/* @noEscape */
$block
->
getItemPrice
(
$_item
)
?>
</td>
</tr>
<?php
if
(
$_item
->
getGiftMessageId
()
&&
$_giftMessage
=
$this
->
helper
(
\Magento\GiftMessage\Helper\Message
::
class
)
->
getGiftMessage
(
$_item
->
getGiftMessageId
())
)
:
?>
<tr>
<td
colspan=
"3"
class=
"item-extra"
>
<table
class=
"message-gift"
>
<tr>
<td>
<h3>
<?=
$escaper
->
escapeHtml
(
__
(
'Gift Message'
))
?>
</h3>
<strong>
<?=
$escaper
->
escapeHtml
(
__
(
'From:'
))
?>
</strong>
<?=
$escaper
->
escapeHtml
(
$_giftMessage
->
getSender
())
?>
<br
/><strong>
<?=
$escaper
->
escapeHtml
(
__
(
'To:'
))
?>
</strong>
<?=
$escaper
->
escapeHtml
(
$_giftMessage
->
getRecipient
())
?>
<br
/><strong>
<?=
$escaper
->
escapeHtml
(
__
(
'Message:'
))
?>
</strong>
<br
/>
<?=
$escaper
->
escapeHtml
(
$_giftMessage
->
getMessage
())
?>
</td>
</tr>
</table>
</td>
</tr>
<?php
endif
;
?>
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