Question

  • I am trying to hide / remove prices from within magento transactional emails.

    • I have been able to hide the prices from the everywhere else in the
      cart via css but not the emails.

    • I have tried commenting out the code that renders the price but it
      seems mag needs this code to send the emails.

Any help would be appreciated.

Thanks

Était-ce utile?

La solution

The default .phtml files for the order emails that display prices are saved in

app/design/frontend/default/base/template/email/order/items/

and

app/design/adminhtml/default/default/template/email/order/items.phtml    

To remove prices from these emails, look through them for references to the function formatPrice and remove the surrounding HTML. If you remove the entire "Subtotal" <td>, then you'll want to also remove the "Subtotal" heading <th> from

app/design/frontend/default/base/template/email/order/items.phtml

Ideally you should avoid modifying the original files and would instead copy the files to your own theme folder and make your changes to the copy.

Autres conseils

Not a good idea, this might take out all the information below the product rows plus you may find any products other than the first one missing.

If you just want to hide the totals, edit your local.xml file by adding this:

<sales_email_order_items>
<remove name="order_totals" />
</sales_email_order_items>

This will remove the information from your order emails and leave the info there for invoices etc.

OR if using 1.9 then probably best to edit etc/theme.xml but I am not sure what you would need to do there.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top