Jump to content

1.4 Combinations Madness


Recommended Posts

Lets say I have some shirts.

Lets say I have small, med, large, XL and XXL.

Lets say they come in blue, red, green and purple and I upload a sample shirt for each color.

 

Lets say I run the combinations generator and I get 20 combinations.

 

Lets say I spend the rest of the night picking colors because I have to select each combo and every time I click a combo the page scrolls about "Choose the reason and enter the quantity that you want to increase or decrease in your stock" making me loose my place and then when I update the combo it flops to the top of the page and I get to hit my head with a hammer again.

 

It burns Hymie. It burns deep.

  • Like 1
Link to comment
Share on other sites

I hear you. At first I thought there must be a better way. But I soon realized, after some “thinking”, there isn't much you can do.

 

Here are my 2 solutions. The first is to use a module that at least stops the frustrating flops to the top of the page, Combination images fast select, please see,

http://www.cartexper...ast-select.html

 

This module simply puts a selector beside each combination, and allows you to select the image without the page flop. Better than nothing. :mellow:

 

The other method I use could be automated.

 

In your database in the table ps_product_attribute_image

 

You will find 2 fields,

 

id_product_attribute and id_image

 

This table gets populated as you "assign" your image to each size.

 

So lets work with XS, S and M

 

The id_product_attribute field simply increments by one and id_image will match the image number. That means if you have 3 sizes like in our example, than the image number will be used 3 times in the id_image field.

 

So it will look like,

 

<

sorry forum doesn’t support tables

>

 

 

If you keep an eye on that table as you do one using the Prestashop interface, you’ll see how to add the rest manually. Although it isn’t much better if at all. I'm working locally and can do it with Microsoft Access.

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

Thanks for the reply and suggestions Bill, I got the table stuff in my email reply as well even tho it dosent show here.

 

Since we just launched and I am still swatting bugs I will probably just take the lumps for now but I think in the mid-long term I will write up something home-brewed to deal with this. I was really venting since I am currently at about product #179 of over 2k eventually, at least 500 in the short-term.

 

I know what you mean about after thinking about it as there is a pretty large array of possibilities if you take it all in one bite. Off the top of my head Im thinking ajax/xmlhttp'ing the selection deals.

 

Your insights into the table deal are very valuable. When I finally get around to coding something up I will probably donate it to the community.

 

Appreciate ya here on the forums pitching in for us noobs :)

 

SC

Link to comment
Share on other sites

Here is a module idea. If we use the color in our image file name. For example red-324.jpg. Now with one click of a button, or even when creating the combo's the images can be matched to the color in my combo.

 

In the meantime, until that day comes ... here we are. :mellow:

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I have an update for this.. Yesterday I needed to start entering in some tee shirts. I had sizes S,M,L,XL,XXL,3XL and 4XL with around 11 colors available for each. Playing the click game was not really an option..so..

 

With the info I got from Bill I set off to figure out a way to do this.

 

I started on my WAMP local dev site. I loaded up phpmyadmin and looked to see that it allowed for excel imports.

 

I created all my combinations, uploaded all my pics.

 

I opened up a notepad and made notes of the attribute combination id by hovering over the delete button (they were sequential)

 

I then made note of the image id's the same way.

 

Next I opened up Excel and made the first column the attribute id column (id_product_attribute) I entered a few numbers in order, then selected them and dragged them down auto-filling the sequence.

 

Next I scale my windows so I could see the excel, my combinations in PS and my notepad with the image ids (id_image). I had created a new color group so for mine, they were generally 7 or so in a row.. I filled in the corresponding color to the attribute id in excel.

 

I found I had to name the workbook to the table name.. so I named the workbook "ps_product_attribute_image". (the tab at the bottom, not the file name)

 

I crossed my fingers and uploaded.. tada.. 70 assigned images.

 

I also wanted a design image with each.. so I got that image id and replaced all the image id's in my spreadsheet with that one image id.. uploaded..and now each t-shirt had 2 assigned images.. one with the teeshirt of the right color..the other with the design image.

 

Awesome..now on to try it in production.

 

Well.. My host, hostgator, recently upgraded their cpanel and phpmyadmin..and there was no excel import..but they did have a csv import. I decided to download (export) the ps_product_attribute_image table to see what it looked like and then compare it to an excel save-as csv.

 

The one from the site had quotes around the fields, excel didnt.. I could probably have messed around with the settings but decided to leave the site import at its default and work the data.

 

So I opened up the csv file in notepad++ which has a macro record function. After a few tries, I recorded a macro to wrap quotes around the fields and then uploaded the file..tada.. images..sweet images.

 

For my production site the process is..

upload the images

create the combinations, leaving any I might not want

note the ids for the images an the attributes

create an excel of the data

save as csv

wrap the fields in quotes

upload and import to database

delete unnecessary combos.

 

I also found that for the combos I didnt want it was easier to ctr-click the delete button and press enter leaving the cursor where it was to move down to the next. Its kinda awkward but after a while I was hacking many combos quickly.

 

I just finished my second product with over 70 combos, 2 images each, in about 10 or so minutes. A far cry from the time it would have taken page-flopping I think.

 

This isnt for the faint of heart or DB noob.. but for some people who know what Im talking about.. this might be a life saver.

 

Good Luck and BACK UP!! :)

SC

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

I have an update for this.. Yesterday I needed to start entering in some tee shirts. I had sizes S,M,L,XL,XXL,3XL and 4XL with around 11 colors available for each. Playing the click game was not really an option..so..

 

With the info I got from Bill I set off to figure out a way to do this.

 

I started on my WAMP local dev site. I loaded up phpmyadmin and looked to see that it allowed for excel imports.

 

I created all my combinations, uploaded all my pics.

 

I opened up a notepad and made notes of the attribute combination id by hovering over the delete button (they were sequential)

 

I then made note of the image id's the same way.

 

Next I opened up Excel and made the first column the attribute id column (id_product_attribute) I entered a few numbers in order, then selected them and dragged them down auto-filling the sequence.

 

Next I scale my windows so I could see the excel, my combinations in PS and my notepad with the image ids (id_image). I had created a new color group so for mine, they were generally 7 or so in a row.. I filled in the corresponding color to the attribute id in excel.

 

I found I had to name the workbook to the table name.. so I named the workbook "ps_product_attribute_image". (the tab at the bottom, not the file name)

 

I crossed my fingers and uploaded.. tada.. 70 assigned images.

 

I also wanted a design image with each.. so I got that image id and replaced all the image id's in my spreadsheet with that one image id.. uploaded..and now each t-shirt had 2 assigned images.. one with the teeshirt of the right color..the other with the design image.

 

Awesome..now on to try it in production.

 

Well.. My host, hostgator, recently upgraded their cpanel and phpmyadmin..and there was no excel import..but they did have a csv import. I decided to download (export) the ps_product_attribute_image table to see what it looked like and then compare it to an excel save-as csv.

 

The one from the site had quotes around the fields, excel didnt.. I could probably have messed around with the settings but decided to leave the site import at its default and work the data.

 

So I opened up the csv file in notepad++ which has a macro record function. After a few tries, I recorded a macro to wrap quotes around the fields and then uploaded the file..tada.. images..sweet images.

 

For my production site the process is..

upload the images

create the combinations, leaving any I might not want

note the ids for the images an the attributes

create an excel of the data

save as csv

wrap the fields in quotes

upload and import to database

delete unnecessary combos.

 

I also found that for the combos I didnt want it was easier to ctr-click the delete button and press enter leaving the cursor where it was to move down to the next. Its kinda awkward but after a while I was hacking many combos quickly.

 

I just finished my second product with over 70 combos, 2 images each, in about 10 or so minutes. A far cry from the time it would have taken page-flopping I think.

 

This isnt for the faint of heart or DB noob.. but for some people who know what Im talking about.. this might be a life saver.

 

Good Luck and BACK UP!! :)

SC

Does this work in 1.4.9? I can't find anywhere in Attributes or the Combinator where I can add an image to link to the color picker
Link to comment
Share on other sites

Product combinations generator doesn't deal with images at all. You need to assign the images one by one after you have generated your combo's.

 

The suggestions above use spread sheets and direct database connections to try and make this completely useless and poorly designed part of PS bearable.

 

The link above to a module made by presto-changeo.com seems to be a good solution, although I haven't tried it yet, I plan to buy it soon when I begin a PS 1.5X site.

Link to comment
Share on other sites

×
×
  • Create New...