Description
Preconditions (*)
1.Magento ver. 2.4.3
Steps to reproduce (*)
- Create a new disabled Cart Price Rule through API - endpoint POST: /rest/V1/salesRules/
Sample payload
{"rule":{"name":"This is the coupon name","store_labels":[{"store_id":0,"store_label":"Gift Card $20"}],"website_ids":[1],"customer_group_ids":[0],"from_date":"","to_date":"","uses_per_customer":0,"is_active":false,"stop_rules_processing":true,"is_advanced":true,"simple_action":"cart_fixed","discount_amount":20,"discount_qty":0,"discount_step":0,"apply_to_shipping":false,"is_rss":false,"coupon_type":"SPECIFIC_COUPON","use_auto_generation":false,"uses_per_coupon":0}}
- Create a new Coupon for newly created sales rule through API - endpoint POST: /rest/V1/coupons/
Sample payload
{"coupon":{"rule_id":insert rule_id,"code":"GC1-FD2SD","usage_limit":0,"usage_per_customer":0,"times_used":0,"is_primary":true,"type":0,"extension_attributes":{}}}
- Update the status of the Cart Price Rule to enabled through Cart Price Rule through API - endpoint PUT /rest/V1/salesRules/{rule_id}
Sample payload
{"rule":{"name":"New Name","from_date":"2022-01-01","to_date":"2022-10-10","is_active":true}}
Expected result (*)
- Expected that only updated values would be applied (existing Cart Price Rule got a status change from disabled to enabled with a from_date and to_date) and that the existing coupon code would still be attached.
Actual result (*)
- After updating the Cart Price Rule the coupon code is removed from the rule.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status