Questions tagged [sales-rule]
The sales-rule tag has no summary.
34 questions
0 votes
0 answers
41 views
Add Customer Grid Condition in Sales Rule and Validate Coupon for Selected Customers
I am working on a custom module for Magento 2.4.5 that extends the Sales Rule Conditions functionality. My goal is to: Add a new condition to the "Conditions" tab in the Cart Price Rule ...
1 vote
1 answer
90 views
Magento 2.4 Restrict Apply Coupon code if cart has item with 0 price
In Magento 2.4, I want to create a cart rule and that can not be applied if any product in the cart with 0 price. For Example, I have created a coupon code that allows a 20% discount on the total of ...
1 vote
0 answers
192 views
Coupon code is not saving at quote table in magento 2
I upgraded my website from 2.3.6-p1 to 2.4.5-p1 . After that when i applied the cart rule with coupon code, it shows the error that The coupon code "GHSDYFEWFCER" is not valid. When ...
0 votes
1 answer
56 views
I am new in magento! :: I have task to add a custom field('is_vip') in order columns. please help me?
Programatically, add a custom field('is_vip') in order. If a customer order value over $150 , the field value will be 1 and in order grid it will show yes.
0 votes
1 answer
810 views
Magento 2 How to Get List Products from Cart Price Rule Condition
I want to get the cart price rule applicable products list in my block. How can I get it? For catalog rule, at vendor/magento/module-catalog-rule/Model/Rule We have the method getMatchingProductIds() ...
1 vote
1 answer
764 views
multiselect custom field does not save in sales rule admin form in magento 2.4
I need to save custom multiselect field value in the apply_on_weekday column which is located in the salesrule Db table. I tried a lot but it doesn't save the data in the database. Below is my code. ...
0 votes
1 answer
278 views
Create Sales Rule With Subtotal condition
I know how to create a sales rule. But i'm failing to add this rule a condition based on the subtotal Which means i Want to reproduce this programmatically I see this is added into the salesrule ...
0 votes
0 answers
649 views
Add custom data to SalesRule API
I tried to add custom data to SalesRule through the endpoint V1/salesRules but ended up with getting error My code is below 1- etc/extension_attributes.xml <?xml version="1.0"?> <...