diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php index 27bca147d..a76d12230 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php @@ -103,45 +103,45 @@ @{{ errors.first('criteria') }} - Select Condition + Add Condition
-
+
Attribute is - - - + - +
-
+
Category is - - - +
diff --git a/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php index ffd1a539f..6871d8d1f 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php @@ -9,6 +9,7 @@ use Illuminate\Routing\Controller; use Webkul\Attribute\Repositories\AttributeRepository as Attribute; use Webkul\Attribute\Repositories\AttributeFamilyRepository as AttributeFamily; use Webkul\Category\Repositories\CategoryRepository as Category; +use Webkul\Product\Repositories\ProductFlatRepository as Product; /** * Catalog Rule controller @@ -22,13 +23,15 @@ class CatalogRuleController extends Controller protected $attribute; protected $attributeFamily; protected $category; + protected $product; - public function __construct(Attribute $attribute, AttributeFamily $attributeFamily, Category $category) + public function __construct(Attribute $attribute, AttributeFamily $attributeFamily, Category $category, Product $product) { $this->_config = request('_config'); $this->attribute = $attribute; $this->attributeFamily = $attributeFamily; $this->category = $category; + $this->product = $product; } public function index() @@ -46,7 +49,8 @@ class CatalogRuleController extends Controller dd(request()->all()); } - public function fetchAttribute() { + public function fetchAttribute() + { return request()->all(); } } \ No newline at end of file