Variant code vs. product code

  • Posts: 10
  • Thank you received: 0
11 years 9 months ago #124297

-- url of the page with the problem -- : www.fakur-design.dk
-- HikaShop version -- : business
-- Joomla version -- : 2,5,14
-- PHP version -- : x.x.x

I seriously need help. I want my product code to be displayed on my webpage and also on the order-confirmation email,
so therefore I have activated "show code" in my configuration.
But instead of displaying the product code, it displays the code of a variant?!

Example: www.fakur-design.dk/en/for-horses/trense...with-swarovskistones

What can I do?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #124350

Hi,

For the webpage, you have to replace the code:

echo $this->element->product_code;
By:
echo $this->element->main->product_code;
in the view "product / show_default" via the menu Display > Views.

In the email the parent product code is not loaded, you will have to add some code to get it.
You have the product_id in the variable $item->product_id, so with the product id, get the parent product id, and with the parent_product_id get the main product_code.

It require php kowledge.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum