Jump to content

How to copy accessories for multiple products


Paul_gpvr

Recommended Posts

Hi,

 

My shop has products which pretty much all share the same accessories.

 

So rather then edit each product via the back office interface does anyone know how to copy the accessories associated with one product to multiple other products?

 

Perhaps this is possible with SQL? Please see attached screenshot, as you can see product id 11 has various other accessories(products) associated with it.

 

So need to copy what product id 11 has and duplicate it for other product ids.

 

Any help whatsever would be really appreciated, cheers,

 

Paul

post-327956-0-44345800-1332843007_thumb.png

Link to comment
Share on other sites

Its ok i managed to figure out the sql to do this. Where 11 is the product id you want to copy accessories from and 30 is the product id you want to copy them to.

:D

 

insert into `ps_accessory`(`id_product_1`,`id_product_2`)
select '30' as `id_product_1`, `id_product_2` from `ps_accessory` where `id_product_1`='11'

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