Jump to content

Product pictures assignment to each combinations


Recommended Posts

Hi there,

I have a product and I generated 32 combinations of the product with the combinations generator now I have to assign each one of the 32 combination with it's own picture in the combination tab in BO. This is just for one product. I have about 200 .... Can someone suggest me any way to do this faster? or is there a module that is available? or would someone help me code something ... ?

This post is related to this post

http://www.prestashop.com/forums/viewthread/64329/configuring___using_prestashop/checkbox_implement_on_combinations_page_dot_

Link to comment
Share on other sites

Does your sql query work on prestashop 1.3.1.1?

where can I get the id_image and id_product_attribute ?

INSERT INTO `ps_product_attribute_image` SELECT `id_product_attribute`, `id_image` FROM `ps_product_attribute` pa LEFT JOIN `ps_image` i ON (pa.`id_product` = i.`id_product`); 



in the above code it assigns all the product picture to all the combinations meaning all 6 images is one each and every one of the combinations , correct me if I am wrong?

and do I need to replace the id_product, id_product_attribute and id_image ?

in my case I have 32 combinations and

1st 8 combination belongs to 2 of the set of 6 images
2nd 8 combination belongs to another 2 of the set of 6 images
3rd 8 combination belongs to another 2 of the set of 6 images
4th 8 combination belongs to another 2 of the set of 6 images.

so all together is 32 combinations 8+8+8+8

Link to comment
Share on other sites

Yes, it works in PrestaShop v1.3.1, but it can only assign every product image to every combination. For example, if you have 6 images on a product, those 6 images will be assigned to every combination on the product. You can't choose which product images go to which combinations. I can't think of how to do what you want with a query.

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