From c8e8df1699d022b2d94edab59465eb36a3b522fc Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 6 Jul 2019 17:41:58 +0530 Subject: [PATCH] Added configuration for cart rules --- .../Admin/src/Resources/lang/en/app.php | 7 + .../views/configuration/field-type.blade.php | 26 +- .../Webkul/Discount/src/Config/system.php | 66 ++ .../src/Providers/DiscountServiceProvider.php | 4 + .../src/Database/Factories/ProductFactory.php | 890 ++++++++++++++++++ 5 files changed, 980 insertions(+), 13 deletions(-) create mode 100644 packages/Webkul/Discount/src/Config/system.php create mode 100644 packages/Webkul/Product/src/Database/Factories/ProductFactory.php diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index ca9c1c15b..6fbb11dd8 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -820,6 +820,13 @@ return [ 'select-attr-fam' => 'Select Attribute Family', 'select-cart-attr' => 'Select Cart Attribute', 'general-info' => [ + 'on-shipping' => 'If applied on shipping', + 'discount' => 'Discount', + 'to-be-applied' => 'Applied On', + 'applied-on-info' => 'It signifies how cart rule should be applied on items in cart', + 'shipping-apply-info' => 'It signifies how rule behaves when it is used for shipping', + 'general-info' => 'General Info', + 'config' => 'Configure', 'name' => 'Rule Name', 'description' => 'Description', 'starts-from' => 'Start', diff --git a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php index 8d2790707..80f9cb7dd 100755 --- a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php @@ -35,13 +35,13 @@ } ?> - @if ($field['type'] == 'depands') + @if ($field['type'] == 'depends') getConfigData($name) ?? ''; ?> - + > @else @@ -270,7 +270,7 @@ @endif @if (isset($field['info'])) - {{ trans($field['info']) }} + {{ trans($field['info']) }} @endif -