Skip to main content

Parent Product Name in email order create

More
8 years 7 months ago #287566 by eggdesign
-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.5

Hi Guys I am creating an email override for the Order Create and I would like to echo the parent product name on the email order as well as the existing $item->order_product_name;

I had a look at $item and I can't see information about the parent element.

How would I go about that?

Changing templaes via hikashop > System > Emails.

Thanks

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

More
8 years 7 months ago #287572 by nicolas
Hi,

The information is not loaded.
You need to use the $item->product_id to load the data of the product from hikashop_product with a MySQL query.
Then, run a second MySQL query on hikashop_product using this time the product_parent_id of the result of the first query.
The product name of the parent will then be in the result of the second query in product_name

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

Time to create page: 0.175 seconds
Powered by Kunena Forum