From 2e4be48101f3753a599081fa59e590770b936979 Mon Sep 17 00:00:00 2001 From: Johannes Huber Date: Fri, 9 Feb 2018 11:59:11 +0100 Subject: [PATCH 1/2] Fix error when subroot is root and doesn't have id --- .../Cart/Checkout/Payment/Wirecard/Success/Component.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Wirecard/Success/Component.php b/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Wirecard/Success/Component.php index c0c285d..fcbe55b 100644 --- a/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Wirecard/Success/Component.php +++ b/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Wirecard/Success/Component.php @@ -13,8 +13,11 @@ public static function getSettings($param = null) public function getNameForEdit() { - return trlKwf('Shop Confirmation Text') . ' (' .$this->getData()->getSubroot()->id . ') ' - . Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($this->getData()->parent->componentClass, 'componentName')); + $ret = trlKwf('Shop Confirmation Text'); + $subroot = $this->getData()->getSubroot(); + if ($subroot && isset($subroot->id)) $ret .= ' (' .$this->getData()->getSubroot()->id . ')'; + $ret .= ' ' . Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($this->getData()->parent->componentClass, 'componentName')); + return $ret; } protected function _getOrder() From 27c42e1364783342b3e918e0c81514c219ca72d9 Mon Sep 17 00:00:00 2001 From: Johannes Huber Date: Fri, 9 Feb 2018 11:59:35 +0100 Subject: [PATCH 2/2] Fix twig error --- .../Abstract/Confirm/Paragraphs/Products/Component.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Abstract/Confirm/Paragraphs/Products/Component.twig b/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Abstract/Confirm/Paragraphs/Products/Component.twig index 63ad3e1..88d41ac 100644 --- a/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Abstract/Confirm/Paragraphs/Products/Component.twig +++ b/KwcShop/Kwc/Shop/Cart/Checkout/Payment/Abstract/Confirm/Paragraphs/Products/Component.twig @@ -1,5 +1,5 @@
- {% if not items|empty %} + {% if items %} {{ data.trlKwf('You ordered the following product', 'You ordered the following products', items|length) }} @@ -28,7 +28,7 @@ {% endif %} - {% elseif %} + {% else %} {{ data.trlKwf('Productlist') }} {% endif %}