Post by fisher05 » Mon Dec 10, 2018 7:08 pm

https://www.opencart.com/index.php?rout ... n_id=10817

Got [OCMOD]product_option_image_swap working on 2.3.0.2 - loved it on 2.0.2.0

in install.xml replace:

Code: Select all

<file path="catalog/controller/product/product.php">
        <operation>
            <search><![CDATA[$data['images'][] = array(]]></search>
            <add position="after"><![CDATA[                                     'big_thumb'                  => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')), ]]>
            </add>
        </operation>      
        <operation>
            <search><![CDATA[$product_option_value_data[] = array(]]></search>
            <add position="after"><![CDATA[   'imagel'                  => $this->model_tool_image->resize($option_value['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')),
'imagexl'                  => $this->model_tool_image->resize($option_value['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),]]></add>
        </operation>
        <operation>
            <search><![CDATA[$this->document->addScript('catalog/view/javascript/jquery/magnific/jquery.magnific-popup.min.js');]]></search>
            <add position="before"><![CDATA[$this->document->addScript('catalog/view/javascript/jquery/jquery.elevateZoom-3.0.8.min.js');]]>
            </add>
        </operation>
    </file>
with:

Code: Select all

<file path="catalog/controller/product/product.php">
        <operation>
            <search><![CDATA[$data['images'][] = array(]]></search>
            <add position="after"><![CDATA[                                     'big_thumb'                  => $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_thumb_width'), $this->config->get($this->config->get('config_theme') . '_image_thumb_height')), ]]>
            </add>
        </operation>
        <operation>
            <search><![CDATA[$product_option_value_data[] = array(]]></search>
            <add position="after"><![CDATA[   'imagel'                  => $this->model_tool_image->resize($option_value['image'], $this->config->get($this->config->get('config_theme') . '_image_thumb_width'), $this->config->get($this->config->get('config_theme') . '_image_thumb_height')),
'imagexl'                  => $this->model_tool_image->resize($option_value['image'], $this->config->get($this->config->get('config_theme') . '_image_popup_width'), $this->config->get($this->config->get('config_theme') . '_image_popup_height')),]]></add>
        </operation>
        <operation>
            <search><![CDATA[$this->document->addScript('catalog/view/javascript/jquery/magnific/jquery.magnific-popup.min.js');]]></search>
            <add position="before"><![CDATA[$this->document->addScript('catalog/view/javascript/jquery/jquery.elevateZoom-3.0.8.min.js');]]>
            </add>
        </operation>
    </file>

Fisher05


User avatar
New member

Posts

Joined
Wed May 22, 2013 1:30 am

Post by IP_CAM » Tue Dec 11, 2018 11:44 am

Well, I used this nice Extension too, until I found a Carousel-based Solution,
so, visitors don't have to click anything, but relax and wait a few seconds ... :-)
Ernie
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by fisher05 » Tue Dec 11, 2018 8:34 pm

Have you got the link to this carousel version?

Fisher05


User avatar
New member

Posts

Joined
Wed May 22, 2013 1:30 am

Post by IP_CAM » Tue Dec 11, 2018 9:38 pm


My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 37 guests