VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: sandomatyas on August 17, 2017, 10:44:23 AM

Title: Copy products -> duplicate media
Post by: sandomatyas on August 17, 2017, 10:44:23 AM
When I copy a product VM assigns the image of the original product to it, so there will be 2 records in #__virtuemart_product_medias table with the same virtuemart_media_id but different virtuemart_product_ids.
When I open the second product and change the image title, description, meta etc it will change the media's data so the first product will be changed too
I'm just wondering if there is any disadvantages to duplicate the media entry too when a product is copied? Or what is the good solution to fix that? Downloading and re-uploading is a bit old fashion :)
Title: Re: Copy products -> duplicate media
Post by: Studio 42 on August 18, 2017, 15:25:48 PM
virtuemart_product_medias is to refer to a media, the media description is same for a media used by many products.
So if you really need to have description per product, you have to reupload the image 2 times so you can change description for each product.
Another solution is to get description from the product, but this need of course some change in the PHP files