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

#   code product variant ID

##

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 1 month ago [\#312107](#312107) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  *[code product variant ID](/forum/32-content-creation/898499-code-product-variant-id#312107 "-- HikaShop version -- : 4.2.1 (2 oktober) -- Joomla version -- : 3.9.12 -- PHP version -- : 7+ -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : no error  Hi,  By default, when the variant is generated based on the characteristics of the product, the code uses the main product code plus the ids of the characteristics separated by an underscore.  Is it possible to get the code plus the “value” instead of the ID  • it is a lot of work to change all the variant product code names • For the customer it is a very strange number in the order • orders we receive are not easy to read  Code 2250740&#95;10&#95;750&#95;1907 A better info view is like this 2250740&#95;offerte&#95;green&#95;xxl  All product start with the characteristic order/offer with ID 10 an 11 10 value = bestelling (order) 11 value = offerte. (offer)  That is the most important characteristic at every product.  I searched in the forum but couldn’t find the solution maybe you can tell how to change the product/form-variants  Best regards,  Marius  Attachments  Code, IDvariants, 80 variants")* was created by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")*

-- HikaShop version -- : 4.2.1 (2 oktober)
-- Joomla version -- : 3.9.12
-- PHP version -- : 7+
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : no error

Hi,

By default, when the variant is generated based on the characteristics of the product, the code uses the main product code plus the ids of the characteristics separated by an underscore.

Is it possible to get the code plus the “value” instead of the ID

• it is a lot of work to change all the variant product code names
• For the customer it is a very strange number in the order
• orders we receive are not easy to read

Code 2250740_10_750_1907
A better info view is like this 2250740_offerte_green_xxl

All product start with the characteristic order/offer with ID 10 an 11
10 value = bestelling (order)
11 value = offerte. (offer)

That is the most important characteristic at every product.

I searched in the forum but couldn’t find the solution maybe you can tell how to change the product/form-variants

Best regards,

Marius

Attachments

Code, IDvariants, 80 variants

- [ ![order&#95;product&#95;backend.png](/forum/attachment/47949) ](/forum/attachment/47949 "...ct&#95;backend.png") [ ](/forum/attachment/47949?download=1 "...ct&#95;backend.png")
- [ ![80variants.png](/forum/attachment/47950) ](/forum/attachment/47950 "80variants.png") [ ](/forum/attachment/47950?download=1 "80variants.png")
- [ ![code.png](/forum/attachment/47951) ](/forum/attachment/47951 "code.png") [ ](/forum/attachment/47951?download=1 "code.png")
- [ ![IDvariants.png](/forum/attachment/47952) ](/forum/attachment/47952 "IDvariants.png") [ ](/forum/attachment/47952?download=1 "IDvariants.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODk4NDk5LWNvZGUtcHJvZHVjdC12YXJpYW50LWlkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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: 86587
- Thank you received: 14325
-
-

7 years 1 month ago [\#312117](#312117) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[code product variant ID](/forum/32-content-creation/898499-code-product-variant-id#312117 "-- HikaShop version -- : 4.2.1 (2 oktober) -- Joomla version -- : 3.9.12 -- PHP version -- : 7+ -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : no error  Hi,  By default, when the variant is generated based on the characteristics of the product, the code uses the main product code plus the ids of the characteristics separated by an underscore.  Is it possible to get the code plus the “value” instead of the ID  • it is a lot of work to change all the variant product code names • For the customer it is a very strange number in the order • orders we receive are not easy to read  Code 2250740&#95;10&#95;750&#95;1907 A better info view is like this 2250740&#95;offerte&#95;green&#95;xxl  All product start with the characteristic order/offer with ID 10 an 11 10 value = bestelling (order) 11 value = offerte. (offer)  That is the most important characteristic at every product.  I searched in the forum but couldn’t find the solution maybe you can tell how to change the product/form-variants  Best regards,  Marius  Attachments  Code, IDvariants, 80 variants")*

Hi,

Here is a thread about a similar request:
hikashop.com/forum/4-how-to/34414-change-format-of-variant-code.html
Basically, that will require to add some custom coding if you want to change the way the code is generated for variants.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODk4NDk5LWNvZGUtcHJvZHVjdC12YXJpYW50LWlkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 4 weeks ago [\#312599](#312599) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  Replied by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")* on topic *[code product variant ID](/forum/32-content-creation/898499-code-product-variant-id#312599 "-- HikaShop version -- : 4.2.1 (2 oktober) -- Joomla version -- : 3.9.12 -- PHP version -- : 7+ -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : no error  Hi,  By default, when the variant is generated based on the characteristics of the product, the code uses the main product code plus the ids of the characteristics separated by an underscore.  Is it possible to get the code plus the “value” instead of the ID  • it is a lot of work to change all the variant product code names • For the customer it is a very strange number in the order • orders we receive are not easy to read  Code 2250740&#95;10&#95;750&#95;1907 A better info view is like this 2250740&#95;offerte&#95;green&#95;xxl  All product start with the characteristic order/offer with ID 10 an 11 10 value = bestelling (order) 11 value = offerte. (offer)  That is the most important characteristic at every product.  I searched in the forum but couldn’t find the solution maybe you can tell how to change the product/form-variants  Best regards,  Marius  Attachments  Code, IDvariants, 80 variants")*

Hi Nicolas,

Thank you, i wait to answer because i need some time to do the test. I can say it works, but if i will use it maybe not?
I did the character alias in the databes
i did the product.php
i did the back-end template line editpopup

now i get a nice result productcode_alias. something like this 23000_33 is now 23000_colorgreen

it works, but i see more work to do then change the varaint product code.
First we have very much charateristics and i have to fill the database.
Then is see in the product after making variants and save a error. There is no default variant activated. I have to open every variant and save this variant, then there is a default and the product is good to save.(no error any more)
Also i have to put right the variant value when there are 2 characteristics or more.
So when i work as normal and change the product code variant is is quicker i think.
see the attachments.

best regards, Marius

- [ ![no&#95;deafult.png](/forum/attachment/48039) ](/forum/attachment/48039 "no&#95;deafult.png") [ ](/forum/attachment/48039?download=1 "no&#95;deafult.png")
- [ ![error&#95;after&#95;safe.png](/forum/attachment/48040) ](/forum/attachment/48040 "...after&#95;safe.png") [ ](/forum/attachment/48040?download=1 "...after&#95;safe.png")
- [ ![no&#95;default&#95;var.png](/forum/attachment/48041) ](/forum/attachment/48041 "...efault&#95;var.png") [ ](/forum/attachment/48041?download=1 "...efault&#95;var.png")
- [ ![database.png](/forum/attachment/48042) ](/forum/attachment/48042 "database.png") [ ](/forum/attachment/48042?download=1 "database.png")
- [ ![safe&#95;every&#95;variant&#95;item.png](/forum/attachment/48043) ](/forum/attachment/48043 "...riant&#95;item.png") [ ](/forum/attachment/48043?download=1 "...riant&#95;item.png")
- [ ![unchange&#95;default.png](/forum/attachment/48044) ](/forum/attachment/48044 "...ge&#95;default.png") [ ](/forum/attachment/48044?download=1 "...ge&#95;default.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODk4NDk5LWNvZGUtcHJvZHVjdC12YXJpYW50LWlkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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: 86587
- Thank you received: 14325
-
-

7 years 4 weeks ago [\#312613](#312613) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[code product variant ID](/forum/32-content-creation/898499-code-product-variant-id#312613 "-- HikaShop version -- : 4.2.1 (2 oktober) -- Joomla version -- : 3.9.12 -- PHP version -- : 7+ -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : no error  Hi,  By default, when the variant is generated based on the characteristics of the product, the code uses the main product code plus the ids of the characteristics separated by an underscore.  Is it possible to get the code plus the “value” instead of the ID  • it is a lot of work to change all the variant product code names • For the customer it is a very strange number in the order • orders we receive are not easy to read  Code 2250740&#95;10&#95;750&#95;1907 A better info view is like this 2250740&#95;offerte&#95;green&#95;xxl  All product start with the characteristic order/offer with ID 10 an 11 10 value = bestelling (order) 11 value = offerte. (offer)  That is the most important characteristic at every product.  I searched in the forum but couldn’t find the solution maybe you can tell how to change the product/form-variants  Best regards,  Marius  Attachments  Code, IDvariants, 80 variants")*

Hi,

Yes, to have a complete solution without the errors and the default variant selected would require more modifications in classes/product.php to take into account the change of format of the product code. It's not that easy to do.

The following user(s) said Thank You: [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODk4NDk5LWNvZGUtcHJvZHVjdC12YXJpYW50LWlkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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.063 seconds

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