Your IP : 216.73.216.95


Current Path : /var/www/alh/vqmod/xml/
Upload File :
Current File : /var/www/alh/vqmod/xml/e_wallet.xml

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>E Wallet</id>
<version>1.0.0.0</version>
<author>Hitinfotech.com</author>
<file name="admin/controller/common/column_left.php">
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[public function index() {]]></search>
		<add position="after"><![CDATA[
			$thisvar = $this->octlversion();
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[$marketing = array();]]></search>
		<add position="before"><![CDATA[
			if($thisvar >= 3000) {
				$token_string = 'user_token=' . $this->session->data['user_token'];
			}else{
				$token_string = 'token=' . $this->session->data['token'];
			}
				$e_wallet = array();
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Transaction'),
							'href'     =>  $this->url->link('e_wallet/e_wallet/transaction', $token_string, true),
							'children' => array()		
						);	
					}
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   =>$this->language->get('Add Transaction'),
							'href'     => $this->url->link('e_wallet/e_wallet/add', $token_string, true),
							'children' => array()		
						);
					}
				
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {	
						$e_wallet[] = array(
							'name'	   => $this->language->get('Add Money Requests'),
							'href'     => $this->url->link('e_wallet/e_wallet/add_request', $token_string, true),
							'children' => array()		
						);
					}
					
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Voucher List'),
							'href'     => $this->url->link('e_wallet/e_wallet/vouchar_list', $token_string, true),
							'children' => array()		
						);
					}
					
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Customer List'),
							'href'     => $this->url->link('e_wallet/e_wallet/customers', $token_string, true),
							'children' => array()		
						);
					}
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Withdraw Requests'),
							'href'     => $this->url->link('e_wallet/e_wallet/withdraw_request', $token_string, true),
							'children' => array()		
						);
					}
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Module Setting'),
							'href'     => $this->url->link('extension/module/e_wallet', $token_string, true),
							'children' => array()		
						);
					}
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Payment Setting'),
							'href'     => $this->url->link('extension/payment/e_wallet_payment', $token_string, true),
							'children' => array()		
						);
					}
					if ($this->user->hasPermission('access', 'e_wallet/e_wallet')) {
						$e_wallet[] = array(
							'name'	   => $this->language->get('Total Setting'),
							'href'     => $this->url->link('extension/total/e_wallet_total', $token_string, true),
							'children' => array()		
						);
					}
					if ($e_wallet) {
						$data['menus'][] = array(
							'id'       => 'e_wallet',
							'icon'	   => 'fa-credit-card', 
							'name'	   => $this->language->get('E-Wallet'),
							'href'     => '',
							'children' => $e_wallet
						);	
					}	
		]]></add>
	</operation>
</file>
<file name="catalog/controller/extension/module/account.php">
	<operation error="log">
		<search position="after"><![CDATA[$data['recurring'] = $this->url->link('account/recurring', '', true);]]></search>
		<add position="after"><![CDATA[	
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}		 
		$data['e_wallet_status'] = $this->config->get($module_key.'e_wallet_status');
		list($data['e_account_title']) = $this->lg('e_account_text');
		$data['e_wallet'] = $this->url->link('account/e_wallet', '', true);
		  ]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index()]]></search>
		<add position="before"><![CDATA[	
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		protected function lg($keys = ''){
			$module_key = '';
			if($this->octlversion() >= 3000) $module_key = 'module_';

			$language_id = $this->config->get('config_language_id');
			$ls = $this->config->get($module_key.'e_wallet_language');

			if(!is_array($keys)) $keys = array($keys);
			$is_acco = array_keys($keys) !== range(0, count($keys) - 1);

			$return = array();
			foreach ($keys as $key => $value){
				if($is_acco) $new_value = $value;
				else $new_value = $key = $value;

			  	if(isset($ls[$language_id]) && !empty($ls[$language_id][$key])){
			  		$new_value = $ls[$language_id][$key];
			  	}
			  	$return[] = $new_value;
			}
			return $return;
		}
		  ]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/extension/module/account.tpl">
	<operation error="log">
		<search position="after"><![CDATA[<?php echo $text_password; ?></a>]]></search>
		<add position="after"><![CDATA[
		<?php if($e_wallet_status){ ?>			
			<a href="<?php echo $e_wallet; ?>" class="list-group-item"><?php echo $e_account_title; ?></a>			
		<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/controller/module/account.php">
	<operation error="log">
		<search position="after"><![CDATA[$data['heading_title'] = $this->language->get('heading_title');]]></search>
		<add position="after"><![CDATA[	
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}		 
		$data['e_wallet_status'] = $this->config->get($module_key.'e_wallet_status');
		list($data['e_account_title']) = $this->lg('e_account_text');
		$data['e_wallet'] = $this->url->link('account/e_wallet', '', true);
		  ]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index()]]></search>
		<add position="before"><![CDATA[	
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		protected function lg($keys = ''){
			$module_key = '';
			if($this->octlversion() >= 3000) $module_key = 'module_';

			$language_id = $this->config->get('config_language_id');
			$ls = $this->config->get($module_key.'e_wallet_language');

			if(!is_array($keys)) $keys = array($keys);
			$is_acco = array_keys($keys) !== range(0, count($keys) - 1);

			$return = array();
			foreach ($keys as $key => $value){
				if($is_acco) $new_value = $value;
				else $new_value = $key = $value;

			  	if(isset($ls[$language_id]) && !empty($ls[$language_id][$key])){
			  		$new_value = $ls[$language_id][$key];
			  	}
			  	$return[] = $new_value;
			}
			return $return;
		}
		  ]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/module/account.tpl">
	<operation error="log">
		<search position="after"><![CDATA[<?php echo $text_password; ?></a>]]></search>
		<add position="after"><![CDATA[
		<?php if($e_wallet_status){ ?>			
			<a href="<?php echo $e_wallet; ?>" class="list-group-item"><?php echo $e_account_title; ?></a>			
		<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/controller/account/account.php">
	<operation error="log">
		<search position="after"><![CDATA[$data['recurring'] = $this->url->link('account/recurring', '', true);]]></search>
		<add position="after"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}		 
		$data['e_wallet_status'] = $this->config->get($module_key.'e_wallet_status');
		list($data['e_account_title']) = $this->lg('e_account_text');
		$data['e_wallet'] = $this->url->link('account/e_wallet', '', true);]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index()]]></search>
		<add position="before"><![CDATA[	
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		protected function lg($keys = ''){
			$module_key = '';
			if($this->octlversion() >= 3000) $module_key = 'module_';
			$language_id = $this->config->get('config_language_id');
			$ls = $this->config->get($module_key.'e_wallet_language');

			if(!is_array($keys)) $keys = array($keys);
			$is_acco = array_keys($keys) !== range(0, count($keys) - 1);

			$return = array();
			foreach ($keys as $key => $value){
				if($is_acco) $new_value = $value;
				else $new_value = $key = $value;

			  	if(isset($ls[$language_id]) && !empty($ls[$language_id][$key])){
			  		$new_value = $ls[$language_id][$key];
			  	}
			  	$return[] = $new_value;
			}
			return $return;
		}
		  ]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/account/account.twig">
	<operation error="log">
		<search position="before"><![CDATA[<li><a href="{{ address }}">]]></search>
		<add><![CDATA[
		{% if e_wallet_status %}
			<li><a href="{{ e_wallet }}"> {{ e_account_title }}</a></li>
		{% endif %}
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/extension/module/account.twig">
	<operation error="log">
		<search position="after"><![CDATA[{{ text_password }}</a>]]></search>
		<add><![CDATA[
		{% if e_wallet_status %}
			<a href="{{ e_wallet }}" class="list-group-item">{{ e_account_title }}</a>
		{% endif %}
		]]></add>
	</operation>
</file>
<file name="catalog/language/*/checkout/checkout.php">
	<operation error="log">
		<search position="after"><![CDATA[<?php]]></search>
		<add position="after"><![CDATA[
		$_['text_e_wallet_payment'] = 'Add Money';
		$_['text_e_account'] = 'Account';
		$_['text_payment'] = 'Payment Method';
		$_['text_confirm'] = 'Confirm';
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/account/account.tpl">
	<operation error="log">
		<search position="after"><![CDATA[<li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>]]></search>
		<add position="after"><![CDATA[
		<?php if($e_wallet_status){ ?>
			<li><a href="<?php echo $e_wallet; ?>"><?php echo $e_account_title; ?></a></li>
		<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/controller/checkout/cart.php">
	<operation error="log">
		<search position="after"><![CDATA[public function add() {]]></search>
		<add position="after"><![CDATA[
			if(isset($this->session->data['vouchers_key'])){
				unset($this->session->data['vouchers'][$this->session->data['vouchers_key']]);
				unset($this->session->data['vouchers_key']);
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[$data['vouchers'][] = array(]]></search>
		<add position="replace"><![CDATA[
			$thumb = false;
			if(isset($voucher['image']) && $voucher['image']){
				$thumb = $voucher['image'];
			}
			$data['vouchers'][] = array(
				'thumb' => $thumb,
		]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[$data['checkout'] = $this->url->link('checkout/checkout', '', true);]]></search>
		<add position="replace"><![CDATA[
			if(isset($this->session->data['vouchers_key']) AND $this->session->data['vouchers_key']=='e_wallet_vouchers'){
				$data['checkout'] = $this->url->link('checkout/e_checkout', '', true);
			}else{
				$data['checkout'] = $this->url->link('checkout/checkout', '', true);
			}
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/checkout/cart.tpl">
	<operation error="log">
		<search position="replace"><![CDATA[<td></td>]]></search>
		<add position="replace"><![CDATA[
			<?php if(isset($voucher['thumb'])){ ?>
			<td>
				<img src="<?php echo $voucher['thumb']; ?>" alt="<?php echo $voucher['description']; ?>" title="<?php echo $voucher['description']; ?>" class="img-thumbnail" />
			</td>
			<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/checkout/cart.twig">
	<operation error="log">
		<search position="replace"><![CDATA[<td></td>]]></search>
		<add><![CDATA[
			{% if voucher.thumb is defined %}
			<td>
				<img src="{{ voucher.thumb }}" alt="{{ voucher.description }}" title="{{ voucher.description }}" class="img-thumbnail" />
			</td>
			{% endif %}
		]]></add>
	</operation>
</file>
<file name="catalog/controller/checkout/checkout.php">
	<operation error="log">
		<search position="after"><![CDATA[public function index() {]]></search>
		<add position="after"><![CDATA[
		unset($this->session->data['use_e_wallet']);
		if(isset($this->session->data['vouchers_key']) && $this->session->data['vouchers_key']=='e_wallet_vouchers'){
			$this->response->redirect($this->url->link('checkout/e_checkout', '', true));
		}
		]]></add>
	</operation>
</file>
<file name="catalog/controller/common/header.php">
	<operation error="log">
		<search position="after"><![CDATA[public function index() {]]></search>
		<add position="after"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}	
		$data['e_wallet_status'] = $this->config->get($module_key.'e_wallet_status');
		if($this->config->get($module_key.'e_wallet_status')){
			$this->load->model('tool/image');
			$data['e_wallet_url'] = $this->url->link('account/e_wallet');
			$data['e_wallet_icon_url'] = $this->model_tool_image->resize($this->config->get($module_key.'e_wallet_icon'), 30,30);
			list($data['e_title']) = $this->lg('title');
			$this->load->model('account/e_wallet');
			$balance = $this->model_account_e_wallet->getBalance();

			if(isset($this->session->data['currency'])){
				$config_currency =$this->session->data['currency'];				
			}else{
				$config_currency =$this->config->get('config_currency');				
			}
			$data['balance'] = $this->currency->format($balance,$config_currency);
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index()]]></search>
		<add position="before"><![CDATA[	
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		protected function lg($keys = ''){
			$module_key = '';
			if($this->octlversion() >= 3000) $module_key = 'module_';

			$language_id = $this->config->get('config_language_id');
			$ls = $this->config->get($module_key.'e_wallet_language');

			if(!is_array($keys)) $keys = array($keys);
			$is_acco = array_keys($keys) !== range(0, count($keys) - 1);

			$return = array();
			foreach ($keys as $key => $value){
				if($is_acco) $new_value = $value;
				else $new_value = $key = $value;

			  	if(isset($ls[$language_id]) && !empty($ls[$language_id][$key])){
			  		$new_value = $ls[$language_id][$key];
			  	}
			  	$return[] = $new_value;
			}
			return $return;
		}
		  ]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/common/header.tpl">
	<operation error="log">
		<search position="before" index="1"><![CDATA[<?php echo $cart; ?></div>]]></search>
		<add position="before"><![CDATA[
			<?php if($e_wallet_status){ ?>
			<div class="col-sm-1" style="padding: 0;text-align: center;">
		      	<div style="max-width: 100%;z-index: 10;position: relative;display: inline-block;">
		      		<a href="<?php echo $e_wallet_url ?>" style="display: flex;">
			      		<div style="float: left;line-height: 42px;">
			      			<img src="<?php echo $e_wallet_icon_url; ?>" />
			      		</div>
			      		<div style="float: left;margin-left: 5px;line-height: 21px;text-align: left;">
			      			<div style="font-size: 14px;"><?php echo $e_title; ?></div>
		      				<div><b><span style="font-size: 17px;" ><?php echo $balance ?></span></b></div>
			      		</div>
			      	</a>
		      	</div>
	        </div>
	        <?php } ?>
       ]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[<div class="col-sm-5"><?php echo $search; ?>]]></search>
		<add position="replace"><![CDATA[
			<?php if($e_wallet_status){ ?>
				<div class="col-sm-4 col-xs-9"><?php echo $search; ?>
			<?php }else{ ?>
				<div class="col-sm-5"><?php echo $search; ?>
			<?php } ?>
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[<li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>]]></search>
		<add position="after"><![CDATA[
			<?php if($e_wallet_status){ ?>
				<li><a href="<?php echo $e_wallet_url; ?>"><?php echo $e_title; ?></a></li>
			<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/journal2/headers/default.tpl">
	<operation error="log">
		<search position="before"><![CDATA[<div class="journal-cart j-min xs-100 sm-100 md-33 lg-25 xl-25">]]></search>
		<add position="before"><![CDATA[
			<?php if($e_wallet_status){ ?>
			<div class="journal-wallet j-min xs-100 sm-100 md-100 lg-66 xl-66" style="padding: 0;text-align: center;">
		      	<div style="max-width: 100%;z-index: 10;position: relative;display: inline-block;">
		      		<a href="<?php echo $e_wallet_url ?>" style="display: flex;">
			      		<div style="float: left;line-height: 42px;">
			      			<img src="<?php echo $e_wallet_icon_url; ?>" />
			      		</div>
			      		<div style="float: left;margin-left: 5px;line-height: 21px;text-align: left;">
			      			<div style="font-size:14px;"><?php echo $e_title; ?></div>
		      				<div><b><span style="font-size: 17px;"><?php echo $balance ?></span></b></div>
			      		</div>
			      	</a>
		      	</div>
	        </div>
	        <?php } ?>
       ]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[<div class="col-sm-5"><?php echo $search; ?>]]></search>
		<add position="replace"><![CDATA[
			<?php if($e_wallet_status){ ?>
				<div class="col-sm-4"><?php echo $search; ?>
			<?php }else{ ?>
				<div class="col-sm-5"><?php echo $search; ?>
			<?php } ?>
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[<li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>]]></search>
		<add position="after"><![CDATA[
			<?php if($e_wallet_status){ ?>
				<li><a href="<?php echo $e_wallet_url; ?>"><?php echo $e_title; ?></a></li>
			<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/*/template/common/header.twig">
	<operation error="log">
		<search position="before" index="1"><![CDATA[{{ cart }}</div>]]></search>
		<add position="before"><![CDATA[
			{% if e_wallet_status %}  
			<div class="col-sm-1" style="padding: 0;text-align: center;">
		      	<div style="max-width: 100%;z-index: 10;position: relative;display: inline-block;">
		      		<a href="{{ e_wallet_url }}" style="display: flex;">
			      		<div style="float: left;line-height: 42px;">
			      			<img src="{{ e_wallet_icon_url }}" />
			      		</div>
			      		<div style="float: left;margin-left: 5px;line-height: 21px;text-align: left;">
			      			<div style="font-size: 14px;">{{ e_title }}</div>
		      				<div><b><span style="font-size: 17px;" >{{ balance }}</span></b></div>
			      		</div>
			      	</a>
		      	</div>
	        </div>
	        {% endif %}
       ]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[<div class="col-sm-5">{{ search }}]]></search>
		<add position="replace"><![CDATA[
			{% if e_wallet_status %} 
				<div class="col-sm-4 col-xs-9">{{ search }}
			{% else %}
				<div class="col-sm-5">{{ search }}
			{% endif %}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[<li><a href="{{ account }}">{{ text_account }}</a></li>]]></search>
		<add position="after"><![CDATA[
			{% if e_wallet_status %}
				<li><a href="{{ e_wallet_url }}">{{ e_title }}</a></li>
			{% endif %}
		]]></add>
	</operation>
</file>
<file name="system/library/cart/cart.php">
	<operation error="log">
		<search position="after"><![CDATA[$registry->get('weight');]]></search>
		<add position="after"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}
		$this->request = $registry->get('request');
		if($this->config->get($payment_key.'e_wallet_payment_status') && isset($this->request->post['payment_method'], $this->request->post['use_e_wallet']) && $this->request->post['payment_method'] != 'e_wallet_payment' ){
			if((bool)$this->request->post['use_e_wallet']){
				$this->session->data['use_e_wallet'] = true;
			}else{
				$this->session->data['use_e_wallet'] = false;
			}
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function __construct($registry) {]]></search>
		<add position="before"><![CDATA[	
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		  ]]></add>
	</operation>
</file>
<file name="system/library/cart.php">
	<operation error="log">
		<search position="after"><![CDATA[$registry->get('weight');]]></search>
		<add position="after"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}
		$this->request = $registry->get('request');
		if($this->config->get($payment_key.'e_wallet_payment_status') && isset($this->request->post['payment_method'], $this->request->post['use_e_wallet']) && $this->request->post['payment_method'] != 'e_wallet_payment' ){
			if((bool)$this->request->post['use_e_wallet']){
				$this->session->data['use_e_wallet'] = true;
			}else{
				$this->session->data['use_e_wallet'] = false;
			}
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function __construct($registry) {]]></search>
		<add position="before"><![CDATA[	
		protected function octlversion(){
	    	$varray = explode('.', VERSION);
	    	return (int)implode('', $varray);
		}
		  ]]></add>
	</operation>
</file>
<file name="catalog/model/checkout/order.php">
	<operation error="log">
		<search position="after"><![CDATA[$order_info = $this->getOrder($order_id);]]></search>
		<add position="after"><![CDATA[
			$this->load->model('extension/payment/e_wallet_payment');
			$check = $this->model_extension_payment_e_wallet_payment->get_order_history($order_info,$order_id, $order_status_id, $comment, $notify);
			if(!$check) return false;
		]]></add>
	</operation>
</file>
<file name="admin/controller/common/menu.php">
	<operation error="log">
		<search position="before"><![CDATA[$data['home'] = $this->url->link]]></search>
		<add position="before"><![CDATA[
		$data['text_e_wallet']                 = $this->language->get('E-Wallet');
		$data['text_e_wallet_transaction']     = $this->language->get('e_wallet_transaction');
		$data['text_e_wallet_add_transaction'] = $this->language->get('e_wallet_add_transaction');
		$data['text_e_wallet_add_request']     = $this->language->get('e_wallet_add_request');
		$data['text_e_wallet_customers']       = $this->language->get('e_wallet_customers');
		$data['text_e_wallet_withdraw_req']    = $this->language->get('e_wallet_withdraw_req');
		$data['text_vouchar_list']             = $this->language->get('text_vouchar_list');
		$data['text_e_wallet_setting']         = $this->language->get('text_e_wallet_setting');
		$data['text_payment_setting']          = $this->language->get('text_payment_setting');
		$data['text_total_setting']            = $this->language->get('text_total_setting');
	
		
		
		$data['e_wallet_transaction']     = $this->url->link('e_wallet/e_wallet/transaction', 'token=' . $this->session->data['token'], 'SSL');
		$data['e_wallet_add_transaction'] = $this->url->link('e_wallet/e_wallet/add', 'token=' . $this->session->data['token'], 'SSL');
		$data['e_wallet_add_request']     = $this->url->link('e_wallet/e_wallet/add_request', 'token=' . $this->session->data['token'], 'SSL');
		$data['e_wallet_customers']       = $this->url->link('e_wallet/e_wallet/customers', 'token=' . $this->session->data['token'], 'SSL');
		$data['e_wallet_withdraw_req']    = $this->url->link('e_wallet/e_wallet/withdraw_request', 'token=' . $this->session->data['token'], 'SSL');
		$data['vouchar_list']             = $this->url->link('e_wallet/e_wallet/vouchar_list','token=' . $this->session->data['token'], 'SSL');
		$data['e_wallet_setting']         = $this->url->link('module/e_wallet','token=' . $this->session->data['token'], 'SSL');
		$data['payment_setting']          = $this->url->link('payment/e_wallet_payment','token=' . $this->session->data['token'], 'SSL');
		$data['total_setting']            = $this->url->link('total/e_wallet_total','token=' . $this->session->data['token'], 'SSL');
		
		]]></add>
	</operation>
</file>
<file name="admin/language/*/common/menu.php">
	<operation error="log">
		<search position="before"><![CDATA[$_['text_affiliate']]]></search>
		<add position="before"><![CDATA[
		$_['e_wallet']                 = 'E Wallet';
		$_['e_wallet_transaction']     = 'Transaction';
		$_['e_wallet_add_transaction'] = 'Add Transaction';
		$_['e_wallet_add_request']     = 'Add Money Requests';
		$_['e_wallet_customers']       = 'Customers Balance';
		$_['e_wallet_withdraw_req']    = 'Withdraw Requests';
		$_['text_e_wallet_setting']    = 'Module Settings';
		$_['text_payment_setting']     = 'Payment Settings';
		$_['text_total_setting']       = 'Total Settings';
		$_['text_vouchar_list']        =  'Vouchar List';
		]]></add>
	</operation>
</file>
<file name="admin/view/template/common/menu.tpl">
	<operation error="log">
		<search position="before"><![CDATA[<li id="system"><a class="parent">]]></search>
		<add position="before"><![CDATA[
			<li id="e_wallet"><a class="parent"><i class="fa fa-credit-card"></i> <span><?php echo $text_e_wallet; ?></span></a>
			<ul>
				<li><a href ="<?php echo $e_wallet_transaction; ?>"><?php echo $text_e_wallet_transaction; ?></a></li>
				<li><a href ="<?php echo $e_wallet_customers; ?>"><?php echo $text_e_wallet_customers; ?></a></li>
				<li><a href ="<?php echo $e_wallet_add_transaction; ?>"><?php echo $text_e_wallet_add_transaction; ?></a></li>
				<li><a href ="<?php echo $e_wallet_add_request; ?>"><?php echo $text_e_wallet_add_request; ?></a></li>
				<li><a href ="<?php echo $e_wallet_withdraw_req; ?>"><?php echo $text_e_wallet_withdraw_req; ?></a></li>
				<li><a href ="<?php echo $vouchar_list ?>"><?php echo $text_vouchar_list; ?></a></li>
				<li><a href ="<?php echo $e_wallet_setting; ?>"><?php echo $text_e_wallet_setting; ?></a></li>
				<li><a href ="<?php echo $payment_setting; ?>"><?php echo $text_payment_setting; ?></a></li>
				<li><a href ="<?php echo $total_setting; ?>"><?php echo $text_total_setting; ?></a></li>
			</ul>
		</li>
		]]></add>
	</operation>
</file>
<file name="catalog/language/*/checkout/success.php">
	<operation error="log">
		<search position="before"><![CDATA[$_['text_customer']]]></search>
		<add position="before"><![CDATA[
		$_['text_e_wallate']        = '<p>Your Add Money in "%s" has been successfully processed!</p><p>You can view your Add Money history by going to the <a href="%s">my account</a> page and by clicking on <a href="%s">history</a>.</p><p>Please direct any questions you have to the <a href="%s">store owner</a>.</p><p>Thanks for Add Money with us online!</p>';
		]]></add>
	</operation>
</file>
<file name="catalog/controller/checkout/success.php">
	<operation error="log">
		<search position="after"><![CDATA[public function index() {]]></search>
		<add position="after"><![CDATA[
		if(isset($this->session->data['e_msg']) && $this->session->data['e_msg'] && !isset($this->session->data['order_id'])){
			unset($this->session->data['e_msg']);
			$this->response->redirect($this->url->link('common/home', '', true));
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[$this->cart->clear();]]></search>
		<add position="after"><![CDATA[
		$this->session->data['e_msg'] = false;
		$this->load->model('account/order');
		$vouchers = $this->model_account_order->getOrderVouchers($this->session->data['order_id']);
		if(count($vouchers) == 1){
			$vouchers = $vouchers[0];
			if($vouchers['to_name'] == 'e_wallet_vouchers'){
				$this->session->data['e_msg'] = true;
			}
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[$data['continue'] = $this->url->link('common/home');]]></search>
		<add position="after"><![CDATA[
		$thisvar = $this->octlversion();
			if($thisvar >= 3000) {
				$payment_key = 'payment_';
				$module_key = 'module_';
				$total_key = 'total_';
			}else{
				$payment_key = $module_key = $total_key = '';
			}
		if($this->session->data['e_msg'] && $this->config->get($module_key.'e_wallet_status')){
			$this->load->language('account/e_wallet');
			$add_money_msg = $this->language->get('add_money_msg');
			list($data['wallet_title']) = $this->lg('title');
			$data['breadcrumbs'] = array();
			$data['breadcrumbs'][] = array(
				'text' => $this->language->get('text_home'),
				'href' => $this->url->link('common/home')
			);
			$data['breadcrumbs'][] = array(
				'text' => "Account",
				'href' => $this->url->link('account/account')
			);
			$data['breadcrumbs'][] = array(
				'text' => $data['wallet_title'],
				'href' => $this->url->link('account/e_wallet', '', true)
			);
			$data['breadcrumbs'][] = array(
				'text' => $this->language->get('text_success'),
				'href' => $this->url->link('checkout/success')
			);
			$data['heading_title'] = $add_money_msg;
			$data['text_message'] = sprintf($this->language->get('text_e_wallate'), $data['wallet_title'], $this->url->link('account/account', '', true), $this->url->link('account/e_wallet', '', true), $this->url->link('information/contact'));
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
			protected function octlversion(){
		    	$varray = explode('.', VERSION);
		    	return (int)implode('', $varray);
			}
			protected function lg($keys = ''){
				$module_key = '';
				if($this->octlversion() >= 3000) $module_key = 'module_';

				$language_id = $this->config->get('config_language_id');
				$ls = $this->config->get($module_key.'e_wallet_language');

				if(!is_array($keys)) $keys = array($keys);
				$is_acco = array_keys($keys) !== range(0, count($keys) - 1);

				$return = array();
				foreach ($keys as $key => $value){
					if($is_acco) $new_value = $value;
					else $new_value = $key = $value;

				  	if(isset($ls[$language_id]) && !empty($ls[$language_id][$key])){
				  		$new_value = $ls[$language_id][$key];
				  	}
				  	$return[] = $new_value;
				}
				return $return;
			}
		]]></add>
	</operation>
</file>
<file name="catalog/controller/checkout/payment_method.php">
	<operation error="log">
		<search position="after"><![CDATA[if ($this->config->get('payment_' . $result['code'] . '_status')) {]]></search>
		<add position="after"><![CDATA[
			$thisvar = $this->octlversion();
			if($thisvar >= 3000) {
				$payment_key = 'payment_';
				$module_key = 'module_';
				$total_key = 'total_';
			}else{
				$payment_key = $module_key = $total_key = '';
			}	
			$data['wallet_status'] = $this->config->get($module_key.'e_wallet_status');
			$add_money_payment = $this->config->get($module_key.'e_wallet_payments');
			$add_money_payment = $add_money_payment ? $add_money_payment : array();
			$refer = isset($this->request->server['HTTP_REFERER']) ? $this->request->server['HTTP_REFERER'] : $this->request->server['REQUEST_URI'];
			if((int)$data['wallet_status']){
				if(strpos($refer, 'checkout/e_checkout') !== false && !in_array($result['code'],$add_money_payment)){
					continue;
				}
				$allow_payments = $this->config->get($module_key.'e_wallet_checkout_payments');
				$allow_payments = $allow_payments ? $allow_payments : array();
				if(strpos($refer, 'checkout/checkout') !== false && !in_array($result['code'], $allow_payments) && $result['code'] !== 'e_wallet_payment'){
					continue;
				}	
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after" index="2"><![CDATA[if ($this->config->get($result['code'] . '_status')) {]]></search>
		<add position="after" index="2"><![CDATA[
			$thisvar = $this->octlversion();
			if($thisvar >= 3000) {
				$payment_key = 'payment_';
				$module_key = 'module_';
				$total_key = 'total_';
			}else{
				$payment_key = $module_key = $total_key = '';
			}	
			$data['wallet_status'] = $this->config->get($module_key.'e_wallet_status');
			$add_money_payment = $this->config->get($module_key.'e_wallet_payments');
			$add_money_payment = $add_money_payment ? $add_money_payment : array();
			if((int)$data['wallet_status']){
				if(strpos($this->request->server['HTTP_REFERER'], 'checkout/e_checkout') !== false && !in_array($result['code'],$add_money_payment)){
					continue;
				}
				$allow_payments = $this->config->get($module_key.'e_wallet_checkout_payments');
				$allow_payments = $allow_payments ? $allow_payments : array();
				if(strpos($this->request->server['HTTP_REFERER'], 'checkout/checkout') !== false && !in_array($result['code'], $allow_payments) && $result['code'] !== 'e_wallet_payment'){
					continue;
				}	
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
			protected function octlversion(){
		    	$varray = explode('.', VERSION);
		    	return (int)implode('', $varray);
			}
		]]></add>
	</operation>
</file>
<file name="catalog/controller/event/compatibility.php">
	<operation error="log">
		<search position="replace"><![CDATA[. 'model/' . $route . '.php']]></search>
		<add position="replace"><![CDATA[
			.'model/' . ((strpos($route,'get') !== false) ? dirname($route) : $route) . '.php'
		]]></add>
	</operation>
</file>
<file name="admin/view/template/common/dashboard.tpl">
	<operation error="log">
		<search position="before" index="2"><![CDATA[<div class="row">]]></search>
		<add position="before"><![CDATA[
		<?php if(isset($e_wallet_status)) echo $e_wallet ; ?>
		]]></add>
	</operation>
</file>
<file name="admin/view/template/common/dashboard.twig">
	<operation error="log">
		<search position="before" index="2"><![CDATA[<div class="row">]]></search>
		<add position="before"><![CDATA[
		{% if e_wallet_status %} {{ e_wallet }}  {% endif %}
		]]></add>
	</operation>
</file>
<file name="admin/controller/common/dashboard.php">
	<operation error="log">
		<search position="before"><![CDATA[$sort_order = array();]]></search>
		<add position="before"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}
		$data['e_wallet_status'] = $this->config->get($module_key.'e_wallet_status');
		if($data['e_wallet_status'])
		$dashboards[] = array(
						'code'       => 'e_wallet',
						'width'      => '12',
						'sort_order' => '5',
						'output'     => $this->load->controller('extension/dashboard/e_wallet')
					);		
		
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[$data['online'] = $this->load->controller('dashboard/online');]]></search>
		<add position="before"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}
		$data['e_wallet_status']=$this->config->get($module_key.'e_wallet_status');
		if($data['e_wallet_status'])
		$data['e_wallet'] = $this->load->controller('dashboard/e_wallet');
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
			protected function octlversion(){
		    	$varray = explode('.', VERSION);
		    	return (int)implode('', $varray);
			}
		]]></add>
	</operation>
</file>
<file name="admin/controller/sale/order.php">
	<operation error="log">
		<search position="after"><![CDATA[public function info() {]]></search>
		<add position="after"><![CDATA[
		$thisvar = $this->octlversion();
		if($thisvar >= 3000) {
			$payment_key = 'payment_';
			$module_key = 'module_';
			$total_key = 'total_';
		}else{
			$payment_key = $module_key = $total_key = '';
		}
		if($thisvar >= 3000) {
				$token_string = 'user_token=' . $this->session->data['user_token'];
			}else{
				$token_string = 'token=' . $this->session->data['token'];
			}
		$this->load->language('sale/order');
		$data['refund_id'] = is_array($this->config->get($module_key."e_wallet_refund_order_id"));	
		$data['text_wallet_text'] = $this->language->get('text_wallet_text');	 
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
			protected function octlversion(){
		    	$varray = explode('.', VERSION);
		    	return (int)implode('', $varray);
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[$data['commission']]]></search>
		<add position="before"><![CDATA[
			$data['wallet_status'] = $this->config->get($module_key.'e_wallet_status');
			$o_id = $this->request->get['order_id'];
			$refunds = $this->config->get($module_key.'e_wallet_refund_order_id');
			$refunds = is_array($refunds) ? $refunds : array();
			$per = DB_PREFIX;
			$e_total = $this->db->query("SELECT order_id,value FROM  `{$per}order_total` WHERE  `order_id` = '{$o_id}' AND code = 'e_wallet_total'");
			$amount = 0;
			$data['refund_amount'] = array();
			if($refunds && $order_info['payment_code'] == 'e_wallet_payment'){
				$amount=abs($order_info['total']);
			}elseif($e_total->num_rows){
				$amount=abs($e_total->row['value']);
			}
			if($refunds){
				$data['refund_amount'] = array(
					'amount' => $this->currency->format($amount, $order_info['currency_code'], $order_info['currency_value']),
					'link'   => html_entity_decode($this->url->link('e_wallet/e_wallet/add', $token_string.'&order_id='.$this->request->get['order_id'], 'SSL'), ENT_QUOTES, 'UTF-8'),
				);
			}
		]]></add>
	</operation>
</file>
<file name="admin/language/*/sale/order.php">
	<operation error="log">
		<search position="after"><![CDATA[$_['text_picklist']              = 'Dispatch Note';]]></search>
		<add position="after"><![CDATA[$_['text_wallet_text']           = 'Wallet refund Total';]]></add>
	</operation>
</file>
<file name="admin/view/template/sale/order_info.twig">
	<operation error="log">
		<search position="before" index="2"><![CDATA[</tbody>]]></search>
		<add position="before"><![CDATA[
			  {% if wallet_status %}
			        <tr>
		                <td>{{ text_value }}{{ text_wallet_text }}</td>
		                <td class="text-right">{{ refund_amount.amount }}</td>
		                <td class="text-right"><a href="{{ refund_amount.link }}" id="refund_click" style="float:right;"><button data-toggle="tooltip"  class="btn btn-success btn-xs"><i class="fa fa-plus-circle"></i></button></a></td>
		            </tr>
		     {% endif %}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[$(document).delegate('#button-reward-add', 'click', function() {]]></search>
		<add position="before"><![CDATA[
			$(document).delegate('#refund_click', 'click', function(e) {
  				if (!confirm('This order has been refunded once, do you still want to refund it?')) return false;
			});
		]]></add>
	</operation>
</file>
<file name="admin/view/template/sale/order_info.tpl">
	<operation error="log">
		<search position="before" index="2"><![CDATA[</tbody>]]></search>
		<add position="before"><![CDATA[
			  <?php if ($wallet_status) { ?>
			        <tr>
		                <td><?php echo $text_wallet_text; ?></td>
		                <td class="text-right"><?php echo $refund_amount['amount']; ?></td>
		                <td class="text-right"><a href="<?php echo $refund_amount['link']; ?>" id="refund_click" style="float:right;"><button data-toggle="tooltip" class="btn btn-success btn-xs"><i class="fa fa-plus-circle"></i></button></a></td>
		            </tr>
		     <?php } ?>
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[$(document).delegate('#button-reward-add', 'click', function() {]]></search>
		<add position="before"><![CDATA[
			$(document).delegate('#refund_click', 'click', function(e) {
  				if (!confirm('This order has been refunded once, do you still want to refund it?')) return false;
			});
		]]></add>
	</operation>
</file>
<file name="catalog/controller/journal2/checkout.php">
	<operation error="log">
		<search position="after"><![CDATA[public function index() {]]></search>
		<add position="after"><![CDATA[
			$thisvar = $this->octlversion();
			if($thisvar >= 3000) {
				$payment_key = 'payment_';
				$module_key = 'module_';
				$total_key = 'total_';
			}else{
				$payment_key = $module_key = $total_key = '';
			}
			unset($this->session->data['use_e_wallet']);
			if(isset($this->session->data['vouchers_key']) && $this->session->data['vouchers_key']=='e_wallet_vouchers'){
				$this->response->redirect($this->url->link('checkout/e_checkout', '', true));
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[public function payment($return = false) {]]></search>
		<add position="after"><![CDATA[
			$thisvar = $this->octlversion();
			if($thisvar >= 3000) {
				$payment_key = 'payment_';
				$module_key = 'module_';
				$total_key = 'total_';
			}else{
				$payment_key = $module_key = $total_key = '';
			}
			unset($this->session->data['use_e_wallet']);
			if(isset($this->session->data['vouchers_key']) && $this->session->data['vouchers_key']=='e_wallet_vouchers'){
				$this->response->redirect($this->url->link('checkout/e_checkout', '', true));
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
			protected function octlversion(){
		    	$varray = explode('.', VERSION);
		    	return (int)implode('', $varray);
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before" index='1'><![CDATA[if ($this->config->get('config_checkout_id')) {]]></search>
		<add position="before"><![CDATA[
		if($this->config->get($payment_key.'e_wallet_payment_status') && isset($this->request->post['use_e_wallet']) && $this->request->post['payment_method'] != 'e_wallet_payment'){
			$this->session->data['use_e_wallet'] = true;
		}]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[if (!$this->data['payment_methods']) {]]></search>
		<add position="before"><![CDATA[
		    foreach ($this->data['payment_methods'] as $result) {
	           $thisvar = $this->octlversion();
	            if($thisvar >= 3000) {
	                $payment_key = 'payment_';
	                $module_key = 'module_';
	                $total_key = 'total_';
	            }else{
	                $payment_key = $module_key = $total_key = '';
	            }   
	            $this->data['wallet_status'] = $this->config->get($module_key.'e_wallet_status');
	            $add_money_payment = $this->config->get($module_key.'e_wallet_payments');
	            $add_money_payment = $add_money_payment ? $add_money_payment : array();
	            $refer = isset($this->request->server['HTTP_REFERER']) ? $this->request->server['HTTP_REFERER'] : $this->request->server['REQUEST_URI'];
	            if((int)$this->data['wallet_status']){
	                if(strpos($refer, 'checkout/e_checkout') !== false && !in_array($result['code'],$add_money_payment)){
	                   unset($result['payment_methods'][$result['code']]);
	                }
	                $allow_payments = $this->config->get($module_key.'e_wallet_checkout_payments');
	                $allow_payments = $allow_payments ? $allow_payments : array();
	                if(strpos($refer, 'checkout/checkout') !== false && !in_array($result['code'], $allow_payments) && $result['code'] !== 'e_wallet_payment'){
	                    unset($this->data['payment_methods'][$result['code']]);
	                }   
	            }
        }]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal2/template/journal2/checkout/checkout.tpl">
	<operation error="log">
		<search position="before"><![CDATA[payment_method: value]]></search>
		<add position="before"><![CDATA[
		use_e_wallet: $('[name="use_e_wallet"]').prop('checked'),]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal2/template/journal2/headers/default.twig">
	<operation error="log">
		<search position="before"><![CDATA[<div class="journal-search j-min xs-100 sm-50 md-50 lg-33 xl-33">]]></search>
		<add position="before"><![CDATA[
			{% if e_wallet_status %} 
			<div class="col-sm-1" style="padding: 0;text-align: center;">
		      	<div style="max-width: 100%;z-index: 10;position: relative;display: inline-block;">
		      		<a href="{{ e_wallet_url }}" style="display: flex;">
			      		<div style="float: left;line-height: 42px;">
			      			<img src="{{ e_wallet_icon_url }}" />
			      		</div>
			      		<div style="float: left;margin-left: 5px;line-height: 21px;text-align: left;">
			      			<div style="font-size: 14px;">{{ e_wallet_title }}</div>
		      				<div><b><span style="font-size: 17px;" >{{ balance }}</span></b></div>
			      		</div>
			      	</a>
		      	</div>
	        </div>
	        <?php } ?>
       ]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[<div class="col-sm-5">{{ search }}]]></search>
		<add position="replace"><![CDATA[
			{% if e_wallet_status %}
				<div class="col-sm-4">{{ search }}
			{% else %}
				<div class="col-sm-5">{{ search }}
			{% endif %}
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[<li><a href="{{ account }}">{{ text_account }}</a></li>]]></search>
		<add position="after"><![CDATA[
			{% if e_wallet_status %}
				<li><a href="{{ e_wallet_url }}">{{ e_wallet_title }}</a></li>
			{% endif %}
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal2/template/journal2/headers/default.tpl">
	<operation error="log">
		<search position="before"><![CDATA[<div class="journal-search j-min xs-100 sm-50 md-50 lg-33 xl-33">]]></search>
		<add position="before"><![CDATA[
			<?php if($e_wallet_status){ ?>
			<div class="journal-wallet j-min xs-100 sm-100 md-100 lg-66 xl-66" style="padding: 0;text-align: center;">
		      	<div style="max-width: 100%;z-index: 10;position: relative;display: inline-block;">
		      		<a href="<?php echo $e_wallet_url ?>" style="display: flex;">
			      		<div style="float: left;line-height: 42px;">
			      			<img src="<?php echo $e_wallet_icon_url; ?>" />
			      		</div>
			      		<div style="float: left;margin-left: 415px;line-height: 21px;text-align: left;">
			      			<div style="font-size: 14px;"><?php echo $e_title ?></div>
		      				<div><b><span style="font-size: 17px;"><?php echo $balance ?></span></b></div>
			      		</div>
			      	</a>
		      	</div>
	        </div>
	        <?php } ?>
       ]]></add>
	</operation>
	<operation error="log">
		<search position="replace"><![CDATA[<div class="col-sm-5"><?php echo $search; ?>]]></search>
		<add position="replace"><![CDATA[
			<?php if($e_wallet_status){ ?>
				<div class="col-sm-4"><?php echo $search; ?>
			<?php }else{ ?>
				<div class="col-sm-5"><?php echo $search; ?>
			<?php } ?>
		]]></add>
	</operation>
	<operation error="log">
		<search position="after"><![CDATA[<li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>]]></search>
		<add position="after"><![CDATA[
			<?php if($e_wallet_status){ ?>
				<li><a href="<?php echo $e_wallet_url; ?>"><?php echo $e_wallet_title; ?></a></li>
			<?php } ?>
		]]></add>
	</operation>
</file>
<file name="catalog/controller/journal3/checkout.php">
	<operation error="log">
		<search position="after"><![CDATA[$total_items = $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0);]]></search>
		<add position="after"><![CDATA[
			foreach ($this->session->data['payment_methods'] as $p_method) {
			$thisvar = $this->octlversion();
			if($thisvar >= 3000) {
				$payment_key = 'payment_';
				$module_key = 'module_';
				$total_key = 'total_';
			}else{
				$payment_key = $module_key = $total_key = '';
			}	
			$data['wallet_status'] = $this->config->get($module_key.'e_wallet_status');
			$add_money_payment = $this->config->get($module_key.'e_wallet_payments');
			$add_money_payment = $add_money_payment ? $add_money_payment : array();

			$refer = isset($this->request->server['HTTP_REFERER']) ? $this->request->server['HTTP_REFERER'] : $this->request->server['REQUEST_URI'];

			if((int)$data['wallet_status']){
				if(strpos($refer, 'checkout/e_checkout') !== false && !in_array($p_method['code'],$add_money_payment)){
					unset($this->session->data['payment_methods'][$p_method['code']]);
				}
				$allow_payments = $this->config->get($module_key.'e_wallet_checkout_payments');
				$allow_payments = $allow_payments ? $allow_payments : array();
				if(strpos($refer, 'checkout/checkout') !== false && !in_array($p_method['code'], $allow_payments) && $p_method['code'] !== 'e_wallet_payment'){
					unset($this->session->data['payment_methods'][$p_method['code']]);
				}	
			} 
		}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[public function index() {]]></search>
		<add position="before"><![CDATA[
			protected function octlversion(){
		    	$varray = explode('.', VERSION);
		    	return (int)implode('', $varray);
			}
		]]></add>
	</operation>
	<operation error="log">
		<search position="before"><![CDATA[$data = $this->model_journal3_checkout->update();]]></search>
		<add><![CDATA[
		if($this->config->get('payment_e_wallet_payment_status') && Arr::get($this->request->post, 'order_data.use_wallet') && Arr::get($this->request->post, 'order_data.payment_code') != 'e_wallet_payment'){
			$this->session->data['use_e_wallet'] = true;
		}else{
			$this->session->data['use_e_wallet'] = false;
		}]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal3/template/journal3/checkout/checkout.twig">
	<operation error="log">
		<search position="before"><![CDATA[<script>window['_QuickCheckoutData'] = {{ checkout_data|json_encode }};</script>]]></search>
		<add><![CDATA[
			<script>
			$(document).ready(function(){
				setTimeout(function(){
					var other_theme = "0";
					//console.log(other_theme);
					$(".hide_next").parents("label").find("input[type=radio]").remove();
					$(".new_html_dynamic").show();
					wradio = $(".hide_next").parents(".radio").addClass("wallet_container");
					console.log(wradio);
					oradio = wradio.next('.radio');
					if(oradio.length) oradio.find("input[type=radio]").prop("checked", true).trigger("change");
					$(document).delegate("#use-e_wallet", 'change', function(){
						if($(this).prop("checked")){
							$(".use_e_wallet_text").show();
							if($("#e_wallet_payment_method").length){
								$("#e_wallet_payment_method").prop("checked",true);
								$("#collapse-payment-method .radio").not(wradio).hide();
								if(other_theme) $(".checkout-payment-methods .radio").not(wradio).hide();
							}
						}else{
							$(".use_e_wallet_text").hide();
							$("#e_wallet_payment_method").prop("checked",false);
							$("#collapse-payment-method .radio").show();
							if(other_theme) $(".checkout-payment-methods .radio").show();
						}
						if(other_theme){ 
							val = $("[name=\'payment_method\']:checked").val();
							$(document).trigger("journal_checkout_payment_changed", val);
						}
						 _QuickCheckout.order_data["use_wallet"] = $('#use-e_wallet').prop('checked');
            			 _QuickCheckout.save();
					});
				}, 500);
			});

		</script>
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal3/template/journal3/headers/desktop/classic.twig">
	<operation error="log">
		<search position="before" index="1"><![CDATA[<div class="classic-cart-wrapper">]]></search>
		<add><![CDATA[
			{% if e_wallet_status %}
				<div class="col-sm-1" style="padding: 0;text-align: center;">
			      	<div style="max-width: 100%;z-index: 10;position: relative;display: inline-block;">
			      		<a href="{{ e_wallet_url }}" style="display: flex;">
				      		<div style="float: left;line-height: 42px;">
				      			<img src="{{ e_wallet_icon_url }}" />
				      		</div>
				      		<div style="float: left;margin-left: 5px;line-height: 21px;text-align: left;">
				      			<div style="font-size: 14px;">{{ e_title }}</div>
			      				<div><b><span style="font-size: 17px;" >{{ balance }}</span></b></div>
				      		</div>
				      	</a>
			      	</div>
		        </div>
	        {% endif %}
       ]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal3/template/account/account.twig">
	<operation error="log">
		<search position="before"><![CDATA[<li class="edit-address"><a href="{{ address }}">{{ text_address }}</a></li>]]></search>
		<add><![CDATA[
		<style>
			.account-list > li > a::before {
			    content: '\e986' !important;
			    font-family: icomoon !important;
			    font-size: 45px;
			    margin: 0;
			}
		</style>
		{% if e_wallet_status %}
			<li class="edit-wallet"><a href="{{ e_wallet }}"> {{ e_account_title }}</a></li>
		{% endif %}
		]]></add>
	</operation>
</file>
<file name="catalog/view/theme/journal3/template/extension/module/account.twig">
	<operation error="log">
		<search position="after"><![CDATA[{{ text_password }}</a>]]></search>
		<add><![CDATA[
		{% if e_wallet_status %}
			<a href="{{ e_wallet }}" class="list-group-item">{{ text_e_wallet }}</a>
		{% endif %}
		]]></add>
	</operation>
</file>
<file name="system/library/template/twig.php">
	<operation error="log">
	    <search position="replace"><![CDATA[if (is_file($file)) {]]></search>
	    <add position="replace"><![CDATA[
	    if (defined('DIR_CATALOG') && is_file(DIR_MODIFICATION . 'admin/view/template/' . $filename . '.twig')) {
	        $code = file_get_contents(\VQMod::modCheck(DIR_MODIFICATION . 'admin/view/template/' . $filename . '.twig'));
	    } elseif (is_file(DIR_MODIFICATION . 'catalog/view/theme/' . $filename . '.twig')) {
	        $code = file_get_contents(\VQMod::modCheck(DIR_MODIFICATION . 'catalog/view/theme/' . $filename . '.twig'));
	    } elseif (is_file($file)) {
	    ]]></add>
	</operation>
	<operation error="log">
	    <search position="replace"><![CDATA[$code = file_get_contents($file);]]></search>
	    <add position="replace"><![CDATA[
	    $code = file_get_contents(\VQMod::modCheck($file));
	    ]]></add>
	</operation>
	<operation error="log">
	    <search position="before"><![CDATA[$loader = new \Twig\Loader\ArrayLoader(array($filename . '.twig' => $code));]]></search>
	    <add position="before"><![CDATA[
	        if (VERSION === '3.0.3.5' || VERSION === '3.0.3.6') {
	            $loader_array = new \Twig_Loader_Array(array($filename . '.twig' => $code));
	            $loader_filesystem = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
	            $loader = new \Twig\Loader\ChainLoader(array($loader_array, $loader_filesystem));
	        } else
	    ]]></add>
	</operation>
</file>
</modification>