From da6e9e40c9b61bd351d9d0d4ae13d00e58fcdcce Mon Sep 17 00:00:00 2001 From: Aldo Chiecchia Date: Tue, 19 May 2015 17:42:53 +0200 Subject: [PATCH] Added stackable coupon configuration --- .../CoreBundle/Resources/translations/messages.en.yml | 2 ++ .../CoreBundle/Resources/translations/messages.es.yml | 2 ++ src/Elcodi/Admin/CouponBundle/Form/Type/CouponType.php | 3 +++ .../Resources/views/Coupon/editComponent.html.twig | 10 ++++++++++ 4 files changed, 17 insertions(+) diff --git a/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.en.yml b/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.en.yml index db858ae4..21eda3c6 100644 --- a/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.en.yml @@ -364,6 +364,8 @@ admin: options: manual: Manual application automatic: Automatic application + stackable: + title: This coupon can be applied when other coupons are present minimum_purchase: title: Minimum purchase price: diff --git a/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.es.yml b/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.es.yml index b73dc276..4464d238 100644 --- a/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Elcodi/Admin/CoreBundle/Resources/translations/messages.es.yml @@ -365,6 +365,8 @@ admin: options: manual: Aplicación manual automatic: Aplicación automática + stackable: + title: Este cupon se puede utilizar con otros cupones minimum_purchase: title: Compra mínima price: diff --git a/src/Elcodi/Admin/CouponBundle/Form/Type/CouponType.php b/src/Elcodi/Admin/CouponBundle/Form/Type/CouponType.php index 97d5077a..5b6ea399 100644 --- a/src/Elcodi/Admin/CouponBundle/Form/Type/CouponType.php +++ b/src/Elcodi/Admin/CouponBundle/Form/Type/CouponType.php @@ -116,6 +116,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('minimumPurchase', 'money_object', [ 'required' => false, ]) + ->add('stackable', 'checkbox', [ + 'required' => false + ]) ->add('rule', 'entity', [ 'class' => $this->ruleNamespace, 'required' => false, diff --git a/src/Elcodi/Admin/CouponBundle/Resources/views/Coupon/editComponent.html.twig b/src/Elcodi/Admin/CouponBundle/Resources/views/Coupon/editComponent.html.twig index 4789266b..9b00274b 100644 --- a/src/Elcodi/Admin/CouponBundle/Resources/views/Coupon/editComponent.html.twig +++ b/src/Elcodi/Admin/CouponBundle/Resources/views/Coupon/editComponent.html.twig @@ -55,6 +55,16 @@ {{ form_row(form.enforcement, { label: 'admin.coupon.field.enforcement.title' } ) }} +
    +
  1. + {{ + form_row(form.stackable, { + label: 'admin.coupon.field.stackable.title', + }) + }} +
  2. +
+