latorante tools

♥  Buy me a beer, or coffee :)

If found anything here usefull, and want to buy me a bevarage, I won't complain!

Prestashop Combinations Generator

For those of you who had sleepless nights and problems with prestashop built in system for combinations and importing them to your products I have a great news! Your nightmare is almost over!

Now, this little tool takes your CSV file, finds all combinations and gives you another file back that you can imoport to your prestashop.

In detail it takes your CSV file, takes first column as ID (Yes, first column has to be ID!!!), then search in first line of file for column named Combinations or combinations. After that, it goes line after line and looks for combinatoins. So, for example, let's say your csv file looks like this:

          Item,Combinations
          1158,"Size: 4,Size: 5,Size: 6,Size: 7,Colour: Blue, Colour: White, Lenght: Short"

If you'd import file like this to presta, it works great, except, it doesnt create all the possible combinations by itself, you'd have to go thru each product and manually create thru their generator ... wich is rather annoying. If you upload file like this here, it's gonna give you file back, looking like this:

          Item,Combinations
          1158,"Size: 4, Colour: Blue, Lenght: Short"
          1158,"Size: 5, Colour: Blue, Lenght: Short"
          1158,"Size: 6, Colour: Blue, Lenght: Short"
          1158,"Size: 7, Colour: Blue, Lenght: Short"
          1158,"Size: 4, Colour: White, Lenght: Short"
          1158,"Size: 5, Colour: White, Lenght: Short"
          1158,"Size: 6, Colour: White, Lenght: Short"
          1158,"Size: 7, Colour: White, Lenght: Short"

Now, isn't that something? Important thing to remember is, first columns has to always be ID, and then one of the columns has to be named Combinations or combinations. Also, be carefull when creating your files in excel, don't mess up with combinations column saying "Size: 4, 5, 7" ... the script will think it's multiple combinations and combine them together. Always has to be "ATTRIBUTE: VALUE, ATTRIBUTE: VALUE". It's case sensitive as well, so be carefull with that.