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.5k stars 9.3k forks source link

Expired sales price retained in customer cart total #36885

Open magneto0007 opened 1 year ago

magneto0007 commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. Fresh Magento 2.4.5-p1 install
  2. Install sample data
  3. Open any simple product in admin eg: Breathe-Easy Tank-XS-Purple
  4. Add special price eg: 10
  5. Add From date & To date eg: From date: 01/02/2023 To date: current date
  6. Save product
  7. Go to frontend > open product page for above edited product > notice the special price is showing
  8. Add product to cart
  9. Go to cart page & observe the correct behaviour (correct item price & subtotal)
  10. Open any simple product in admin eg: Breathe-Easy Tank-XS-Purple
  11. Remove the special price by setting To date to a past date eg: yesterday
  12. Save product
  13. Go to frontend > open product page for above edited product > notice the special price is removed
  14. Go to cart page & observe the in-correct behaviour (correct item price & in-correct subtotal) Screenshot 2023-02-18 at 17 32 56

Expected result

After the special price has expired for an item in an existing cart, the original price of the item should reflect in the existing cart subtotal & order total

Actual result

After the special price has expired for an item in an existing cart, the subtotal still reflects the expired special price of that item

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @magneto0007. 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:

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://e4542dc82f3d14442fc20c2226915339.instances.magento-community.engineering Admin access: https://e4542dc82f3d14442fc20c2226915339.instances.magento-community.engineering/admin_60a7 Login: 4ab985b3 Password: 0db934159968

engcom-Bravo commented 1 year ago

Hi @magneto0007,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

After adding Special Price to the product.

Screenshot 2023-02-20 at 2 59 11 PM Screenshot 2023-02-20 at 2 59 41 PM

After removing the Special Price for a product.

Screenshot 2023-02-20 at 3 02 21 PM

Original price of the item is reflecting in the cart subtotal and total.

Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

magneto0007 commented 1 year ago

@magento give me 2.4-develop instance

magneto0007 commented 1 year ago

How do I get a magento instance where it was not reproducible by magento team @engcom-Bravo ?

engcom-Bravo commented 1 year ago

Hi @magneto0007,

Kindly make a comment @magento give me 2.4-develop instance it will give an instance to test.

Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

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, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

magneto0007 commented 1 year ago

@magento give me 2.4-develop instance

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

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

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

Hi @magneto0007, here is your Magento Instance: https://e4542dc82f3d14442fc20c2226915339.instances.magento-community.engineering Admin access: https://e4542dc82f3d14442fc20c2226915339.instances.magento-community.engineering/admin_9907 Login: ff7b0129 Password: 969769d8bc56

magneto0007 commented 1 year ago

Hi @engcom-Bravo

I was able to reproduce this issue. Please see screenshots & once again adding the steps

Steps to reproduce

1) Fresh Magento 2.4.5-p1 install 2) nstall sample data 3) Open any simple product in admin eg: Breathe-Easy Tank-XS-Purple 4) Add special price eg: 10 5) Add From date & To date eg: From date: 01/02/2023 To date: current date 6) Save product 7) Go to frontend > open product page for above edited product > notice the special price is showing 8) Add product to cart 9) Go to cart page & observe the correct behaviour (correct item price & subtotal) 10) Open any simple product in admin eg: Breathe-Easy Tank-XS-Purple 11) Remove the special price by setting To date to a past date eg: yesterday 12) Save product 13) Go to frontend > open product page for above edited product > notice the special price is removed ( do not add the product to cart again) 14) reload cart page & observe the in-correct behaviour (correct item price & in-correct subtotal). Do not update the cart qty or any other update action

Screenshot 2023-02-21 at 15 27 45 Screenshot 2023-02-21 at 15 29 22

Expected result After the special price has expired for an item in an existing cart, the original price of the item should reflect in the existing cart subtotal & order total

Actual result After the special price has expired for an item in an existing cart, the subtotal still reflects the expired special price of that item

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://e4542dc82f3d14442fc20c2226915339.instances.magento-community.engineering Admin access: https://e4542dc82f3d14442fc20c2226915339.instances.magento-community.engineering/admin_5eee Login: 720ac851 Password: 0d4dbf141e16

engcom-Bravo commented 1 year ago

Hi @magneto0007,

Thanks for your update.

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-02-22 at 2 40 38 PM Screenshot 2023-02-22 at 2 40 32 PM

Removed the special price by setting To date to a past date eg: yesterday.

Screenshot 2023-02-22 at 2 42 05 PM Screenshot 2023-02-22 at 2 43 06 PM

Original Price of the product is not reflected in the cart subtotal and order total.

when we go to proceed to checkout order is placed with original price.

Screenshot 2023-02-22 at 3 31 37 PM

Hence confirming this issue.

Thanks.

github-jira-sync-bot commented 1 year ago

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

m2-assistant[bot] commented 1 year ago

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

Kannakiraj123 commented 1 year ago

@magento I am working on this

Kannakiraj123 commented 1 year ago

@magento give me 2.4-develop instance

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

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

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

Hi @Kannakiraj123, here is your Magento Instance: https://e4542dc82f3d14442fc20c2226915339.instances-prod.magento-community.engineering Admin access: https://e4542dc82f3d14442fc20c2226915339.instances-prod.magento-community.engineering/admin_4f9d Login: 4f816cad Password: 0c48358ec830

Kannakiraj123 commented 1 year ago

@magento give me 2.4.5-p1 instance

Kannakiraj123 commented 1 year ago

@magento give me 2.4.5-p1 instance

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

Hi @Kannakiraj123, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

deymartorrez777 commented 1 year ago

@magento give me 2.4.5-p1 instance

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

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

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

Hi @deymartorrez777, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

magneto0007 commented 1 year ago

Any update of this please ?.

It has priority P2 and it looks like nobody cares to resolve this

Kannakiraj123 commented 1 year ago

when cart doesn't select any shipping method, This issue reproduced.

/guest-carts/:cartId/totals-information - This url update the total information in cart page.This url is not called,when cart doesn't select any shipping method - Magento_Checkout/js/model/resource-url-manager.js

Screenshot 2023-06-19 at 5 04 31 PM
Kannakiraj123 commented 1 year ago

2.4 develop has fixed code.line no :67.

app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js

// update totals based on updated shipping address / rates changes

 if (cartCache.get('shipping-address') && cartCache.get('shipping-address').countryId &&
      cartCache.isChanged('shipping-address',  quote.shippingAddress()) &&
      (!quote.shippingMethod() || !quote.shippingMethod()['method_code'])) {

      totalsDefaultProvider.estimateTotals(quote.shippingAddress());
      cartCache.set('totals', quote.getTotals());
  }
Kannakiraj123 commented 1 year ago

This issue fixed at 2.4 develop.pls refer the commit

https://github.com/magento/magento2/commit/c7dd8ca8a91a2c41987d723e751afe019af1b13d