- Posts: 2
- Thank you received: 0
Automatic generation of variant product codes..
15 years 6 months ago #9788
by Rayner
Automatic generation of variant product codes.. was created by Rayner
When creating variants, the product codes are automatically generated. By default it seems that the variant id is appended to the parent product name. Is it possible to have the variant value appended instead? For Example: Example-prod_Small, Example-prod_Med, Example-prod_Large.... instead of Example-prod_2, Example-prod_3, Example-prod_4?
Thanks in advance,
Mark
Thanks in advance,
Mark
Please Log in or Create an account to join the conversation.
15 years 6 months ago #9805
by nicolas
Replied by nicolas on topic Re: Automatic generation of variant product codes..
Hi,
There is no option for that. You would have to edit the function updateCharacteristics in the file administrator/components/com_hikashop/classes/product.php
However, the data of the characteristics is not loaded so you only have access to the characteristics values ids. If you want to do it, you will have to load the information from the table hikashop_characteristic before setting the value in the product code.
We didn't want to do that because the product code can only have alpha numeric characters and if you have characteristic values in a language which doesn't use alpha numeric characters like japanese or russian, it would not work properly.
There is no option for that. You would have to edit the function updateCharacteristics in the file administrator/components/com_hikashop/classes/product.php
However, the data of the characteristics is not loaded so you only have access to the characteristics values ids. If you want to do it, you will have to load the information from the table hikashop_characteristic before setting the value in the product code.
We didn't want to do that because the product code can only have alpha numeric characters and if you have characteristic values in a language which doesn't use alpha numeric characters like japanese or russian, it would not work properly.
Please Log in or Create an account to join the conversation.
Time to create page: 0.167 seconds