<modification>
	<name>TMD QuickCheckout</name>
	<version>2.3.x.x</version>
	<code>#Tsuccesspage</code>
	<author>TMD(opencartextensions.in)</author>
	<link>http://opencartextensions.in/</link>
	
	<file path="catalog/controller/checkout/success.php">
        <operation error="log">
            <search><![CDATA[if (isset($this->session->data['order_id'])) {]]>
			</search>
            <add position="after"><![CDATA[
				/*XML Starts*/
			$tmdqc_trackingcode = $this->config->get('tmdqc_trackingcode');
			if($tmdqc_trackingcode){
			$find = array(
				'{ordertotal}',
				'{ccode}',
			);
			
			$replace = array(
			 $this->cart->getTotal(),
			 $this->session->data['currency'],
			);
			
			$data['tracking'] = str_replace(array("\r\n", "\r", "\n"), '', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '', trim(str_replace($find, $replace, $tmdqc_trackingcode))));
			}
			/*XML Ends*/
			
			]]>
			</add>
        </operation>
	</file>
	
	<file path="catalog/view/theme/*/template/common/success.tpl">
        <operation error="log">
            <search><![CDATA[<div class="buttons">]]>
			</search>
            <add position="before"><![CDATA[
				<!-- /*XML Starts Starts */ -->
			<?php 
			 if(!empty($tracking)){ 
					html_entity_decode($tracking, ENT_QUOTES, 'UTF-8');
			 }
			 ?>
			 <!-- /*XML Starts Ends */ -->
			
			]]>
			</add>
        </operation>
	</file>
	
	<file path="catalog/controller/checkout/checkout.php">
        <operation error="log">
            <search><![CDATA[public function index() {]]>
			</search>
            <add position="after"><![CDATA[
				/*XML Starts*/
		if($this->config->get('tmdqc_status')){
			$this->response->redirect($this->url->link('tmdqc/tmdcheckout','','SSL'));
		}
		/*XML Ends*/
			
			]]>
			</add>
        </operation>
	</file>
	
	<file path="catalog/controller/checkout/cart.php">
        <operation error="log">
            <search><![CDATA[$data['breadcrumbs'] = array();]]>
			</search>
            <add position="before"><![CDATA[
				/*XML Starts*/
				if($this->config->get('tmdqc_status')){
					$this->response->redirect($this->url->link('tmdqc/tmdcheckout','','SSL'));
				}
				/*XML Ends*/
			]]>
			</add>
        </operation>
	</file>
	
</modification>