Describe the bug
When adding more 3 items into cart and adding the BF2024 discount, then item quantities are doubled.
To Reproduce
Steps to reproduce the behavior:
- Go to https://lelosi.ee/collections/beach-towels/products/towel-trinidad
- Add 6 items to cart
- Go to Shopping cart (amount is 6x22€ = 132€)
- Add "BF2024" discount - every 3rd item is free
- Verify that discount is calculated correctly (dicount is 2x22€ = 44€ and new total is 4x22€ = 88€)
- Procees to buying
- New page shows total of 10 items and amount to pay 154€
Expected behavior
User should be able to buy original 6 items for amount of 88€
Screenshots


Logs
Request:
Request URL: https://ocu.zipify.com/pre_purchase/v2/checkout_offers/decline
Request Method: POST
Status Code: 201 Created
Payload:
{ "checkout": { "cart_token": "Z2NwLWV1cm9wZS13ZXN0NDowMUpEN0IyNFpOQVgwUzQwSDVYUEpDUDFWRg", "line_items": [ { "key": "48901447975247:31438e446354de0d139608bb14e7f8df", "title": "Rätik Trinidad", "properties": {}, "quantity": 6, "variant_id": 48901447975247, "product_id": 9267195642191, "price": 2200, "original_price": 2200, "discounted_price": 2200, "line_price": 13200, "original_line_price": 13200, "final_price": 2200, "final_line_price": 13200, "options_with_values": [ { "name": "Title", "value": "Default Title" } ], "selling_plan_allocation": {} }, { "key": "48901447975247:6a5b387d94f31c775845a555138fe51d", "title": "Rätik Trinidad", "properties": {}, "quantity": 3, "variant_id": 48901447975247, "product_id": 9267195642191, "price": 2200, "original_price": 2200, "discounted_price": 0, "line_price": 0, "original_line_price": 6600, "final_price": 0, "final_line_price": 0, "options_with_values": [ { "name": "Title", "value": "Default Title" } ], "selling_plan_allocation": {} }, { "key": "48901447975247:b90473e66ea0207fd59c7e111066014f", "title": "Rätik Trinidad", "properties": {}, "quantity": 1, "variant_id": 48901447975247, "product_id": 9267195642191, "price": 2200, "original_price": 2200, "discounted_price": 2200, "line_price": 2200, "original_line_price": 2200, "final_price": 2200, "final_line_price": 2200, "options_with_values": [ { "name": "Title", "value": "Default Title" } ], "selling_plan_allocation": {} } ], "verify_draft_order": true, "note": "", "attributes": {}, "currency_rate": 1, "currency_currency": "EUR" }, "offer": { "variant_id": 47977679683919 }, "_ocu_offer_reference_ids": [ 831184869 ], "customer_tags": [], "location": "cart", "customer_location": "EE" }
Desktop (please complete the following information):
- OS: MacOS 15.1.1
- Browser: Chrome Version 131.0.6778.86
Additional context
Issue seems to be coming from sending a decline request and amount quantity is incorrect in payload.
Describe the bug
When adding more 3 items into cart and adding the BF2024 discount, then item quantities are doubled.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
User should be able to buy original 6 items for amount of 88€
Screenshots


Logs
Request:
Payload:
{ "checkout": { "cart_token": "Z2NwLWV1cm9wZS13ZXN0NDowMUpEN0IyNFpOQVgwUzQwSDVYUEpDUDFWRg", "line_items": [ { "key": "48901447975247:31438e446354de0d139608bb14e7f8df", "title": "Rätik Trinidad", "properties": {}, "quantity": 6, "variant_id": 48901447975247, "product_id": 9267195642191, "price": 2200, "original_price": 2200, "discounted_price": 2200, "line_price": 13200, "original_line_price": 13200, "final_price": 2200, "final_line_price": 13200, "options_with_values": [ { "name": "Title", "value": "Default Title" } ], "selling_plan_allocation": {} }, { "key": "48901447975247:6a5b387d94f31c775845a555138fe51d", "title": "Rätik Trinidad", "properties": {}, "quantity": 3, "variant_id": 48901447975247, "product_id": 9267195642191, "price": 2200, "original_price": 2200, "discounted_price": 0, "line_price": 0, "original_line_price": 6600, "final_price": 0, "final_line_price": 0, "options_with_values": [ { "name": "Title", "value": "Default Title" } ], "selling_plan_allocation": {} }, { "key": "48901447975247:b90473e66ea0207fd59c7e111066014f", "title": "Rätik Trinidad", "properties": {}, "quantity": 1, "variant_id": 48901447975247, "product_id": 9267195642191, "price": 2200, "original_price": 2200, "discounted_price": 2200, "line_price": 2200, "original_line_price": 2200, "final_price": 2200, "final_line_price": 2200, "options_with_values": [ { "name": "Title", "value": "Default Title" } ], "selling_plan_allocation": {} } ], "verify_draft_order": true, "note": "", "attributes": {}, "currency_rate": 1, "currency_currency": "EUR" }, "offer": { "variant_id": 47977679683919 }, "_ocu_offer_reference_ids": [ 831184869 ], "customer_tags": [], "location": "cart", "customer_location": "EE" }Desktop (please complete the following information):
Additional context
Issue seems to be coming from sending a decline request and amount quantity is incorrect in payload.