0

Recently we removed the manufacturer of our products from the product name, and instead now use the manufacturer attribute in Magento. I've managed to add the manufacturer to the product name when it's in the cart and throughout the checkout process without too much of an issue.

However, the manufacturer doesn't display on the invoices we send out, or the confirmation email the customer receives. This is causing problems as some products share the same name but they're by different manufacturers. Plus it doesn't look great for the customer to not have this bit of information on the email when it's displayed throughout the checkout process.

What can I do to add the manufacturer to the product name in the sales emails?

EDIT: Just something to explain what I mean with an example.

Let's say this store sells the Apple iPhone 7S. Up until recently, the manufacturer of the product (Apple in this case) was included with the product name. Now though we've removed it from the product name and instead include it as the manufacturer. So now the product name is iPhone 7s, and we add the manufacturer from the attribute.

Throughout the checkout flow, normally Magento won't display the manufacturer in the cart or anywhere else. I got round that by adding it in. However, that same technique I used doesn't work when sending invoice emails. So instead of our customers receiving Apple iPhone 7S they just have iPhone 7S written on their invoice without a mention of the manufacturer.

1

question is a bit vague but i'll have a stab.

In the following directory you will find all of the item templates for each sales email type :

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

Copy these templates into your custom theme

You can do the below logic in the template but i'd personally extend the block class

$productId = $_item->getProductId();
$product = Mage::getModel('catalog/product')->load($productId);
$manufacturer = $product->getAttributeText('manufacturer');

Then echo it out wherever you want it.

  • This worked. However the line $manufacturer = $product->getManufacturer(); gave the actual ID of the manufacturer, not the name. I used $product->getAttributeText('manufacturer') instead and this gave the manufacturer name that I needed. If you update your answer with this I'll make it as accepted. Thanks for your help! – mickburkejnr Jan 2 '18 at 16:47

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.