Cant modify sales_email_order_items

Jo Le picture Jo Le · Aug 5, 2014 · Viewed 7.8k times · Source

We are using HTML tags in our options on products. The problem is, that the HTML is shown in the order confirmation email.

where can I find the PHTML file to change the option items?

    app\design\frontend\our-template\default\layout\sales.xml

    app\design\frontend\our-template\default\template\sales\order\items.phtml

I thought this would be the right files but nothing changes.

Answer

Marius picture Marius · Aug 6, 2014

The template sales\order\items.phtml renders everything around the order items.
As you can see inside it there is this line <?php echo $this->getItemHtml($_item) ?>. That one renders the item row itself.
And the template for each item depends on the product type.
These are the templates used:

  • email/order/items/order/default.phtml - for simple, configurable and virtual products (grouped products are rendered as simple products).
  • bundle/email/order/items/order/default.phtml - for bundle items.
  • downloadable/email/order/items/order/downloadable.phtml - for downloadable items.

If you want to change the way the items look in invoices shipments and creditmemos you will find the templates in the same place. Just replace the folder order with the entity type (invoice, shipment, creditmemo).