diff --git a/controllers/front/validation.php b/controllers/front/validation.php index 465fc6c..1b70dd3 100755 --- a/controllers/front/validation.php +++ b/controllers/front/validation.php @@ -1,4 +1,9 @@ setFilename(_PS_ROOT_DIR_ . "/log/imojo.log"); } else{ @@ -104,16 +109,21 @@ public function initContent() $temp_data = array( 'total' => $this->context->cart->getOrderTotal(true, Cart::BOTH), - 'this_path' => $this->module->getPathUri(),//keep for retro compat + 'this_path' => $this->module->getPathUri(), //keep for retro compat 'checkout_label' => Configuration::get('instamojo_checkout_label'), 'this_path_instamojo' => $this->module->getPathUri(), 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->module->name.'/', ); - $this->template_data = array_merge($this->template_data,$temp_data); + $this->template_data = array_merge($this->template_data, $temp_data); $this->context->smarty->assign($this->template_data); $this->display_column_left = false; $this->display_column_right = false; - $this->setTemplate('validation.tpl'); + if(is_not_17()){ + $this->setTemplate('validation_old.tpl'); + } + else{ + $this->setTemplate('module:InstamojoPrestaShop/views/templates/front/validation_new.tpl'); + } parent::initContent(); } } diff --git a/views/templates/front/validation_new.tpl b/views/templates/front/validation_new.tpl new file mode 100755 index 0000000..a85dcfa --- /dev/null +++ b/views/templates/front/validation_new.tpl @@ -0,0 +1,40 @@ + + +{capture name=path} + + {l s='Checkout' mod='InstamojoPrestaShop'} + {l s='Pay using Instamojo' mod='InstamojoPrestaShop'} +{/capture} + + + +{assign var='current_step' value='payment'} + +{if isset($api_errors)} +
+ {foreach $api_errors as $error} +
{$error}
+ {/foreach} +
+{/if} + +

Selected Payment Method : {$checkout_label}

+ +
+{if isset($showPhoneBox)} +
+ + +
+ +
+
+{else} + + +

+ {l s='Other payment methods' mod='InstamojoPrestaShop'} + +

+{/if} +
\ No newline at end of file diff --git a/views/templates/front/validation.tpl b/views/templates/front/validation_old.tpl similarity index 100% rename from views/templates/front/validation.tpl rename to views/templates/front/validation_old.tpl