adobe / asset-share-commons

A modern, open-source asset share reference implementation built on Adobe Experience Manager (AEM)
https://opensource.adobe.com/asset-share-commons/
Apache License 2.0
88 stars 107 forks source link

Code error with Shopping Cart - Deleted Assets in Author #352

Open assetshare2018 opened 5 years ago

assetshare2018 commented 5 years ago

Description: Cart functionality is not updating the value if asset is deleted from dam author. Environment: Replicable in all instance

To Reproduce Steps to reproduce the behavior:

  1. Login to AEM Author Instance.
  2. Install Asset-share commons in Author Instance.
  3. By default Add to cart will be empty as shown below.
  4. Add 2 images to the cart as shown below.
  5. Delete one of the assets from the dam author as shown below.
  6. Refresh the Home page where we have added the asset to cart.
  7. The asset is deleted and even though add to cart shows the same number.
  8. Click on the add to cart, it will show only one asset and the count of the asset shows as 2.
  9. Add one more asset to the cart, it shows the count as 3 shown below.
  10. Open the cart and check 2 assets will be present, but it shows the count as 3.

Expected behavior

  1. Login to Author Instance.
  2. Add 2 assets to cart.
  3. Add to cart has to show as 2.
  4. Remove one asset from the dam author.
  5. Refresh the home page.
  6. Check the Add to cart has to show as 1. Screenshots Attaching steps to reproduce the issue Additional context Add any other context about the problem here. Steps_to_reproduce_the_issue-Add_to_cart.docx
assetshare2018 commented 5 years ago

Could you please update on this issue..

godanny86 commented 5 years ago

hi @assetshare2018 yes this is a corner case that I don't think we thought of... It is a little tricky since the cart functionality relies on setting a cookie in the user's browser. Removing/updating that cookie from every user's browser when an asset is no longer available I'm not sure is feasible.

I'm thinking a simpler solution is to still show that 3 items are in the cart but when viewing the contents of the cart, if the asset has been deleted, a row will show that the asset is unavailable and direct the user to remove the asset from the cart. WDYT?

assetshare2018 commented 5 years ago

Please let mus know when this enhancement will be available in asset share commons version.

assetshare2018 commented 5 years ago

Could you please update on this.

godanny86 commented 5 years ago

Hi @assetshare2018 we can look to get this in the next milestone. Targeting ~month from now. As this is a community project we would welcome any Pull Requests that adds this functionality.

assetshare2018 commented 5 years ago

Hi,

Since this is a Production Issue. Could you please let me know when this functionality will be available(~ date).

assetshare2018 commented 5 years ago

I have raised a pull request also for this issue. But someone have closed the pull request. Could you please let me know when it will be available.

assetshare2018 commented 5 years ago

Could you please update on this.

assetshare2018 commented 5 years ago

Raised a pull request for this issue and added the request id for reference Id: Code error with Shopping Cart - Deleted Assets in Author #352 #380

Please let me know when it will be available. It is the Production issue.

assetshare2018 commented 5 years ago

@godanny86 How to raise pull request for this issue. Could you please ping us how to raise it.