code product variant ID
- mariussport
-
Topic Author
- Offline
- Test fase
Less
More
6 years 11 months ago #312107
by mariussport
code product variant ID was created by mariussport
-- 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
-- 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
Please Log in or Create an account to join the conversation.
6 years 11 months ago #312117
by nicolas
Replied by nicolas on topic code product variant ID
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.
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 or Create an account to join the conversation.
- mariussport
-
Topic Author
- Offline
- Test fase
6 years 10 months ago #312599
by mariussport
Replied by mariussport on topic code product variant ID
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
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
Please Log in or Create an account to join the conversation.
6 years 10 months ago #312613
by nicolas
Replied by nicolas on topic code product variant ID
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.
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
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds