Option value position (select value sort order)

This Magento shell script sorts the values of a given attribute after the order of values in a given CSV file (sets option value position).

So it is not necessary to set the values via BE-Interface. The value matching to find the respective option-id is done by using the value of the Storeview specified in REFERENCESTORE and the attribute for that the order should be set is determined via TARGET_ATTRIBUTE.
This is how you call the scrip via shell within /mageroot/shell/:

The CSV has to look like that:

One thought on “Option value position (select value sort order)

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.