<modification> 
    <code>Lightning</code> 
    <name>&lt;a href="../?lightning"target="_blank"&gt;OpenCart Lightning&lt;/a&gt;</name> 
	<id>OpenCart Lightning</id> 
	<version>4.25</version> 
	<author><![CDATA[MaxD http://devs.mx]]></author> 
 
    <file error="skip" path="catalog/controller/journal3/events.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if ($this->journal3->get('performanceHTMLMinify')) { ]]></search> 
            <add position="before"><![CDATA[ if (!defined("LIGHT_ENABLED")) // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session/db.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if ($query->num_rows) { ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wnh')) Wnh($session_id, $query); // Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function write($session_id ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wni')) { if (!empty($this->expire)) if (Wni($session_id, $data, $this->expire)) return true; if (!empty($this->maxlifetime)) if (Wni($session_id, $data, $this->maxlifetime)) return true; } // Lightning ]]></add> 
        </operation> 
    </file> 
 
 
    <file error="skip" path="system/library/image.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ imagedestroy($this->image); ]]></search> 
            <add position="before"><![CDATA[ if (!empty($file) && function_exists('Wnc')) Wnc($this->image, $file); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/image.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ imagecopyresampled($this->image, ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wne')) Wne($this->image); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/controller/startup/error.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if (error_reporting() === 0) { ]]></search> 
            <add position="replace"><![CDATA[ if (error_reporting() === 0 || error_reporting() === 4437) { ]]></add> 
        </operation> 
    </file> 
 
    <file path="catalog/model/tool/image.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ 'image/' . $new_image ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wmz')) Wmz($new_image); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/module/watermark/image.watermark.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ 'image/' . $new_image ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wmz')) Wmz($new_image); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file path="catalog/controller/startup/error.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if (error_reporting() === 0) { ]]></search> 
            <add position="replace"><![CDATA[ if (error_reporting() === 0 || error_reporting() === 4437) { ]]></add> 
        </operation> 
    </file> 
 
    <file path="catalog/controller/startup/startup.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if (isset($this->request->cookie['language']) ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wng') && Wng($this->request->cookie)) $code = $this->request->cookie['language']; // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file path="catalog/controller/startup/startup.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if (!empty($this->request->server['HTTP_ACCEPT_LANGUAGE']) ]]></search> 
            <add position="replace"><![CDATA[ if (function_exists('Wmn') && Wmn()) if (!empty($this->request->server['HTTP_ACCEPT_LANGUAGE']) ]]></add> 
        </operation> 
    </file> 
 
    <file path="system/engine/loader.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ __construct($registry ]]></search> 
            <add position="after"><![CDATA[ if (empty($GLOBALS["registry"])) $GLOBALS["registry"] = $registry; // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/controller/marketplace/modification.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function refresh($data = array()) { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wbv')) file_put_contents(DIR_LOGS.'ocmod.log', ''); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/controller/extension/modification.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function refresh() { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wbv')) file_put_contents(DIR_LOGS.'ocmod.log', ''); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/product/category.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $results = $this->model_catalog_category->getCategories($category_id) ]]></search> 
            <add position="after"><![CDATA[ global $light_critical_mark;if($results)$light_critical_mark.='_sub'; // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/response.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $this->addHeader('Content-Encoding: ]]></search> 
            <add position="before"><![CDATA[ if(ob_get_level()) ob_flush(); if (headers_sent()) return $data; // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3/opencart/modulecontroller.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $this->settings = $this->_cache['settings']; ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wmp')) Wmp($this->settings); // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3/utils/arr.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function get($array ]]></search> 
            <add position="after"><![CDATA[ if (is_array($array) && isset($array[$key])) return $array[$key]; // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/layout.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $result = array(); ]]></search> 
            <add position="before"><![CDATA[ if (defined('Lightning') and in_cache(NULL, "journal3_layout")) return self::$layout_data = cache(); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/layout.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ self::$layout_data = $result; ]]></search> 
            <add position="before"><![CDATA[ if (defined('Lightning')) cache($result); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ foreach ($data as $key => $value) { ]]></search> 
            <add position="replace"><![CDATA[ /* Lightning */ if (function_exists('Wkm')) Wkm($template, $data); else foreach ($data as $key => $value) { ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/template.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ private $adaptor; ]]></search> 
            <add position="replace"><![CDATA[ public $adaptor; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/template/*.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ private $data ]]></search> 
            <add position="replace"><![CDATA[ public $data ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/template/twig.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function render($filename, $code ]]></search> 
            <add position="after"><![CDATA[ if(function_exists('Wko')){try{$r=Wko($filename,$this->data,$code);if($r!==-1)return $r;}catch(\Exception$e){}} //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/template/twig.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function render($template ]]></search> 
            <add position="after"><![CDATA[ if(function_exists('Wko')){try{$r=Wko($template,$this->data);if($r!==-1)return $r;}catch(\Exception$e){}} //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3/settings.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function load ]]></search> 
            <add position="after"><![CDATA[ $this->short = function_exists('Wkp') && Wkp(); //Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function get( ]]></search> 
            <add position="after"><![CDATA[ if (!empty($this->short) && isset($this->settings[$key])) return $this->settings[$key]; //Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function getIn( ]]></search> 
            <add position="after"><![CDATA[ if (!empty($this->short) && isset($context['module' . $key])) return $context['module' . $key]; //Lightning ]]></add> 
        </operation> 
    </file> 
 
 
 
    <file error="skip" path="admin/controller/marketplace/modification.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ function refresh( ]]></search> 
            <add position="after"><![CDATA[ foreach (array("config_error_display", "config_error_log", "error_display", "error_log") as $key) $this->config->set($key, 0); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/tool/image.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ function resize($filename, $width, $height  ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wkj') && $r = Wkj($filename, $width, $height)) return $r; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/localisation/language.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $language_data = $this->cache->get('language');  ]]></search> 
            <add position="before"><![CDATA[ if (defined("VERSION") && VERSION >= "3") $language_data = $this->cache->get('catalog.language'); else //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/model/localisation/language.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $language_data = $this->cache->get('language');  ]]></search> 
            <add position="before"><![CDATA[ if (defined("VERSION") && VERSION >= "3") $language_data = $this->cache->get('admin.language'); else //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/mail.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ public function send() {  ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wkf') && Wkf($this)) return; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function controller($route, $data = array()) { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wkh') and !empty($route) and Wkh($route)) return; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cache.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if (is_file(DIR_SYSTEM . 'library/journal3/vendor/SuperCache ]]></search> 
            <add position="before"><![CDATA[ if (!function_exists('Wdu') or Wdu($key)) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ private function applyTax ]]></search> 
            <add position="replace"><![CDATA[ public function applyTax ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $this->dbQuery($sql, 'PRODUCTS')->rows;  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wik')) return Wik($this, $sql); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function getProducts($filter_data ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wjc')) { $r = Wjc($this, 0, $filter_data); if ($r!=-1) return $r; } //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $row = $this->dbQuery($sql, 'PRICE')->row; ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wjf')) Wjf($row); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return $this->dbQuery($sql, 'CATEGORIES')->rows; ]]></search> 
            <add position="replace"><![CDATA[ // return $this->dbQuery($sql, 'CATEGORIES')->rows; 
                $results = $this->dbQuery($sql, 'CATEGORIES')->rows; 
                return $results; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return $this->dbQuery($sql, 'MANUFACTURERS')->rows; ]]></search> 
            <add position="replace"><![CDATA[ // return $this->dbQuery($sql, 'MANUFACTURERS')->rows; 
                $results = $this->dbQuery($sql,  'MANUFACTURERS')->rows; 
                return $results; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return $this->dbQuery($sql, 'PRODUCTS')->rows; ]]></search> 
            <add position="replace"><![CDATA[ // return $this->dbQuery($sql, 'PRODUCTS')->rows; 
                $results = $this->dbQuery($sql,  'PRODUCTS')->rows; 
                return $results; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return $this->dbQuery($sql, 'TOTAL_PRODUCTS')->row['total']; ]]></search> 
            <add position="replace"><![CDATA[ // return $this->dbQuery($sql, 'TOTAL_PRODUCTS')->row['total']; 
                $results = $this->dbQuery($sql, 'TOTAL_PRODUCTS')->row['total']; 
                return $results; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $results; ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wjf')) Wjf($results); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ private function addFilters  ]]></search> 
            <add position="before"><![CDATA[ function lightning_between($price) { $min = (float)$this->undoTax($price["min"], "min"); $max = (float)$this->undoTax($price["max"], "max");if (is_numeric($price["min"]) && is_numeric($price["max"])) return "BETWEEN $min AND $max"; elseif (is_numeric($price["min"])) return ">= $min"; elseif (is_numeric($price["max"])) return "<= $max"; } //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if (Arr::get($filter_data, 'sort') === 'ps.price') {  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wij')) if (($r = Wij($this, $filter_data)) !== 0) return $r; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function getTotalProducts() {  ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Win') && 0 < $r = Win($this)) return $r; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/filter.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $sql .= $this->addFilters(static::$filter_data  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wjc')) { $r = Wjc($this); if ($r!=-1) return $r; } if (!function_exists('Wio') or !Wio($this, $sql)) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/checkout/cart.php"> 
        <operation error="log"> 
            <search position="before"><![CDATA[ $json['total'] =  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wbr')) { global $light_modify_cart; if (!$light_modify_cart) $cht=1; else if (VERSION<"2.0") $cht=$this->getChild('module/cart'); else $cht=$this->load->controller('common/cart'); Wbr($cht); } //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/error/not_found.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ data['continue'] = ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Whz')) Whz("error/not_found"); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/product/product.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ setTitle($this->language->get('text_error' ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Whz')) Whz("product/not_found"); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/product/category.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ setTitle($this->language->get('text_error' ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Whz')) Whz("category/not_found"); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cache/file.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $handle = fopen($files[0], 'r'); ]]></search> 
            <add position="after"><![CDATA[ if (!$handle || !filesize($files[0])) return false; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cache/file.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if (file_exists($file)) { ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('lightning_delete')) lightning_delete($file); else //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/controller/common/developer.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if (is_dir($directory)) { ]]></search> 
            <add position="replace"><![CDATA[ if (is_dir($directory) and !glob($directory.'/*')) { ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal2/product.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $products = array_slice($products, 0, $limit); ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wgo')) Wgo($products); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/product.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $product_ids = $this->getProductIds(explode(',', Arr::get($this->request->cookie ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wgo')) Wgo($product_ids); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/journal3/product.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $product_ids = $this->getProductIds($recently_viewed) ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wgo')) Wgo($product_ids); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3.php|system/library/journal3/journal3.php|system/library/journal3/opencart/*.php|catalog/controller/journal3/*"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[uniqid(]]></search> 
            <add position="replace"><![CDATA[light_uid(]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/config.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ class Config ]]></search> 
            <add position="before"><![CDATA[ 
function light_uid($prefix) { 
    if (function_exists('Wgo')) { static $id; return $prefix.$id++; } 
    return uniqid ($prefix); 
} 
]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ public function isAdmin() { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wgt') && Wgt()) return false; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/product/category.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $data['pagination'] = ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wgh')) Wgh($category_info); //Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $data['sort'] = $sort; ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wgh')) Wgh($category_info, $limit); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/controller/product/product.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function index() { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wga')) Wga(); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart/cart.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function add( ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wmv') && Wmv()) return; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart/cart.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function getProducts() {  ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wmv') && Wmv()) return array(); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart/cart.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if ($this->customer->getId()) ]]></search> 
            <add position="replace"><![CDATA[ if (!function_exists('Wjk') || !Wjk()) if ($this->customer->getId()) ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function clear( ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wbr')) Wbr(); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function getProducts() {  ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wmv') && Wmv()) return array(); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if ($this->customer->getId()) ]]></search> 
            <add position="replace"><![CDATA[ if (!function_exists('Wjk') || !Wjk()) if ($this->customer->getId()) ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $controller = new $class($this->registry); ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfa')) Wfa($route, $data); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function __construct($route) { ]]></search> 
            <add position="after"><![CDATA[ $this->lid = $route; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function execute($registry, array ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfa')) { $p = Wfa($this->route, $args); if ($r = Wfv()) return $r;}//Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return call_user_func_array ]]></search> 
            <add position="replace"><![CDATA[ $r = call_user_func_array ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $r = call_user_func_array ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfw')) Wfw($this->route, $p, $r); return $r; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function __construct($route, $args = array()) { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfa')) Wfa($route, $args); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/config.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function has($key) { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfc')) Wfc($key); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ trigger('model/' . $trigger . '/before' ]]></search> 
            <add position="after"><![CDATA[ if (!$result && function_exists('Wfn')) if (($output = Wfn($route, $args)) === -1) { unset($output);} if (!isset($output)) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ trigger('model/' . $route . '/before' ]]></search> 
            <add position="after"><![CDATA[ if (isset($registry) && !$result && function_exists('Wfn')) if (($res = Wfn($route, $args)) !== -1) { return $res; } //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $output = call_user_func_array($callable, $args); ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfn')) Wfn($route, $args, $output); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3/url.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if ($this->config_ssl && $secure) { ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wci')) { Wf_($route, $args); $r = Wci($lpr = Wfm(func_get_args())); if ($r!==-1) {if (function_exists('Wah')) Wah($route, $r); return $r;}}  //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3/url.php"> 
        <operation error="log"> 
            <search position="replace"><![CDATA[ return $link; ]]></search> 
            <add position="replace"><![CDATA[/* Lightning */ { if (function_exists('Wah') and !empty($lpr)) Wah($route, $link); return $link; } ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/journal3/url.php"> 
        <operation error="log"> 
            <search position="replace"><![CDATA[ return static::$links[$link]; ]]></search> 
            <add position="replace"><![CDATA[/* Lightning */ { if (function_exists('Wah') and !empty($lpr)) { Wah($route, static::$links[$link]); Wci($lpr, static::$links[$link]);} return static::$links[$link]; } ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/url.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function link( ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wci')) { Wf_($route, $args); $r = Wci($lpr = Wfm(func_get_args())); if ($r!==-1) {if (function_exists('Wah')) Wah($route, $r); return $r;}}  //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/url.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return $this->rewrite($url); ]]></search> 
            <add position="replace"><![CDATA[  $url = $this->rewrite($url); 
                            return $url; ]]></add> 
        </operation> 
    </file> 
 
    <file error="log" path="system/library/url.php"> 
        <operation error="log"> 
            <search position="replace"><![CDATA[ return $url; ]]></search> 
            <add position="replace"><![CDATA[/* Lightning */ { if (function_exists('Wah') and !empty($lpr)) { Wah($route, $url); Wci($lpr, $url);} return $url; } ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/controller.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $this->output;  ]]></search> 
            <add position="before"><![CDATA[ static $li_lock; if (function_exists('Wbo') and !$li_lock) { $li_lock = 1; while ($c=Wbo($this->template, $this->output)) $this->output .= $this->getChild($c); $li_lock = 0; } //Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ function getChild  ]]></search> 
            <add position="before"><![CDATA[ function getChildHtml($child,$args) { return $this->getChild($child,$args); } //Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $controller->output;  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wlk')) { Wlk($child, $args, $controller->output);}  //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="log"> 
            <search position="before"><![CDATA[ class Action ]]></search> 
            <add position="before"><![CDATA[ 
if (defined('DIR_CATALOG') && !empty($_POST) && (empty($_GET['route']) || $_GET['route'] == 'common/login')) { $f = DIR_CACHE . 'lightning_llt'; $d = ''; if (isset($_SERVER['HTTP_ACCEPT'])) $d .= $_SERVER['HTTP_ACCEPT']; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) $d .= $_SERVER['HTTP_ACCEPT_LANGUAGE']; if (is_file($f) && filemtime($f) >= time() - 3 && file_get_contents($f) == $d) { file_put_contents($f, $d); exit; }file_put_contents($f, $d);} if (file_exists($li = DIR_APPLICATION.'controller/extension/lightning/gamma.php')) require_once($li); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $this->session_id = $this->createId(); ]]></search> 
            <add position="before"><![CDATA[ if (!function_exists('Wlx') || !Wlx()) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if (!session_id()) { ]]></search> 
            <add position="before"><![CDATA[ if (!function_exists('Wlx') || !Wlx()) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ if ($this->adaptor && !session_id()) { ]]></search> 
            <add position="before"><![CDATA[ if (!function_exists('Wlx') || !Wlx()) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ $this->data = ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wfb')) Wfb($this->data); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ session_set_save_handler( ]]></search> 
            <add position="before"><![CDATA[ if (!session_id() && (!function_exists('Wlx') || !Wlx())) //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/session.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function close() { ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wjk') && Wjk()) return; //Lightning ]]></add> 
        </operation> 
    </file> 
	 
    <file error="skip" path="admin/model/localisation/currency.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $curl = curl_init(); ]]></search> 
            <add position="before"><![CDATA[ if (isset($query) and !$query->rows) return; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/controller/common/header.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $data['description'] = ]]></search> 
            <add position="before"><![CDATA[ if (defined('DIR_CATALOG')) { $data['show_lightning'] = $this->user->hasPermission('modify', 'setting/setting'); if( $data['no_lightning'] = !is_file(DIR_CATALOG.'controller/extension/lightning/gamma.php')) $data['show_lightning'] = 0; if (!empty($this->request->get['j_edit'])) $data['show_lightning'] = 0; } //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/controller/common/header.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $this->data['description'] = ]]></search> 
            <add position="before"><![CDATA[ if (defined('DIR_CATALOG')) { $this->data['show_lightning'] = $this->user->hasPermission('modify', 'setting/setting'); if( $this->data['no_lightning'] = !is_file(DIR_CATALOG.'controller/extension/lightning/gamma.php')) $this->data['show_lightning'] = 0; } //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.twig"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ <ul class="nav navbar-nav navbar-right"> ]]></search> 
            <add position="before"><![CDATA[ <!-lightning-> ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.twig"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ <ul class="nav pull-right"> ]]></search> 
            <add position="before"><![CDATA[ <!-lightning-> ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.twig"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ <li class="nav-item dropdown"> ]]></search> 
            <add position="before"><![CDATA[ <!-lightning-> ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.twig"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ <!-lightning-> ]]></search> 
            <add position="replace"><![CDATA[ {% if show_lightning %}<ul class="nav pull-left"><!-light-><style type="text/css"> #lightning_container { margin-top: 18px !important; padding-left: 16px !important; } </style></ul> {% endif %}{% if no_lightning %}<a href="https://lightning.devs.mx/lightning-files-missing-message" target="_blank" style="color:red; text-decoration: underline; padding: 10px">OpenCart Lightning files missing!</a>{% endif %} ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.tpl"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ <head ]]></search> 
            <add position="before"><![CDATA[ 
            <?php global $os; if ($os) $text_help = '' ?> 
            ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ <ul class="nav pull-right ]]></search> 
            <add position="before"><![CDATA[ <ul class="nav pull-left"><!-lightning-><style type="text/css"> #lightning_container { margin-top: 11px !important; margin-right: 20px; } </style></ul> ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ <div class="div3"> ]]></search> 
            <add position="before"><![CDATA[ <style type="text/css"> #lightning { display: inline-block; list-style: none; padding-top: 12px; padding-left: 48px; } </style><!-lightning-> ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before" offset="1"><![CDATA[ <a class="dropdown-stores tooltip" ]]></search> 
            <add position="before" offset="1"><![CDATA[ <div class="div2"><!-lightning-></div> ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.tpl"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ <!-lightning-> ]]></search> 
            <add position="replace"><![CDATA[ <?php if ($show_lightning) { ?><!-light-><?php } ?><?php if ($no_lightning) { ?><a href="https://lightning.devs.mx/lightning-files-missing-message" target="_blank" style="color:red; text-decoration: underline; padding: 10px">OpenCart Lightning files missing!</a><?php } ?> ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.tpl"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ <!-light-> ]]></search> 
            <add position="replace"><![CDATA[ 
             <link rel="stylesheet" type="text/css" href="//lightning.devs.mx/service/css/tetha4.css?v=1" /> 
 
              <li id="lightning"></li> 
              <iframe id="lightning_popup"></iframe> 
              <script type="text/javascript"> 
 
                  var lu = true; 
                  var lv = true; 
                  var lt = false; 
 
                  function Upp(url) { 
                        $('#santa_messenger').hide(); 
                        $('#lightning_popup').attr('src', url); 
                        $('#lightning_popup').fadeIn(500); 
                    } 
 
                    window.addEventListener("message", function(event) 
                    { 
                        if (event.data !== "close_li_frame")  return; 
                        $('#lightning_popup').attr('src', ''); 
                        $('#lightning_popup').hide(); 
                        window.focus(); 
                    }, false); 
 
                  function Ul() { 
                      if (!lu) return; 
                      if (!lv) return; 
                      lu = false; 
                      $.get('../index.php?li_op=t&rd='+Date.now(),false, function(data) { 
                          if (data.indexOf("lightning_menu")==-1) 
                                $('#lightning').html("Go to <strong>Extensions</strong> -> <strong>Modifications</strong> and press <strong>Refresh</strong>"); 
                          else { 
                           $('#lightning').html(data); 
                          } 
                      },"html").done(function() { lu = true; }); 
                  } 
 
                  function li_live() { 
                    $(".li_logos").css("-webkit-filter", "brightness(100%)"); 
                    $(".li_req" ).each(function(index) { 
                      var live = $(this).hasClass("li_req_live"); 
                      var time = $(this).find(".li_live_time"); 
                      var t = +time.html(); 
                      t = parseFloat(t + 0.1); 
 
                      if (t>0) 
                         $(this).find(".li_req_bar").css("width", 40*t); 
                      else if (t<0 && !live) { 
                        $(this).css("margin-left", ((5+t)*10)+"px"); 
                      } 
                      if (t==0) 
                       if (live) $(this).show(); 
                       else { 
                         $(this).css("background", "none").css("border", "none"); 
                         $(this).find(".li_req_on").remove(); 
                         $(this).find(".li_req_bar").remove(); 
                         $(this).animate({height:0, padding:0, margin:0},300); 
                         return; 
                       } 
                      var ft = +$(this).find(".li_time").html(); 
                      if (ft && t>=ft) { 
                        t = -5; 
                        $(this).removeClass("li_req_live"); 
                        $(this).find(".li_req_bar").css("width", 40*ft); 
                        if (!$("#li_percent").length) { 
                            $(".lightning_bar strong").html(ft + " sec"); 
                            var width = 190 / 5 * ft + 10; 
                            if (width>200) width = 200; 
                            var color = "#9e3c3c"; 
                            if (ft<2) color = "#3065b5"; 
                            else if (ft<4) color = "#82701b"; 
                            $("#li_bar").css("width", width + "px").css("background-color", color); 
                            $(".li_logos").css("-webkit-filter", "brightness(120%)"); 
                        } 
                      } 
                      time.html(t.toFixed(1)); 
                    }); 
                  } 
 
                  $(document).ready(function(){ 
                      setInterval('Ul()', 5000); 
                      Ul(); 
                      setInterval('li_live()', 100); 
                      li_live(); 
                      if (window.location.href.indexOf("route=catalog/product/") > -1) $('button[type=\'submit\']').off('click'); 
                  }); 
 
                  $(window).focus(function() { 
                        lv = true; 
                        Ul(); 
                    }); 
 
                    $(window).blur(function() { 
                        lv = false; 
                    }); 
 
                    var li_genx = false; 
 
        function li_gen() { 
                li_genx = true; 
                $.get('../index.php?li_op=gen&cd='+Date.now(),false, function(data) { 
 
                if (data === "OK") { 
                    li_gen(); 
                    return; 
                } 
 
                data = jQuery.parseJSON(data); 
 
                if (!data) { 
                    $('#li_percent').html(100); 
                    $('#li_bar').css('width','200px'); 
                    li_genx = false; 
                    return; 
                } 
 
                if (typeof data['width'] !== 'undefined') { 
                    $('#li_bar').css('width', data['width']); 
                    $('#li_percent').html(data['percent']); 
                } 
 
                $('#li_pages').html(data['pages']); 
                $('#li_psize').html(data['psize']); 
                li_gen(); 
            }, 'text').fail(function() {li_genx = false;}); 
        } 
              </script> 
    ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="admin/view/template/common/header.twig"> 
        <operation error="log"> 
            <search position="replace"><![CDATA[ <!-light-> ]]></search> 
            <add position="replace"><![CDATA[ 
             <link rel="stylesheet" type="text/css" href="//lightning.devs.mx/service/css/tetha4.css?v=1" /> 
 
              <li id="lightning" style="position: absolute; z-index: 100"></li> 
              <iframe id="lightning_popup"></iframe> 
              <script type="text/javascript"> 
 
                  var lu = true; 
                  var lv = true; 
                  var lt = false; 
 
                  function Upp(url) { 
                        $('#santa_messenger').hide(); 
                        $('#lightning_popup').attr('src', url); 
                        $('#lightning_popup').fadeIn(500); 
                    } 
 
                    window.addEventListener("message", function(event) 
                    { 
                        if (event.data !== "close_li_frame")  return; 
                        $('#lightning_popup').attr('src', ''); 
                        $('#lightning_popup').hide(); 
                        window.focus(); 
                    }, false); 
 
                  function Ul() { 
                      if (!lu) return; 
                      if (!lv) return; 
                      lu = false; 
                      $.get('../index.php?li_op=t&rd='+Date.now(),false, function(data) { 
                          if (data.indexOf("lightning_menu")==-1) 
                                $('#lightning').html("Go to <strong>Extensions</strong> -> <strong>Modifications</strong> and press <strong>Refresh</strong>"); 
                          else { 
                           $('#lightning').html(data); 
                          } 
                      },"html").done(function() { lu = true; }); 
                  } 
 
                  function li_live() { 
                    $(".li_logos").css("-webkit-filter", "brightness(100%)"); 
                    $(".li_req" ).each(function(index) { 
                      var live = $(this).hasClass("li_req_live"); 
                      var time = $(this).find(".li_live_time"); 
                      var t = +time.html(); 
                      t = parseFloat(t + 0.1); 
 
                      if (t>0) 
                         $(this).find(".li_req_bar").css("width", 40*t); 
                      else if (t<0 && !live) { 
                        $(this).css("margin-left", ((5+t)*10)+"px"); 
                      } 
                      if (t==0) 
                       if (live) $(this).show(); 
                       else { 
                         $(this).css("background", "none").css("border", "none"); 
                         $(this).find(".li_req_on").remove(); 
                         $(this).find(".li_req_bar").remove(); 
                         $(this).animate({height:0, padding:0, margin:0},300); 
                         return; 
                       } 
                      var ft = +$(this).find(".li_time").html(); 
                      if (ft && t>=ft) { 
                        t = -5; 
                        $(this).removeClass("li_req_live"); 
                        $(this).find(".li_req_bar").css("width", 40*ft); 
                        if (!$("#li_percent").length) { 
                            $(".lightning_bar strong").html(ft + " sec"); 
                            var width = 190 / 5 * ft + 10; 
                            if (width>200) width = 200; 
                            var color = "#9e3c3c"; 
                            if (ft<2) color = "#3065b5"; 
                            else if (ft<4) color = "#82701b"; 
                            $("#li_bar").css("width", width + "px").css("background-color", color); 
                            $(".li_logos").css("-webkit-filter", "brightness(120%)"); 
                        } 
                      } 
                      time.html(t.toFixed(1)); 
                    }); 
                  } 
 
                  $(document).ready(function(){ 
                      setInterval('Ul()', 5000); 
                      Ul(); 
                      setInterval('li_live()', 100); 
                      li_live(); 
                      if (window.location.href.indexOf("route=catalog/product/") > -1) $('button[type=\'submit\']').off('click'); 
                  }); 
 
                  $(window).focus(function() { 
                        lv = true; 
                        Ul(); 
                    }); 
 
                    $(window).blur(function() { 
                        lv = false; 
                    }); 
 
                    var li_genx = false; 
 
        function li_gen() { 
            li_genx = true; 
            $.get('../index.php?li_op=gen&cd='+Date.now(),false, function(data) { 
 
                if (data === "OK") { 
                    li_gen(); 
                    return; 
                } 
 
                data = jQuery.parseJSON(data); 
 
                if (!data) { 
                    $('#li_percent').html(100); 
                    $('#li_bar').css('width','200px'); 
                    li_genx = false; 
                    return; 
                } 
 
                if (typeof data['width'] !== 'undefined') { 
                    $('#li_bar').css('width', data['width']); 
                    $('#li_percent').html(data['percent']); 
                } 
 
                $('#li_pages').html(data['pages']); 
                $('#li_psize').html(data['psize']); 
                li_gen(); 
            }, 'text').fail(function() {li_genx = false;}); 
        } 
              </script> 
    ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/tool/online.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ line( ]]></search> 
            <add  position="after"><![CDATA[ if (function_exists('Wbt') and Wbt()) return; // Lightning  ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/front.php"> 
        <operation error="log"> 
            <search position="replace"><![CDATA[ while ($action]]></search> 
            <add position="replace"><![CDATA[ /* Lightning */ if (function_exists('Wll')) Wll();  if (function_exists('Wal')) Wal(); /* END */ while ($action]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/router.php"> 
        <operation error="log"> 
            <search position="replace"><![CDATA[ while ($action]]></search> 
            <add position="replace"><![CDATA[ /* Lightning */ if (function_exists('Wll')) Wll();  if (function_exists('Wal')) Wal(); /* END */ while ($action]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/db*.php"> 
        <operation error="log"> 
            <search position="before"><![CDATA[ class D ]]></search> 
            <add position="before"><![CDATA[ if (defined("LIGHT_ENABLED") or (!defined("LIGHT_FRONTEND") and !file_exists(DIR_LOGS.'cv'))) {if (defined('DIR_CATALOG')) $b = DIR_CATALOG; else $b = DIR_APPLICATION; $b .= 'controller/extension/lightning/beta.php'; if (file_exists($b)) require_once $b;} // Lightning ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ _construct ]]></search> 
            <add position="after"><![CDATA[ if ($database == DB_DATABASE) { global $db; $db = $this; if (function_exists('Wbu')) { $this->db = Wbu(); $this->adaptor = $this->db; $this->driver = $this->db; return; }} // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/config.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function set($key, $value) { ]]></search> 
            <add position="after"><![CDATA[  if (function_exists('Wds')) Wds($key, $value); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ return $action->execute($this->registry); ]]></search> 
            <add position="replace"><![CDATA[ $output = $action->execute($this->registry); 
                                            return $output; ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function controller(  ]]></search> 
            <add position="after"><![CDATA[ $li_aj = 1; if (!isset($data) && isset($args)) $data = $args; //Lightning]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $output;  ]]></search> 
            <add position="before"><![CDATA[ if (isset($li_view) && function_exists('Wbo')) { if (empty($route)) $route = $template; Wbo($route, $output);}  //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function view(  ]]></search> 
            <add position="after"><![CDATA[ $li_view = 1; //Lightning]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/loader.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $output;  ]]></search> 
            <add position="before"><![CDATA[ if (isset($li_aj) && function_exists('Wlk')) Wlk($route, $data, $output); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/account/wishlist.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ return $query->row['total'];  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Weh') and ($r=Weh($query->row['total']))) return $r; //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart/customer.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if (isset($this->session->data['customer_id']))  ]]></search> 
            <add position="replace"><![CDATA[ /* Lightning */ if (function_exists('Wbn') and ($t=Wbn())) { $this->customer_id = $t["customer_id"]; $this->firstname = $t["firstname"]; $this->lastname = $t["lastname"]; $this->email = $t["email"]; $this->customer_group_id = 1; } else if (isset($this->session->data['customer_id'])) ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/customer.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ if (isset($this->session->data['customer_id']))  ]]></search> 
            <add position="replace"><![CDATA[ /* Lightning */ if (function_exists('Wbn') and ($t=Wbn())) { $this->customer_id = $t["customer_id"]; $this->firstname = $t["firstname"]; $this->lastname = $t["lastname"]; $this->email = $t["email"]; $this->customer_group_id = 1; } else if (isset($this->session->data['customer_id'])) ]]></add> 
        </operation> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $this->session->data['customer_id'] = $customer_query->row['customer_id'];  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wbs')) Wbs($customer_query->row); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/cart/customer.php"> 
        <operation error="skip"> 
            <search position="before"><![CDATA[ $this->session->data['customer_id'] = $customer_query->row['customer_id'];  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wbs')) Wbs($customer_query->row); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/response.php"> 
        <operation error="log"> 
            <search position="before"><![CDATA[ echo $ou  ]]></search> 
            <add position="before"><![CDATA[ if (function_exists('Wt')) if (Wt()) return; //Lightning]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/response.php"> 
        <operation error="log"> 
            <search position="before"><![CDATA[ $this->level = $level;  ]]></search> 
            <add position="before"><![CDATA[ global $light_ob; if (!$light_ob) //Lightning]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/library/request.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ $this->server =  ]]></search> 
            <add position="after"><![CDATA[ if (isset($this->server["REQUEST_METHOD"]) && $this->server["REQUEST_METHOD"] == "POST" && isset($this->get["route"]) && defined('HTTP_CATALOG') && function_exists('Wco')) Wco($this->get["route"]); //Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/catalog/product.php"> 
        <operation error="skip"> 
            <search position="replace"><![CDATA[ public function getTotalProducts($data = array()) { ]]></search> 
            <add position="replace"><![CDATA[ public function getTotalProducts($data = array()) 
             { ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/catalog/product.php"> 
        <operation error="skip"> 
            <search position="replace" offset="1"><![CDATA[ public function getTotalProducts($data = array()) ]]></search> 
            <add position="replace" offset="1"><![CDATA[ public function getTotalProducts($data = array()) { ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="catalog/model/catalog/product.php"> 
        <operation error="log"> 
            <search position="after"><![CDATA[ function getTotalProducts( ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wdn') and ($r=Wdn(func_get_args()))>=0) return $r; // Lightning ]]></add> 
        </operation> 
    </file> 
 
    <file error="skip" path="system/engine/action.php"> 
        <operation error="skip"> 
            <search position="after"><![CDATA[ function execute($registry, array ]]></search> 
            <add position="after"><![CDATA[ if (function_exists('Wkn') and Wkp()) return Wkn($args, $this->route, $this->method); //Lightning ]]></add> 
        </operation> 
    </file> 
 
</modification> 