Pwa-studio: [bug]: Missing Shopping Cart Badge Indicator

Created on 31 May 2019  路  2Comments  路  Source: magento/pwa-studio

Describe the bug
The Shopping Cart in the Header doesn't show how many items are in the cart until the cart is opened.

To Reproduce
Steps to reproduce the behavior:

  1. Add an item to your cart
  2. Refresh the page
  3. See that the Shopping Cart badge icon does not appear
  4. Open your shopping cart
  5. Close your shopping cart
  6. See that the Shopping Cart badge icon appears and accurately indicates how many items are in the cart

Expected behavior
The Shopping Cart badge icon should show the number of items without the user first having to open the cart.

Screenshots
Screen Shot 2019-05-31 at 1.25.32 PM.png

Screen Shot 2019-05-31 at 1.25.43 PM.png

Additional context
It looks like the requests to get the cart info are not fired until the cart is opened:

Screen Shot 2019-05-31 at 1.29.39 PM.png

Possible solutions
Query for the cart contents on initial page load.


Please let us know what packages this bug is in regards to:

  • [x] venia-concept
  • [ ] pwa-buildpack
  • [ ] peregrine
  • [ ] pwa-devdocs
  • [ ] upward-js
  • [ ] upward-spec
bug help wanted

Most helpful comment

I've tested this, it appears to already to be fixed in the pwa-studio repo.

On page load, the cart is always requested now which makes this a none-issue :)

All 2 comments

I've tested this, it appears to already to be fixed in the pwa-studio repo.

On page load, the cart is always requested now which makes this a none-issue :)

Confirmed that this is no longer an issue on both the latest release: https://veniapwa.com/, and on develop: https://magento-venia-develop.now.sh/.

It does take a second, but the cart indicator does appear without having to open the cart first.

Thanks @shakyShane !

Was this page helpful?
0 / 5 - 0 ratings