Prestashop Combinations Suck 11
There are a lot of great features with Prestshop, but as of version 1.1 their idea of product options and values, attributes, or combinations (whatever you want to call them) is not good. If you have five or six different options with four or five option values each, you cannot use this solution. Why? Let me show you….
Use the “generator” to assign attributes to a product. Below is the full screenshot of all the attributes assigned so far. Notice the green box at the top that says “4900” products created. I don’t know why they call it “products” b/c it’s really some sort of product/attribute combination.
The attribute tables in the database contain a ton of records!
Add another option with two values.
And the table record counts jump to 9800 and 58802! How the can this be? I only added one more option and two values?!?!
Add one more option value and things go boom. It’s broke.
The database says…
What happened? Prestashop was successful at increasing the number of rows in the product attribute table again by 50%, but when it tries to insert 117,000 records into the product_attribute_combination table things don’t work.
I used my debugger and stepped though the code in of the generator page in attempt to figure out the problem. The code loops through all the records and builds an array of objects with 18 properties each for all the combinations, except that the array contained well over 100000 objects! This took forever and locked up my machine. Additionally, when you have this many combinations, the product detail page that the customers use takes about 15 seconds to load.
Why would you attempt to store every possible combination of a product and all its options and all its values in the database????? This is not using a relational database as it is supposed to be used! You build relationships, not just store data! Prestashop is great in many ways and “had” a lot of potential… until this. Prestashop product combinations suck!