0

I have this scenario:

we are actually using a colors-watch ext. for configurable products.

This extension works using the images that as been loaded in the associated simple prod.

We need to switch to another extension for color-watch the issue is that this new ext uses the images of the configurable product ( with some extra parameter to assign them to a particular attribute value ).

So what I need is to:

  • Open a configurable
  • read all simple prod
  • read the attribute value
  • extract images
  • assign the images to the configurable

Is it possible to do it an efficient way ? maybe with an sql query, so without saving the products model ?
Does I need to re-save the images for any reason ? (images are already uploaded)

2 Answers 2

1

Reanimate old questions? Ok here are my 2 cents:

I would do it exactly the way you described. There is no need (I think) to be performant or something.

  1. Load collection with all configurable Products
  2. Loop over all products
    1. Load all simple products and loop over them
      1. attach all the images to the configurable
      2. Delete the images from the simple(?)
      3. save the simple (?)
    2. save the configurable
    3. cleanup the variables

Write this into a php script and execute from the cli, then there is no timeout. And give the process enough resources to run (avoid out of memory exception). This may take a few minutes, maybe hours. You can do it on a development system and copy the database over.

1
  • I upvote both thanks for the effort :) but we solved with a SQL query
    – Fra
    Jun 15, 2013 at 4:05
1

you can try Simple Configurable product extension from the magento community. its free and does the job. You will need few fixes along the way but simple google searches for small bugs should fix them for your particular error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.