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

#   make "variant code" based on characteristic

##

- **[meleciovaldez](/forum/user/21603-meleciovaldez "View meleciovaldez's Profile")**
- [![meleciovaldez's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar21603.jpg)](/forum/user/21603-meleciovaldez "View meleciovaldez's Profile") Topic Author
- [ Offline](/forum/user/21603-meleciovaldez)

Less More

- Posts: 37
- Thank you received: 1
-
-
-

11 years 4 months ago [\#203344](#203344) by [meleciovaldez](/forum/user/21603-meleciovaldez "View meleciovaldez's Profile")  *[make "variant code" based on characteristic](/forum/35-orders-management/877253-make-variant-code-based-on-characteristic#203344 "-- HikaShop version -- : newest -- Joomla version -- : 3.3.6  Hi im managing my variants for my product &quot;Screen Printing&quot; I have over 60 variants. is there a way that the code is generated based on the characteristics for that variant? for example &quot;Screen Printing 1 Color 12-24 Shirts&quot; as the code and name for that variant. Screen Printing is product name. 1 Color is from first characteristic and 12-24 Shirts is from 2nd Characteristic.")* was created by *[meleciovaldez](/forum/user/21603-meleciovaldez "View meleciovaldez's Profile")*

-- HikaShop version -- : newest
-- Joomla version -- : 3.3.6

Hi im managing my variants for my product "Screen Printing" I have over 60 variants. is there a way that the code is generated based on the characteristics for that variant? for example "Screen Printing 1 Color 12-24 Shirts" as the code and name for that variant. Screen Printing is product name. 1 Color is from first characteristic and 12-24 Shirts is from 2nd Characteristic.

- [ ![variants&#95;code.png](/forum/attachment/24696) ](/forum/attachment/24696 "variants&#95;code.png") [ ](/forum/attachment/24696?download=1 "variants&#95;code.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzI1My1tYWtlLXZhcmlhbnQtY29kZS1iYXNlZC1vbi1jaGFyYWN0ZXJpc3RpYz90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 4 months ago [\#203354](#203354) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[make "variant code" based on characteristic](/forum/35-orders-management/877253-make-variant-code-based-on-characteristic#203354 "-- HikaShop version -- : newest -- Joomla version -- : 3.3.6  Hi im managing my variants for my product &quot;Screen Printing&quot; I have over 60 variants. is there a way that the code is generated based on the characteristics for that variant? for example &quot;Screen Printing 1 Color 12-24 Shirts&quot; as the code and name for that variant. Screen Printing is product name. 1 Color is from first characteristic and 12-24 Shirts is from 2nd Characteristic.")*

Hi,

The code is already generated based on the characteristics. The ids that you see in the generated code correspond to the id of the characteristics values of the variant.
It's better than using the value name because you can change the value at any time and you won't loose the links between the variants and the value.
It also allows us to greatly improve the efficiency of the characteristics system as the SQL queries managing the variants can be optimized.
So no, you can't easily change the way the code is generated for the variants. You would have to modify the function updateCharacteristics of the file administrator/components/com_hikashop/classes/product.php which has almost 1000 lines of code optimized for an efficient generation of the variants, so it's going to be really complex, even for a senior programmer.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzI1My1tYWtlLXZhcmlhbnQtY29kZS1iYXNlZC1vbi1jaGFyYWN0ZXJpc3RpYz90bXBsPW1hcmtkb3du) 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.131 seconds

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

[](#top)
