<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>So Call for Price</name>
    <code>so-call-for-price</code>
    <version>1.0.1</version>
    <author>OpenCartWorks</author>
    <link>http://www.opencartworks.com/</link>
    
    <file path="catalog/language/en-gb/en-gb.php">
        <operation>
            <search><![CDATA[<?php]]></search>
            <add position="after"><![CDATA[
                $_['text_price_0']              = 'Call for Price';
                $_['text_form_title']           = 'Call For Price';
                $_['text_name']                 = 'Name';
                $_['text_email_id']             = 'Email ID';
                $_['text_contact_number']       = 'Contact Number';
                $_['text_inquiry_details']      = 'Inquiry Details';
                $_['text_country']              = 'Country';
                $_['text_submit']               = 'Submit';
            ]]></add>
        </operation>
    </file>
    <file path="catalog/language/ar-ar/ar-ar.php">
        <operation>
            <search><![CDATA[<?php]]></search>
            <add position="after"><![CDATA[
                $_['text_price_0']              = 'Call for Price';
                $_['text_form_title']           = 'Call For Price';
                $_['text_name']                 = 'Name';
                $_['text_email_id']             = 'Email ID';
                $_['text_contact_number']       = 'Contact Number';
                $_['text_inquiry_details']      = 'Inquiry Details';
                $_['text_country']              = 'Country';
                $_['text_submit']               = 'Submit';
            ]]></add>
        </operation>
    </file>
  
    <file path="catalog/controller/extension/module/{featured,bestseller}*.php">
        <operation>
            <search><![CDATA[$data['products'] = array();]]></search>
            <add position="before"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }

                $this->load->model('setting/setting');
                $data['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');
				
				if (!defined ('FANCYBOX'))
					{
					$this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
					define( 'FANCYBOX', 1 );
				}
                if (!defined ('so_call_for_price')){
                   
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$product_info['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$product_info['price']) {
                    $price_0 = $product_info['price'];
                }
                else {
                    $price_0 = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'       => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'       => $price_0,
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/extension/module/{featured,bestseller,latest,special}*.twig">
        <operation>
            <search index="0"><![CDATA[{{ product.price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                    {% endif %}
                {% else %}
                    {{ product.price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.tax %}]]></search>
            <add position="replace"><![CDATA[
                {% if ((product.tax) and (cfp_setting.module_so_call_for_price_status) and (product.price_0 > 0)) %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<button type="button" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}">{{ text_price_0 }}</button>
                        {% else %}
                            <button type="button" style="cursor: default; background-color: #eee; color: #ccc;"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}">{{ text_price_0 }}</button>
                        {% endif %}
                    {% endif %}
                {% else %}
                    <button type="button" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
                {% endif %}
            ]]></add>
        </operation>
    </file>

    <file path="catalog/controller/extension/module/{latest,special}*.php">
        <operation>
            <search><![CDATA[$data['products'] = array();]]></search>
            <add position="before"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }

                $this->load->model('setting/setting');
                $data['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('FANCYBOX'))
					{
					$this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
					define( 'FANCYBOX', 1 );
				}
                if (!defined ('so_call_for_price')){
                   
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$result['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$result['price']) {
                    $price_0 = $result['price'];
                }
                else {
                    $price_0 = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'       => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'       => $price_0,
            ]]></add>
        </operation>
    </file>

    <file path="catalog/controller/product/{category,manufacturer,search,special}*.php">
        <operation>
            <search><![CDATA[$this->load->model('tool/image');]]></search>
            <add position="after"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }
                
                $this->load->model('setting/setting');
                $data['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('so_call_for_price')){
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    //$this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$result['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$result['price']) {
                    $price_0 = $result['price'];
                } else {
                    $price_0 = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'       => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'  => $price_0,
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/product/{category,manufacturer_info,search,special}*.twig">
        <operation>
            <search index="0"><![CDATA[{{ product.price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                    {% endif %}
                {% else %}
                    {{ product.price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.tax %}]]></search>
            <add position="replace"><![CDATA[
                {% if ((product.tax) and (cfp_setting.module_so_call_for_price_status) and (product.price_0 > 0)) %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<button type="button" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}">{{ text_price_0 }}</button>
                        {% else %}
                            <button type="button" style="cursor: default; background-color: #eee; color: #ccc;"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}">{{ text_price_0 }}</button>
                        {% endif %}
                    {% endif %}
                {% else %}
                    <button type="button" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
                {% endif %}
            ]]></add>
        </operation>
    </file>

    <file path="catalog/controller/product/product.php">
        <operation>
            <search><![CDATA[$this->load->model('catalog/category');]]></search>
            <add position="before"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }
                
                $this->load->model('setting/setting');
                $data['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('so_call_for_price')){
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    //$this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$product_info['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$product_info['price']) {
                    $data['price_0'] = $product_info['price'];
                } else {
                    $data['price_0'] = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$result['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$result['price']) {
                    $price_0 = $result['price'];
                } else {
                    $price_0 = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'       => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'  => $price_0,
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/product/product.twig">
        <operation>
            <search index="0"><![CDATA[{{ price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold; font-size: 18px;"><i class="fa fa-phone" style="font-size: 18px;"></i> {{ text_price_0 }}</a>
                    {% endif %}        
                {% else %}
                    {{ price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if tax %}]]></search>
            <add position="replace"><![CDATA[
                {% if ((tax) and (cfp_setting.module_so_call_for_price_status) and (price_0 > 0)) %}
            ]]></add>
        </operation>
        <operation>
            <search index="0"><![CDATA[{{ price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                    {% endif %}
                {% else %}
                    {{ price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[{% if product.tax %}]]></search>
            <add position="replace"><![CDATA[
                {% if ((product.tax) and (cfp_setting.module_so_call_for_price_status) and (product.price_0 > 0)) %}
            ]]></add>
        </operation>
  </file>
  <file path="catalog/view/theme/*/template/product/product.twig">
        <operation>
            <search index="0"><![CDATA[<input type="button" value="{{ button_cart }}" data-loading-text="{{ text_loading }}" id="button-cart" class="btn btn-mega btn-lg">]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <input type="button" value="{{ text_price_0 }}" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" data-loading-text="{{ text_loading }}" class="btn btn-mega btn-lg callforprice">
                        {% else %}
                            <input type="button" value="{{ button_cart }}" data-loading-text="{{ text_loading }}" class="btn btn-mega btn-lg" style="cursor: default; background: #eee; color: #ccc; border: 1px solid #eee; text-shadow: none; box-shadow: none;">
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <input type="button" value="{{ text_price_0 }}" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" data-loading-text="{{ text_loading }}" class="btn btn-mega btn-lg ">
                        {% endif %}
                    {% endif %}
                {% else %}
                    <input type="button" value="{{ button_cart }}" data-loading-text="{{ text_loading }}" id="button-cart" class="btn btn-mega btn-lg" />
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<button class="addToCart btn-button" type="button" title="{{ button_cart}}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="fa fa-shopping-basket"></i><span>{{ button_cart }}</span></button>]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}">{{ text_price_0 }}</button>
                        {% else %}
                            <button type="button" style="cursor: default; background-color: #eee; color: #ccc;"><span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span> <i class="fa fa-shopping-cart"></i></button>
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button class="callforprice" type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}">{{ text_price_0 }}</button>
                        {% endif %}
                    {% endif %}
                {% else %}
                    <button class="addToCart btn-button" type="button" title="{{ button_cart}}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="fa fa-shopping-basket"></i><span>{{ button_cart }}</span></button>
                {% endif %}
            ]]></add>
        </operation>
    </file>

    <file path="catalog/controller/account/wishlist.php">
        <operation>
            <search><![CDATA[$this->load->model('tool/image');]]></search>
            <add position="after"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }
                
                $this->load->model('setting/setting');
                $data['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('so_call_for_price')){
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    //$this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$product_info['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$product_info['price']) {
                    $price_0 = $product_info['price'];
                } else {
                    $price_0 = false;
                }]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'      => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'  => $price_0,
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/account/wishlist.twig">
        <operation>
            <search index="0"><![CDATA[{{ product.price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                {% else %}
                    {{ product.price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<button type="button" onclick="cart.add('{{ product.product_id }}');" data-toggle="tooltip" title="{{ button_cart }}" class="btn btn-primary"><i class="fa fa-shopping-cart"></i></button>]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        <button type="button" class="btn btn-primary" style="cursor: default; background: #eee; color: #ccc; border: 1px solid #eee; text-shadow: none; box-shadow: none;"><i class="fa fa-shopping-cart"></i></button>
                    {% endif %}
                {% else %}
                    <button type="button" onclick="cart.add('{{ product.product_id }}');" data-toggle="tooltip" title="{{ button_cart }}" class="btn btn-primary"><i class="fa fa-shopping-cart"></i></button>
                {% endif %}
            ]]></add>
        </operation>
    </file>

    <file path="catalog/controller/product/compare.php">
        <operation>
            <search><![CDATA[$this->load->model('tool/image');]]></search>
            <add position="after"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }
                
                $this->load->model('setting/setting');
                $data['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('so_call_for_price')){
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    //$this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$product_info['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$product_info['price']) {
                    $price_0 = $product_info['price'];
                } else {
                    $price_0 = false;
                }]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'        => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'  => $price_0,
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/product/compare.twig">
        <operation>
            <search index="0"><![CDATA[{{ product.price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                    {% endif %}
                {% else %}
                    {{ product.price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<input type="button" value="{{ button_cart }}" class="btn btn-primary btn-block" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');" />]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <input type="button" value="{{ text_price_0 }}" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" class="btn btn-primary btn-block" />
                        {% else %}
                            <input type="button" value="{{ button_cart }}" class="btn btn-primary btn-block" style="cursor: default; background: #eee; color: #ccc; border: 1px solid #eee; text-shadow: none; box-shadow: none;" />
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <input type="button" value="{{ text_price_0 }}" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" class="btn btn-primary btn-block" />
                        {% endif %}
                    {% endif %}
                {% else %}
                    <input type="button" value="{{ button_cart }}" class="btn btn-primary btn-block" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');" />
                {% endif %}
            ]]></add>
        </operation>
    </file>
  	<file path="catalog/controller/extension/module/so_filter_shop_by.php">
        <operation>
            <search><![CDATA[$this->load->model('extension/module/so_filter_shop_by');]]></search>
            <add position="after"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }

                $this->load->model('setting/setting');
                $setting['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('so_call_for_price')){
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    //$this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$result['special']) {]]></search>
            <add position="before"><![CDATA[
                if ($result['price']) {
                    $price_0 = $result['price'];
                }
                else {
                    $price_0 = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'       => $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'       => $price_0,
            ]]></add>
        </operation>
    </file>
  
    <file path="catalog/view/theme/*/template/soconfig/listing.twig">
        <operation>
            <search index="0"><![CDATA[{{ product.price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                    {% endif %}
                {% else %}
                    {{ product.price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<button class="addToCart btn-button" type="button" title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="fa fa-shopping-basket"></i><span>{{ button_cart }}</span></button>]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button class="addToCart btn-button callforprice" type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}"><i class="fa fa-phone"></i><span>{{ text_price_0 }}</span></button>
                        {% else %}
                            <button class="addToCart btn-button" type="button" title="{{ button_cart}}" style="cursor: default; background-color: #eee; color: #ccc;"><i class="fa fa-shopping-basket"></i><span>{{ button_cart }}</span></button>
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button class="addToCart btn-button callforprice" type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}"><i class="fa fa-phone"></i><span>{{ text_price_0 }}</span></button>
                        {% endif %}
                    {% endif %}
                {% else %}
                    <button class="addToCart btn-button" type="button" title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="fa fa-shopping-basket"></i><span>{{ button_cart }}</span></button>
                {% endif %}
            ]]></add>
        </operation>
    </file>
    
    
	<file path="catalog/controller/extension/module/so_listing_tabs.php">
        <operation>
            <search><![CDATA[$this->load->model('extension/module/so_listing_tabs');]]></search>
            <add position="after"><![CDATA[
                if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                    $data['base'] = $this->config->get('config_ssl');
                } else {
                    $data['base'] = $this->config->get('config_url');
                }

                $this->load->model('setting/setting');
                $setting['cfp_setting'] = $this->model_setting_setting->getSetting('module_so_call_for_price');

                if (!defined ('so_call_for_price')){
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/jquery.fancybox.css');
                    //$this->document->addScript('catalog/view/javascript/so_call_for_price/js/jquery.fancybox.js');
                    $this->document->addStyle('catalog/view/javascript/so_call_for_price/css/style.css');
                    $this->document->addScript('catalog/view/javascript/so_call_for_price/js/script.js');
                    define( 'so_call_for_price', 1 );
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[if ((float)$product_info['special']) {]]></search>
            <add position="before"><![CDATA[
                if ((float)$product_info['price']) {
                    $price_0 = $product_info['price'];
                }
                else {
                    $price_0 = false;
                }
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA['price'       	=> $price,]]></search>
            <add position="after"><![CDATA[
                'price_0'       => $price_0,
            ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/extension/module/so_listing_tabs/*/default_items.twig">
        <operation>
            <search index="0"><![CDATA[{{ product.price }}]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '0' %}
                        <a data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}" href="javascript:;" class="callforprice" style="color: #ff0000; font-weight: bold;"><i class="fa fa-phone"></i> {{ text_price_0 }}</a>
                    {% endif %}
                {% else %}
                    {{ product.price }}
                {% endif %}
            ]]></add>
        </operation>
        <operation>
            <search><![CDATA[<button type="button" class="addToCart btn-button" title="{{ objlang.get('button_cart') }}" onclick="cart.add('{{ product.product_id }} ');"><i class="fa fa-shopping-basket"></i><span>{{ objlang.get('button_cart') }} </span></button>]]></search>
            <add position="replace"><![CDATA[
                {% if (cfp_setting.module_so_call_for_price_status and product.price_0 <= 0) %}
                    {% if cfp_setting.module_so_call_for_price_hide_cart is defined and cfp_setting.module_so_call_for_price_hide_cart == '0' %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button class="addToCart btn-button callforprice" type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}"><i class="fa fa-phone"></i><span>{{ text_price_0 }}</span></button>
                        {% else %}
                            <button class="addToCart btn-button" type="button" title="{{ button_cart}}" style="cursor: default; background-color: #eee; color: #ccc;"><i class="fa fa-shopping-basket"></i><span>{{ button_cart }}</span></button>
                        {% endif %}
                    {% else %}
                        {% if cfp_setting.module_so_call_for_price_replace_cart is defined and cfp_setting.module_so_call_for_price_replace_cart == '1' %}
                            <button class="addToCart btn-button callforprice" type="button" data-fancybox data-type="ajax" data-src="{{ base }}index.php?route=extension/module/so_call_for_price&product_id={{ product.product_id }}"><i class="fa fa-phone"></i><span>{{ text_price_0 }}</span></button>
                        {% endif %}
                    {% endif %}
                {% else %}
                    <button type="button" class="addToCart btn-button" title="{{ objlang.get('button_cart') }}" onclick="cart.add('{{ product.product_id }} ');"><i class="fa fa-shopping-basket"></i><span>{{ objlang.get('button_cart') }} </span></button>
                {% endif %}
            ]]></add>
        </operation>
    </file>
    
</modification>