Skip to content

Cart / Minicart does not check if configurable product is still salable #6388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
heldchen opened this issue Aug 29, 2016 · 9 comments
Closed

Comments

@heldchen
Copy link
Contributor

heldchen commented Aug 29, 2016

when a configurable product is being disabled in the backend while still in customers persistent cart, the cart (/checkout/cart/ as well as the minicart) behaves as if the product is still salable. only after going into the checkout is the now non-salable product silently removed.

Preconditions

  1. CE 2.1.0
  2. persistent cart is enabled
  3. some configured product variants exists in store (using sku 123 and sku abc below)
  4. customer exists in store
  5. reindexing disabled (NOT a real precondition, but easier problem reproduction)

Steps to reproduce

  1. in the frontend, login as customer
  2. add 1x sku 123 and 1x sku abc to the cart
  3. view the cart (/checkout/cart), make sure the two products are listed
  4. logout
  5. login into the admin backend
  6. disable product with sku 123 & save
  7. in the frontend, login as customer
  8. go to /checkout/cart
  9. refresh page /checkout/cart (browser reload button)

Expected result

after step 8:

  • minicart shows 1 product (sku abc)
  • cart shows 1 product (sku abc) or alternatively a notice that the product is not available anymore and is therefore removed from the cart

after step 9:

  • minicart shows 1 product (sku abc)
  • cart shows 1 product (sku abc)

Actual result

after step 8:

  • minicart shows 2 products (sku 123 and sku abc)
  • cart shows 2 products (sku 123 and sku abc), no information about product not available anymore is shown

after step 9:

  • minicart shows 2 products (sku 123 and sku abc)
  • cart shows 1 product (sku abc)
  • sku 123 is silently removed from cart

note: customer logout is not needed to show the issue, added to ensure quote is really reloaded from the database.

note: for simple products, the problem is partly reproducible:

  • if the user is not logging in/out, the same results as for configurable products
  • if the user logs in/out, the cart is cleaned of the non-salable simple product without notice
@AVoskoboinikov
Copy link
Contributor

Hi, @heldchen

I've tried couple of times to reproduce this issue but without any success. I am using CE 2.1.0 with sample data in developer mode and after each relogin I see valid cart and mini cart on checkout page.

Maybe you have any troubles with cache?
Have you tried to clean it after disabling products?
Maybe you can add some extra details that could help me to reproduce this issue?

Will appreciate your efforts!

@heldchen
Copy link
Contributor Author

heldchen commented Sep 6, 2016

thanks for your update

Maybe you have any troubles with cache?

we have fullpage_cache disabled, all other caches are enabled. haven't seeen any other cache-related issues so far.

Have you tried to clean it after disabling products?

no, but will try and report back.

(but probably shouldn't make a difference - if disabling a product would need a cache refresh, then the backend save action should invalidate it, right?)

Maybe you can add some extra details that could help me to reproduce this issue?

I have tested it on a 1 website - 2 storeviews setup. I will setup a vanilla 2.1.1 with sample data later this week and try reproducing it there and update this issue.

@AVoskoboinikov
Copy link
Contributor

Ok, thanks for that. Will wait for update.

@heldchen
Copy link
Contributor Author

sorry for the delay, the post shop launches prevented me from retesting. will be done ASAP.

@veloraven
Copy link
Contributor

@heldchen is there any update on this issue? Is it still actual?

@heldchen
Copy link
Contributor Author

yes, sorry for the delay, got caught up with the security patches. will try to produce more info asap.

@veloraven
Copy link
Contributor

According to contributor guide, tickets without response for two weeks should be closed.
If this issue still reproducible please feel free to create the new one: format new issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result and specify Magento version.

@yosefkurniawan
Copy link

does this issue persist? any workaround?

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 16, 2017
@kanduvisla
Copy link
Contributor

I think I bumped into this issue today in M2.2.3.

There was a product in a saved quote of a logged in customer that had been disabled in the meantime. This caused the minicart to break (checkout button did not work anymore) and a lot of errors where thrown in the console due to the minicart being saved in the local storage I guess.

joanhe pushed a commit that referenced this issue Dec 4, 2020
[cia] MC-38032: Captcha Improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants