Product code

  • Posts: 18
  • Thank you received: 0
  • Hikashop Business
11 years 11 months ago #118412

Hi,
I am having issues displaying the product code in the front end.
I have tried to follow the instructions in this post www.hikashop.com/forum/2-general-talk-ab...ct-code-display.html

I have made the code changes but the issue is where do I do this? 'Please make sure that the "show product code" option of the configuration is turned on.'

Many Thanks,
Luke

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

  • Posts: 84079
  • Thank you received: 13634
  • MODERATOR
11 years 11 months ago #118453

Hi,

The "Display product code" option is in the Display tab of the configuration as you can see here:
www.hikashop.com/support/documentation/5...tml#display_products
Just turn it on and you will see the product code.

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

  • Posts: 18
  • Thank you received: 0
  • Hikashop Business
11 years 10 months ago #120729

Hi,
I have just done this.
This only shows the product code on the category pages for the products.
How do i set the product code to show on the actual product pages.

Luke

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

  • Posts: 84079
  • Thank you received: 13634
  • MODERATOR
11 years 10 months ago #120732

It will also display it on the product page unless you have an old HikaShop version CSS where there is a display:none on the product code.
Can you give a link to the product page ?

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

  • Posts: 18
  • Thank you received: 0
  • Hikashop Business
11 years 10 months ago #120739

The product code shows here in the category listing- robsport.co.uk/index.php/ct-menu-item-9/...1/category/44-badges

and not here in product listing- robsport.co.uk/index.php/ct-menu-item-9/...-litre-badge-on-wing

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

  • Posts: 84079
  • Thank you received: 13634
  • MODERATOR
11 years 10 months ago #120741

I can see it on both links.

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

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

I have the same problem, I can not see my product code properly on the actual product page.. only in the listing.
Instead of only showing the code it shows the product title twice with an underscore and then the code next to it??
like this : Rideskoletøjlen"
_Rideskoletojlen__200

It's supposed to be only the number and not the title twice.

Link to my page: www.fakur-design.dk/da/til-hesten/tojler.../846-rideskoletojlen

Can I change this somewhere?

Thanx
Heidi

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

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

Hi,

"_Rideskoletojlen__200" is your product code, it is generated by default with the name of the product if you don't set manually a product code.

The product code value can be changed in the product edition page under the description area.

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

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

Hi

No, my product code is not Rideskoletøjlen... I have a number om each product and this product has a code called 524, I have manually changed my product codes on all products.
All my products have different characteristics (sizes, colours etc) and I can see that Hikashop is looking at the code from the different Varints.

How can I avoid that it takes/shows the code from the variants and not the product?

The code on the Variants is generated by default, and if i try to change it with the proper code number (in this case 524) I get an errormessage that says I'm not allowed to type that number beacause a product already exsists with that code???
I'm really confused. A variant and a product is not the same thing but still they are not allowed to have similar product codes. How do I solve the problem then??
Hope you understand what I'm referring to.

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

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

To display the product code even if it's a variant on the product page, you have to edit the view "product / show_default" via the menu Display > Views and replace the line:

echo $this->element->product_code;
By:
echo $this->element->main->product_code;

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

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

Thanks, but you don't understand my problem. :S

I DON'T want the code from the Variant to be displayed.
On my page the Variant code i displayed instead of the real product code. that's the problem.

Hope you understand by looking at this link.. look at the title - it is displayed 2 times because the product code from the variant is interferring:
www.fakur-design.dk/da/til-hesten/trense...lm-engelsk-naeseband

I want the product code(which in this case is nr. 220) to be displayed, not the variant code.

Hope u can help me

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

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

Have you tried the code previously given ?

It should display the main product code on the product page even if it's a variant which is selected.

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

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

Yes I have replaced the line as you advised, but it makes no difference.

see. www.fakur-design.dk/da/til-hesten/trense...-med-3-swarovskisten

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

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

Please someone help me

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

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

There is the view "product / show" to edit too, in this file replace

<?php echo $variant->product_code;?>
By:
<?php echo $this->element->main->product_code;?>

You can too replace:
<?php echo $variant->product_name;?>
By:
<?php echo $this->element->main->product_name;?>
To keep the same product name.

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

Time to create page: 0.097 seconds
Powered by Kunena Forum