Skip to main content

Adding parent product name to order emails

11 years 4 months ago #207682 by iedwards
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1

The actual physical products in my shop are all variants, throughout the shop they have an sku but use the parent product name, I have done this with template over rides.

I now need the parent product name to appear on emails in place of the variant product name.

Could you talk me through how I would find and add the parent product name to the order emails please? I gather I need to generate a variable in the Preload section of the email but I'm not sure of the actual code I would need to do that.

Many thanks,

Ian

Please Log in or Create an account to join the conversation.

11 years 4 months ago #207732 by Mohamed Thelji
Hello,
You'll just have to load the product name of the product which have the ID : $product->product_parent_id
just after that line through your email preload file :
Code:
foreach($data->cart->products as $item) { if($group && $item->order_product_option_parent_id) continue; $product = @$productClass->all_products[$item->product_id];
The following user(s) said Thank You: iedwards

Please Log in or Create an account to join the conversation.

Time to create page: 0.043 seconds
Powered by Kunena Forum