Uğur Taşdildiren
Uğur Taşdildiren

Reputation: 418

Magento Configurable Product Option Image

I have color and size attribute in my product.

Size : 36-38-40-42-44-46-48-50-52-54

Colors: White-Black-Red

After creating a product with this attributes, magento created 30 simple products under configurable product.

At this point i have a problem.

Changing 30 products images one by one is too hard.

So i created a script which is creating a csv for use with dataflow. This method is making this easier but it's not looking like best practice. Also it's creating duplicate image for each simple product. I need to prevent this.

So i am open for advices to solve this issues.

Thanks

Upvotes: 2

Views: 171

Answers (1)

David Wilkinson
David Wilkinson

Reputation: 5118

Your best bet is to use a dataflow import:

  • Go to System > Import / Export > Dataflow Profiles
  • Add New Profile
  • Assign a Name and change Data Format Type to CSV
  • Add Field Mappings for sku (the unique identifier we'll use), and the image, thumbail, etc.
  • Save.
  • Gather all the images you want to assign to the simple products and upload them to your media/import/ folder on your server (if the import folder doesn't exist, create it).
  • Create a spreadsheet with the column headings that map the field mappings you entered above.
  • Enter the simple product SKU codes in the sku column.
  • In the image columns, enter the filenames of the images (/prod18-black-small.jpg, /prod18-orange-medium.jpg etc) for each SKU code. This is relative to the media/import folder, which the dataflow import will look into.
  • Once your spreadsheet is done, go back to System > Import / Export > Dataflow Profiles and go to Upload File.
  • Refresh the page and then go to Run Profile and select the file from the dropdown.
  • Click Run Profile, and it should import the images for every SKU code you entered in the spreadsheet.

I use the above all the time, I found the following link years ago when using Magento 1.7 and its been safely bookmarked ever since!: https://www.ashsmith.io/2012/05/importing-product-images-via-csv-in-magento-1-7-0-0/

Upvotes: 1

Related Questions