Custom Option Images 1.5 May 30 2013

This is "Custom Option Images" addition for apparel stores.
It adds ability to add (upload) images for custom product options.
So if you have an apparel store you can add custom option Color and upload small images for each color option.
Then if a customer selects Color option he will see the small image above the options dropdown (or check boxes, radio buttons, multiple select)

Installation with Connect Manager

1) Disable magento compilation in Magento admin panel -> System -> Tools -> Compilation

2) Go to System -> Magento Connect -> Magento Connect Manager (screenshot)
3) Uncheck the "Put store on the maintenance mode" checkbox.
4) Choose file "package_for_magento_connect_manager_installation.tgz" and click the Upload button.


Manual Installation

1) Disable magento compilation in Magento admin panel -> System -> Tools -> Compilation

2) Upload 17 new files :


To disable popup

Go to:
   Magento admin panel -> System -> Configuration -> Catalog -> Custom Option Images

To change the image size / style

In the file:
    app/ design/ frontend/ YOUR_INTERFACE/ default/ template/ optionimages/ product/ view/ js.phtml

adjust this line:
    var opImageTemplate = '<img src="{{url}}" id="option_image_{{id}}" width="100" style="display:none;" alt="" ' + opImagePopup + ' />';

NOTE: Don't forget to refresh the magento cache after any of the layout changes.
Magento admin panel -> System -> Cache Management -> Cache Control

To export options

1) Go to Magento admin panel -> System -> Import/Export -> Advanced Profiles (screenshot)
2) Click the "Add New Profile" button.
3) Fill in the fields:
Profile name - "optionimages-export"
Actions XML -

<action type="optionimages/convert_parser_options" method="unparse">
<action type="dataflow/convert_mapper_column" method="map">
<action type="dataflow/convert_parser_csv" method="unparse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA["]]></var>
<var name="fieldnames">true</var>

<action type="dataflow/convert_adapter_io" method="save">
<var name="type">file</var>
<var name="path">var/export</var>
<var name="filename"><![CDATA[option_images.csv]]></var>

4) Click the "Save and Continue Editing" button.
5) Select "Run Profile" in the right menu and click the "Run Profile In Popup" button.
6) Find the generated option_images.csv file in var/export

To import options

1) Prepare options data with the Excel program:
Required fields are four:
"product_sku", "option_title", "type" and "value_title" (when type is "drop_down", "radio", "checkbox" or "multiple").
Valid option types are:
"field", "area", "file", "drop_down", "radio", "checkbox", "multiple", "date", "date_time", "time"
Valid price types are:
"fixed", "percent"

Check a sample import file.

2) Save it as "import_options.csv" file and upload it to var/import directory
3) Go to Magento admin panel -> System -> Import/Export -> Advanced Profiles
4) Click the "Add New Profile" button.
5) Fill in the fields:
Profile name - "optionimages-import"
Actions XML -

<action type="dataflow/convert_adapter_io" method="load">
<var name="type">file</var>
<var name="path">var/import/</var>
<var name="filename"><![CDATA[option_images.csv]]></var>
<var name="format"><![CDATA[csv]]></var>
<action type="dataflow/convert_parser_csv" method="parse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA["]]></var>
<var name="fieldnames">true</var>
<var name="store"><![CDATA[0]]></var>
<var name="adapter">optionimages/convert_adapter_options</var>
<var name="method">parse</var>

6) Click the "Save and Continue Editing" button.
7) Select "Run Profile" in the right menu and click the "Run Profile In Popup" button.