From 93fb2dcf15ce77d3cd72a485cfd346d5ec85bbe5 Mon Sep 17 00:00:00 2001 From: Andi Nitsche Date: Wed, 1 Mar 2017 16:19:02 +0100 Subject: [PATCH] small fixes --- .../ErsBase/src/ErsBase/Service/OrderService.php | 3 +++ .../src/PreReg/Controller/OrderController.php | 13 +++++++++++++ module/PreReg/view/pre-reg/info/impressum.phtml | 12 ++++++------ module/PreReg/view/pre-reg/info/terms.phtml | 15 ++++++--------- module/PreReg/view/pre-reg/product/add.phtml | 1 - module/PreReg/view/pre-reg/product/edit.phtml | 2 -- 6 files changed, 28 insertions(+), 18 deletions(-) diff --git a/module/ErsBase/src/ErsBase/Service/OrderService.php b/module/ErsBase/src/ErsBase/Service/OrderService.php index 56ea814c..c1ef2078 100644 --- a/module/ErsBase/src/ErsBase/Service/OrderService.php +++ b/module/ErsBase/src/ErsBase/Service/OrderService.php @@ -130,6 +130,9 @@ public function changeCurrency($paramCurrency) { if($debug) { error_log('set item to currency: '.$currency); } + if($item->hasParentItems()) { + continue; + } $product = $item->getProduct(); $participant = $item->getPackage()->getParticipant(); diff --git a/module/PreReg/src/PreReg/Controller/OrderController.php b/module/PreReg/src/PreReg/Controller/OrderController.php index d8675cea..908a43d3 100644 --- a/module/PreReg/src/PreReg/Controller/OrderController.php +++ b/module/PreReg/src/PreReg/Controller/OrderController.php @@ -309,6 +309,10 @@ public function paymentAction() { $paymenttype = $em->getRepository('ErsBase\Entity\PaymentType') ->findOneBy(array('id' => $data['paymenttype_id'])); + if($paymenttype->getCurrency()->getShort() != $order->getCurrency()->getShort()) { + throw new \Exception('Unable to set this payment type for this order. Please chooser another payment type.'); + } + $order->setPaymentType($paymenttype); $em->persist($order); @@ -474,6 +478,13 @@ public function checkoutAction() { $forrest = new Service\BreadcrumbService(); $forrest->remove('terms'); switch(strtolower($order->getPaymentType()->getType())) { + case 'sepa': + return $this->redirect()->toRoute('payment', + array( + 'action' => 'banktransfer', + 'hashkey' => $order->getHashkey(), + )); + break; case 'banktransfer': return $this->redirect()->toRoute('payment', array( @@ -509,6 +520,8 @@ public function checkoutAction() { )); break; default: + throw new \Exception('We were unable to handle your chose payment type: '.strtolower($order->getPaymentType()->getType())); + break; } } diff --git a/module/PreReg/view/pre-reg/info/impressum.phtml b/module/PreReg/view/pre-reg/info/impressum.phtml index 2f7ce038..e68db9e6 100644 --- a/module/PreReg/view/pre-reg/info/impressum.phtml +++ b/module/PreReg/view/pre-reg/info/impressum.phtml @@ -6,13 +6,13 @@ $this->headTitle($this->translate('Impressum'));

Impressum

-

Jonglieren in München e.V.
- Goethe Str. 10
- 80336 München
- Deutschland

+

Stichting European Juggling Association
+ Jodenbreestraat 24-1
+ 1011 NK Amsterdam
+ The Netherlands

-

E-Mail: info@jimev.de
- Web: www.jimev.de

+

E-Mail: info@eja.net
+ Web: www.eja.net

\ No newline at end of file diff --git a/module/PreReg/view/pre-reg/info/terms.phtml b/module/PreReg/view/pre-reg/info/terms.phtml index 191d2672..26eba87b 100644 --- a/module/PreReg/view/pre-reg/info/terms.phtml +++ b/module/PreReg/view/pre-reg/info/terms.phtml @@ -3,13 +3,10 @@ $this->headTitle($this->translate('Terms & Conditions')); ?> -
- translate('Back'); ?> -
-

translate('Terms and Conditions'); ?>

- Terms and Conditions ERS EN v5
- Terms and Conditions ORGA EN v4*/ ?> -

translate('Disclaimer'); ?>

-

translate('Upon attending the EJC, in no event shall the host or its representatives or its assistants be liable for any loss or injury or any damages, unless they are grounded in cause of gross negligence or wilful act of breach of duty by the host or its representatives or its assistants. Participants attend by choice, on their own risk; they take the responsibility for their own health status and pay attention to it. We especially point out that the Convention is a sports event where professional jugglers and acrobats will train together with non - professionals of all skill levels. There will be workshops in all sorts of circus disciplines open (but maybe not appropriate!) for everyone; above that props and apparatus will be accessible, be it because the host provides them or any participant simply puts them up and let others use them as well. It is your own responsibility and neither the hosts\', nor the workshop leaders\', their representatives\' or assistants\' to make sure at any time that your health and fitness condition is adequate to take part in the workshop in question or to use props and apparatus mentioned hereinabove safely.'); ?>

-
+
+

translate('Terms and Conditions'); ?>

+ Terms and Conditions ERS EN v5
+ Terms and Conditions ORGA EN v4*/ ?> +

translate('Disclaimer'); ?>

+

translate('Upon attending the EJC, in no event shall the host or its representatives or its assistants be liable for any loss or injury or any damages, unless they are grounded in cause of gross negligence or wilful act of breach of duty by the host or its representatives or its assistants. Participants attend by choice, on their own risk; they take the responsibility for their own health status and pay attention to it. We especially point out that the Convention is a sports event where professional jugglers and acrobats will train together with non - professionals of all skill levels. There will be workshops in all sorts of circus disciplines open (but maybe not appropriate!) for everyone; above that props and apparatus will be accessible, be it because the host provides them or any participant simply puts them up and let others use them as well. It is your own responsibility and neither the hosts\', nor the workshop leaders\', their representatives\' or assistants\' to make sure at any time that your health and fitness condition is adequate to take part in the workshop in question or to use props and apparatus mentioned hereinabove safely.'); ?>

\ No newline at end of file diff --git a/module/PreReg/view/pre-reg/product/add.phtml b/module/PreReg/view/pre-reg/product/add.phtml index d1af78ec..a9efd869 100644 --- a/module/PreReg/view/pre-reg/product/add.phtml +++ b/module/PreReg/view/pre-reg/product/add.phtml @@ -1,5 +1,4 @@ headTitle($product->getName()); ?> -translate('back to Overview'); ?>
diff --git a/module/PreReg/view/pre-reg/product/edit.phtml b/module/PreReg/view/pre-reg/product/edit.phtml index b2e473aa..946e5452 100644 --- a/module/PreReg/view/pre-reg/product/edit.phtml +++ b/module/PreReg/view/pre-reg/product/edit.phtml @@ -1,6 +1,4 @@ headTitle($product->getName()); ?> -translate('back to Overview'); ?> - getProductPrices()) == 0): ?>

translate('This product is unavailable'); ?>