Adding parent product name to order emails

  • Posts: 250
  • Thank you received: 7
8 years 9 months ago #207682

-- 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.

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #207732

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 :

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.056 seconds
Powered by Kunena Forum