Adding parent product name to order emails
11 years 4 months ago #207682
by iedwards
Adding parent product name to order emails was created 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
-- 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.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 4 months ago #207732
by Mohamed Thelji
Replied by Mohamed Thelji on topic Adding parent product name to order emails
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 :
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