Paul_gpvr Posted March 27, 2012 Share Posted March 27, 2012 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 Link to comment Share on other sites More sharing options...
Paul_gpvr Posted March 27, 2012 Author Share Posted March 27, 2012 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. 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now