1

i was wondering how i can have in confirmation email the single item price

like in the image

enter image description here

1
  • Did you ever find a solution? None of the answers here work for me to get the unit price in file app/design/frontend/PACKAGE/THEME/Magento_Sales/templates/email/item/invoice/default.phtml – Webninja Oct 1 '20 at 14:58
1

You need to copy the following file to your theme folder like below:

/vendor/magento/module-sales/view/frontend/templates/order/items.phtml

to

/app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Sales/templates/order/items.phtml

Now add one more th to thead with your required heading name.

Again copy the following file to your theme folder like below:

/vendor/magento/module-sales/view/frontend/templates/order/items/renderer/default.phtml

to

/app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Sales/templates/order/items/renderer/default.phtml

Here you can one td with the same position as th for heading. You will get the unit price by $_item->getPrice(). Now you need to format this value with currency symbol.

Hope this helps!

0

You need to edit / override following 2 files, if you want to show in sales order emails.

  1. app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Sales/templates/email/items.phtml

  2. app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Sales/templates/email/items/order/default.phtml

-1
<?=  $_order->formatPrice($_item->getPrice()) ?>
1
  • Please add some more details about it. – Msquare May 1 '20 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.