make "variant code" based on characteristic

  • Posts: 37
  • Thank you received: 1
9 years 5 months ago #203344

-- 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.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 5 months ago #203354

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 or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum