Jump to content

Additing two color palettes for the same product


Recommended Posts

some of the products that i'm adding to the site require two color palettes for example you can 

 - choose the top color of a chair 

 - choose a different color for the metallic parts

like this picture 

my question is : is it doable by duplicating the colors ? or do i need a different module or is there any work around ? 

forum question.png

Link to comment
Share on other sites

It can work this way BUT the PrestaShop core has a bad implementation regarding product combinations.

Lets say you have 50 colors for tabletop, 50 for legs, 50 for the rubber "shoes".

It means -> 50 ^ 3 = 125.000 -> 125.000 photos * image_sizes. Quite unbearable, right?

It should have an extension that will have 50 table top photos + 50 legs + 50 rubber = 150 and on every attribute change, make an ajax call and make on the fly an image which actually will be 3 smaller images.

lets say a product image = 200Kb (i have seen much bigger) so 125000 * 200Kb = 25 Gb 😱 (let alone the different sizes)

150 * 200Kb = 30 Mb still huge, but a lot less than above.

The same way the attributes charging should be separately per attribute and not per combination.

Link to comment
Share on other sites

Of course, there is a solution.
You would have to have three transparent images that you would create from one image (something like separate layers).
Then it would no longer be a problem to generate an image.
It would then be sufficient to use PHP functions and load the image via JavaScript.
It's practically nothing complicated, but a lot of memory would be used.
I'll create some small demo to see that it can be done. I will do a demo outside of Prestashop.

obrazek.png.480d475892ed6fbe280cf28d0efeb707.png

Sample change colors after button click.

😎

Edited by Guest (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...