[Skip to main content](#vessel-content)

#   Display of product name and variant

##

- **[Kes](/forum/user/20105-kes "View Kes's Profile")**
- [![Kes's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-05-23.gif)](/forum/user/20105-kes "View Kes's Profile") Topic Author
- [ Offline](/forum/user/20105-kes)

Less More

- Posts: 26
- Thank you received: 0
-
-
-
-

13 years 4 months ago [\#109856](#109856) by [Kes](/forum/user/20105-kes "View Kes's Profile")  *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109856 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")* was created by *[Kes](/forum/user/20105-kes "View Kes's Profile")*

Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:

Birthday Girls - July/Cornelian AM825_4_copy14540

These long product codes also show up in the shopping cart.

Can I control the display so that the customer only sees the basic product code, AM825 in the above case.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 4 months ago [\#109858](#109858) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109858 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Hi,

I think that the best solution will just be to directly change your product code through your product/variant page.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Kes](/forum/user/20105-kes "View Kes's Profile")**
- [![Kes's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-05-23.gif)](/forum/user/20105-kes "View Kes's Profile") Topic Author
- [ Offline](/forum/user/20105-kes)

Less More

- Posts: 26
- Thank you received: 0
-
-
-
-

13 years 4 months ago [\#109864](#109864) by [Kes](/forum/user/20105-kes "View Kes's Profile")  Replied by *[Kes](/forum/user/20105-kes "View Kes's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109864 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Thanks for that.

But product codes have to be unique? Is it too difficult to change what is displayed on the product page and in the shopping cart?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 4 months ago -  13 years 4 months ago [\#109878](#109878) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109878 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Hi,

No, you'll just have to edit the **show\_default** file of your "product" view of your front-end template and change these lines : Code:

&lt;?php if ($this-&gt;config-&gt;get('show_code')) { ?&gt; &lt;span id="hikashop_product_code_main" class="hikashop_product_code_main"&gt; &lt;?php echo $this-&gt;element-&gt;product_code; ?&gt; &lt;/span&gt; &lt;?php } ?&gt;

by : Code:

&lt;?php if ($this-&gt;config-&gt;get('show_code')) { ?&gt; &lt;span id="hikashop_product_code_main" class="hikashop_product_code_main"&gt; &lt;?php echo substr($this-&gt;element-&gt;product_code, 0, NUMBER_OF_CHARACTER_OF_YOUR_PRODUCT_CODE); ?&gt; &lt;/span&gt; &lt;?php } ?&gt;

And it should do the job, but you'll have the replace **NUMBER\_OF\_CHARACTER\_OF\_YOUR\_PRODUCT\_CODE**by the number of character that you want for your product code.

Last edit: 13 years 4 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Kes](/forum/user/20105-kes "View Kes's Profile")**
- [![Kes's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-05-23.gif)](/forum/user/20105-kes "View Kes's Profile") Topic Author
- [ Offline](/forum/user/20105-kes)

Less More

- Posts: 26
- Thank you received: 0
-
-
-
-

13 years 4 months ago [\#109902](#109902) by [Kes](/forum/user/20105-kes "View Kes's Profile")  Replied by *[Kes](/forum/user/20105-kes "View Kes's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109902 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Hi

Thank you. I have put that into the module, but I made one small change. I took out the two ' characters.

I have also put the same change into the 'show' and 'cart' modules so that you see the same codes after you choose a variant and in the shopping cart. It seems to be working. Was this correct?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 4 months ago [\#109906](#109906) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109906 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Sure ![:)](/media/kunena/emoticons/3.png ":)"). (I edited my last post and corrected it).

The following user(s) said Thank You: [Kes](/forum/user/20105-kes "View Kes's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Kes](/forum/user/20105-kes "View Kes's Profile")**
- [![Kes's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-05-23.gif)](/forum/user/20105-kes "View Kes's Profile") Topic Author
- [ Offline](/forum/user/20105-kes)

Less More

- Posts: 26
- Thank you received: 0
-
-
-
-

13 years 4 months ago [\#109908](#109908) by [Kes](/forum/user/20105-kes "View Kes's Profile")  Replied by *[Kes](/forum/user/20105-kes "View Kes's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#109908 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Thanks again for the fantastic support

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")**
- [![LukeDouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")
- [ Offline](/forum/user/29032-lukedouglas)

Less More

- Posts: 332
- Thank you received: 6
-
-

12 years 10 months ago [\#137640](#137640) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  Replied by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#137640 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

I changed the show-default.php page as instructed in this thread and where the main product name was changed from American Eagle to Audrey Hepburn, the variant code as generated still shows American Eagle plus all of these copies?

image missing http://webbering.com/images/troubleshooting/troubleshooting-variant-copy-code-1.jpg

I know I can 'manually' changed the variant code but when you have a few hundred that you are copying due to the 'same' variant setup for sizes, it's a pain! ![:angry:](/media/kunena/emoticons/23.png ":angry:")

Is there anyway to simply have the main product code, ie: audrey-hepburn, used in the variant code with a sequenced number added, ie: audrey-hepburn-137, audrey-hepburn-138, audrey-hepburn-139, etc.?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

12 years 10 months ago [\#137645](#137645) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#137645 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

There is no option to dynamically change the product_code of all the variants of a product based on the product_code of the main product.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")**
- [![LukeDouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")
- [ Offline](/forum/user/29032-lukedouglas)

Less More

- Posts: 332
- Thank you received: 6
-
-

12 years 10 months ago [\#137647](#137647) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  Replied by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#137647 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Bummer! Nick, add this to your 'request' list. If someone copies a product and you changed the title of the copied product, a simple subroutine could generate a product code based on the title, ie: The Grapes of Wrath = the-grapes-of-wrath and then change the code for all variants, ie: the-grapes-of-wrath-148, the-grapes-of-wrath-149, the-grapes-of-wrath-150, using a global sequence number. It would save a 'lot' of time when you are duplicating products. ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

12 years 10 months ago [\#137728](#137728) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display of product name and variant](/forum/2-general-talk-about-hikashop/83901-display-of-product-name-and-variant#137728 "Some of my products have variants. I have been putting the products into HikaShop by using 'copy'. (I have HikaShop Commercial). When you choose a variant on a product page you get a product name like:  Birthday Girls - July/Cornelian AM825&#95;4&#95;copy14540  These long product codes also show up in the shopping cart.  Can I control the display so that the customer only sees the basic product code, AM825 in the above case.")*

Yes, we'll have that for the product_code in next version so that if you update the product_code of the main product, it updates the product_code of all the variants based on that change.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTAxLWRpc3BsYXktb2YtcHJvZHVjdC1uYW1lLWFuZC12YXJpYW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.491 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
