News:

Support the VirtueMart project and become a member

Main Menu

Code to assign product images based one sku?

Started by SoTrue, March 10, 2016, 22:05:34 PM

Previous topic - Next topic

SoTrue

Hi all,

I have a vast number of products each of which has multiple product images, i would like to create some code that will loop through each product and based on the product sku, search for image files that contain the sku number and assign them to the product. Is this possible as it seems VM assigns a random number to the virtuemart_media_id field and im not sure where the file names are actually stored in the DB?

Any advice would be most welcome.

Best Regards
Donna