From 57d59c3d4495154dd969656b9a544fa7245fc972 Mon Sep 17 00:00:00 2001 From: Jacqueline Rinnhofer Date: Mon, 18 Sep 2017 14:09:18 +0200 Subject: [PATCH] #56 Add basket quantity check before payment process --- Frontend/WirecardCheckoutPage/Bootstrap.php | 2 +- .../Controllers/Frontend/WirecardCheckoutPage.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Frontend/WirecardCheckoutPage/Bootstrap.php b/Frontend/WirecardCheckoutPage/Bootstrap.php index 203ae53..3e0fec5 100755 --- a/Frontend/WirecardCheckoutPage/Bootstrap.php +++ b/Frontend/WirecardCheckoutPage/Bootstrap.php @@ -71,7 +71,7 @@ public function getCapabilities() */ public function getVersion() { - return '1.5.6'; + return '1.5.7'; } /** diff --git a/Frontend/WirecardCheckoutPage/Controllers/Frontend/WirecardCheckoutPage.php b/Frontend/WirecardCheckoutPage/Controllers/Frontend/WirecardCheckoutPage.php index 07268bf..b3cb476 100644 --- a/Frontend/WirecardCheckoutPage/Controllers/Frontend/WirecardCheckoutPage.php +++ b/Frontend/WirecardCheckoutPage/Controllers/Frontend/WirecardCheckoutPage.php @@ -53,6 +53,12 @@ public function init() */ public function indexAction() { + $basket = Shopware()->Modules()->Basket(); + $basketQuantities = $basket->sCheckBasketQuantities(); + if (!empty($basketQuantities['hideBasket'])) { + return $this->redirect(array('controller' => 'checkout')); + } + /** @var Shopware_Plugins_Frontend_WirecardCheckoutPage_Models_Page $oPageModel */ $oPageModel = Shopware()->WirecardCheckoutPage()->getPage();