OrderPaid.VendorNotification

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi, I'm using version 4.2

Right now, the email sends them the order  (the products ordered) with the retail pricing and SKU like this:

Name           Price     Quantity          Total
Item Name   $24.95         1                 $24.95
SKU: 5678

Since the items ordered are drop shipped, I would prefer to not have the pricing or totals shown.  Also, I would like the  MPN (manufacturers part number) rather than our SKU.  So, I would like to change it to show no pricing, just the Item Name, Quantity and then the MPN (manufacturers part number) :

Name              Quantity          MPN
Item Name            1          1234


Is that possible?  

Thank in advance!
4 years ago
Yes, At most of the case you can go to /Admin/MessageTemplate/List page and customize the message template with the appropriate message and message tokens( tokens are enclosed by the % symbol).
In your case, the entire order items table in the message template comes from the %Order.Product(s)% token.
So you can customize the token you want by customizing the ProductListToHtmlTable() method in the MessageTokenProvider class. Remove the lines where price and total are appended.

Note: The ProductListToHtmlTable() method is used by other message templates too so make sure the functionality is still intact for other message templates. I would suggest to change the method signature and add an optional parameter named bool includeProductPrice=true and change the call stack accordingly when the OrderPaid.VendorNotification message template is invoked and if the condition is false then only hide those prices value.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.