magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.47k stars 9.28k forks source link

Cannot set discount to buy X items and get Y items free when Y is greater than X #37987

Open ioweb-gr opened 1 year ago

ioweb-gr commented 1 year ago

Preconditions and environment

Steps to reproduce

Create a cart rule without a coupon that applies for product X in the conditions

image'

And gives product Y as a free product.

The use case is that I have a very expensive product like a Tennis Racket and I want to give a few balls which are really cheap as a gift when you buy a racket.

Obviously giving one small item is not much of a promo so we need to give 5 of them.

When Discount Amount is > Discount Qty Step (Buy X) the rule wont' activate When Discount Amount is <= Discount Qty Step (Buy X) the rule applies fine

I've seen issue #28851 but I think it should be treated as a bug as it's a very limiting condition for promotions. Usually when you offer something free it may be one or more smaller products and this use case should be covered as well in my humble opinion.

Do you think you can review this again or reopen the older issue?

Expected result

The rule is applied

Actual result

The rule is not applied

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @ioweb-gr. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

drinkingsouls commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @drinkingsouls. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @drinkingsouls, here is your Magento Instance: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering Admin access: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering/admin_2616 Login: eaab0d88 Password: d7ad0a320953

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering Admin access: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering/admin_c0f2 Login: 7ecdb643 Password: 4228db12be73

ioweb-gr commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @ioweb-gr. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @ioweb-gr, here is your Magento Instance: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering Admin access: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering/admin_0a82 Login: 96b8779c Password: 50fd49be7e1b

ioweb-gr commented 1 year ago

It doesn't seem to work even with the same quantity in X and Y on the test instance

  1. Set a rule like this image

  2. Add products 24-MB01 and 24-MB04 to the cart

  3. Go to checkout

image

Check that no discount is added

ioweb-gr commented 1 year ago

Even the demo cart rule doesn't work

  1. Test cart rule Buy 3 tee shirts and get the 4th free image

  2. Add 4 Tees to the cart

  3. Go to checkout

image

Verify that no discount is added unfortunately

ioweb-gr commented 1 year ago

It does seem to work when you add the same item 4 times though the original rule. However, when a cart rule states "Buy X, get Y free," it insinuates that when a customer adds a certain quantity (X) of a specific product or products to their cart, they will receive a certain quantity (Y) of another product for free as part of a promotion, and not necessarily the same product.

This type of promotion is often used to encourage customers to purchase a specific product by offering an additional product for free as an incentive. For example, if there's a promotion that says "Buy 2 T-shirts, get 1 T-shirt free," a customer who adds 2 T-shirts to their cart will receive an additional T-shirt at no cost but rarely would a person want to buy 3 same tshirts

m2-assistant[bot] commented 12 months ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 12 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 12 months ago

Hi @engcom-Delta. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 12 months ago

Hi @engcom-Delta, here is your Magento Instance: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering Admin access: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering/admin_071e Login: 803f2b6e Password: 73ca9ce9486a

engcom-Delta commented 12 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 12 months ago

Hi @engcom-Delta. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 12 months ago

Hi @engcom-Delta, here is your Magento Instance: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering Admin access: https://134a12a8de02b3f0d9f1b4325c0c11e7.instances-prod.magento-community.engineering/admin_bc10 Login: ac15858c Password: 28b57ab9b480

engcom-Delta commented 12 months ago

Hello @ioweb-gr,

We have tried to reproduce the issue in the 2.4-develop branch and the issue has been reproducible.

Below are the scenarios.

Here Discount Qty Step is X and Discount Amount is Y

  1. When Y is greater than X, the rule is not working
Screenshot 2023-09-18 at 11 15 19 PM Screenshot 2023-09-18 at 11 20 14 PM Screenshot 2023-09-19 at 12 10 04 AM
  1. When Y is equal to X, the rule is not working
Screenshot 2023-09-18 at 11 22 01 PM Screenshot 2023-09-18 at 11 24 21 PM
  1. When X is greater than Y, the rule is not working
Screenshot 2023-09-19 at 12 18 38 AM Screenshot 2023-09-19 at 12 18 53 AM
  1. Additionally, When Y is equal to X and X is greater than Y, the rule is working when we add the same item not for different items but for Y is greater than X, it is not working either with same item for several times or different items.
Screenshot 2023-09-18 at 11 25 21 PM Screenshot 2023-09-18 at 11 27 36 PM Screenshot 2023-09-19 at 12 14 52 AM Screenshot 2023-09-19 at 12 15 10 AM Screenshot 2023-09-18 at 11 15 19 PM Screenshot 2023-09-19 at 12 10 04 AM
  1. Furthermore to add the rule is not applying when we add same products with different colours and different sizes as well, when Y is equal to X and X is greater than Y and Y is greater than X.
Screenshot 2023-09-19 at 12 11 28 AM Screenshot 2023-09-19 at 12 18 53 AM

Hence confirming this issue.

Thanks,

github-jira-sync-bot commented 12 months ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot commented 12 months ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot commented 12 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9571 is successfully created for this GitHub issue.

m2-assistant[bot] commented 12 months ago

:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

github-jira-sync-bot commented 12 months ago

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-9571