diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php index 100ee90d0..fe518e63c 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php @@ -256,7 +256,6 @@ }, mounted () { - console.log(this.conditions) channels = @json($catalog_rule[5]->channels); this.channels = []; @@ -342,8 +341,6 @@ } this.attribute_values[index].type = this.attribute_input[i].type; - - debugger } } }, @@ -367,12 +364,12 @@ }, onSubmit: function (e) { - if (this.attribute_values.length > 0 || this.category_values.length > 0) { + if (this.attribute_values != null || this.category_values != null) { for (i in this.attribute_values) { delete this.attribute_values[i].options; } - if (this.category_values.length > 0) { + if (this.category_values != null) { this.all_attributes.categories = this.category_values; } diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 5f99edbf4..e31a1aa42 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -116,7 +116,7 @@ class CartRuleController extends Controller */ public function store() { - $validated = $this->validate(request(), [ + $this->validate(request(), [ 'name' => 'required|string|unique:cart_rules,name', 'description' => 'string', 'customer_groups' => 'required|array',