Adobe-Marketing-Cloud / aem-sample-we-retail

🚫 We.Retail has been archived, see instead the WKND Guide:
https://github.com/adobe/aem-guides-wknd
Apache License 2.0
123 stars 141 forks source link

Adding product with variant to cart adds only the parent product #116

Closed gaetanmarmasse closed 8 years ago

gaetanmarmasse commented 8 years ago

Hi, It seems like adding products with variants to the cart actually does not take the proper variant / sku into consideration in the we-retail implementation.

Steps to reproduce:

  1. browse to the "Pipeline Board Shorts" product under "Men" section (/content/we-retail/us/en/products/men/shorts/pipeline-board-shorts.html)
  2. select orange as a color and L as a size and click add to cart
  3. still on the product page, select blue as a color and XXL as a size and add to cart as well.

Observed behavior:

  1. Mini cart looks like the main product has been added twice to the cart (qty 2)
  2. CommercePersistence cookie is also understanding the same product has been added twice (parent product): ORDER:=orderId=22774042-7fb4-4b83-b1b2-5cd6ef10f0db|CART:=quantity0=2,entryCount=1,promotionCount=0,product0=/content/we-retail/us/en/products/men/shorts/pipeline-board-shorts/jcr:content/root/product,voucherCount=0|
  3. The ContextHubPersistence local storage element also understands there is 1 entry in the cart with qty 2 in store.cart.entries.

Expected Behavior:

  1. Mini cart should differentiate product variants and we should see 2 distinct products with their own thumbnail, path, price and so forth
  2. CommercePersistence and ContextHubPersistence should both have 2 distinct products with their own path, price and so forth

I am attaching a screenshot of the observed issue as well as a screenshot of the geometrixx-outdoors mini cart displaying the difference between variants for reference.

Thanks, G screen shot 2016-08-29 at 12 02 46 pm screen shot 2016-08-29 at 12 12 52 pm