From 31cf4fcfdad9e8a60092a282d655cd6a55641b0d Mon Sep 17 00:00:00 2001
From: Gabriel Schwardy
Date: Wed, 27 Aug 2014 21:06:35 +0200
Subject: [PATCH 1/4] Update validation.tpl
- added "Your shopping cart is empty" warning.
---
views/templates/front/validation.tpl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/views/templates/front/validation.tpl b/views/templates/front/validation.tpl
index dfe1e1f..8a8ccd0 100755
--- a/views/templates/front/validation.tpl
+++ b/views/templates/front/validation.tpl
@@ -34,6 +34,11 @@
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
+{if $nbProducts <= 0}
+
+ {l s='Your shopping cart is empty.' mod='cashondelivery'}
+
+{else}
{l s='Cash on delivery (COD) payment' mod='cashondelivery'}
+{/if}
From 8bb8f1d116c8ef6c5b1b480c6fa288ed7c6ad232 Mon Sep 17 00:00:00 2001
From: Gabriel Schwardy
Date: Wed, 27 Aug 2014 21:37:38 +0200
Subject: [PATCH 2/4] Update validation.php
- added "Your shopping cart is empty" warning.
---
controllers/front/validation.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/controllers/front/validation.php b/controllers/front/validation.php
index cbbc822..289ad29 100644
--- a/controllers/front/validation.php
+++ b/controllers/front/validation.php
@@ -69,6 +69,7 @@ public function initContent()
parent::initContent();
$this->context->smarty->assign(array(
+ 'nbProducts' => $this->context->cart->nbProducts(),
'total' => $this->context->cart->getOrderTotal(true, Cart::BOTH),
'this_path' => $this->module->getPathUri(),//keep for retro compat
'this_path_cod' => $this->module->getPathUri(),
From 892b7d9a7fe7024c943b4c866dba483bf679712a Mon Sep 17 00:00:00 2001
From: Gabriel Schwardy
Date: Thu, 28 Aug 2014 00:28:01 +0200
Subject: [PATCH 3/4] Update validation.tpl
removed rel="nofollow" parameter.
---
views/templates/front/validation.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/templates/front/validation.tpl b/views/templates/front/validation.tpl
index 8a8ccd0..703d07e 100755
--- a/views/templates/front/validation.tpl
+++ b/views/templates/front/validation.tpl
@@ -24,7 +24,7 @@
*}
{capture name=path}
- {l s='Checkout' mod='cashondelivery'}{$navigationPipe}{l s='Cash on delivery (COD) payment' mod='cashondelivery'}
+ {l s='Checkout' mod='cashondelivery'}{$navigationPipe}{l s='Cash on delivery (COD) payment' mod='cashondelivery'}
{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
From ac92132cba113620bcf8035b4b62ad55a162a432 Mon Sep 17 00:00:00 2001
From: Gabriel Schwardy
Date: Thu, 28 Aug 2014 00:29:46 +0200
Subject: [PATCH 4/4] Update cashondelivery.php
Better confirmation page formating with the green successfull notification & added little order summary.
---
cashondelivery.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/cashondelivery.php b/cashondelivery.php
index 7124a72..254e84d 100755
--- a/cashondelivery.php
+++ b/cashondelivery.php
@@ -94,6 +94,15 @@ public function hookPaymentReturn($params)
if (!$this->active)
return ;
+ $this->smarty->assign(array(
+ 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
+ 'id_order' => $params['objOrder']->id,
+ 'this_path' => $this->_path,
+ 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
+ ));
+ if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference))
+ $this->smarty->assign('reference', $params['objOrder']->reference);
+
return $this->display(__FILE__, 'confirmation.tpl');
}
}