Posted on 04/08/2025 12:05:39
What is the expected behaviour for this function from DW's perspective?
In Dynamicweb 9's Digital Asset Portal (DAP), when a download link is sent via the download cart, the expected behavior is that the cart is cleared automatically after sending. This is by design to avoid resending the same assets and to signify that the cart contents have been processed.
How can I refresh the page so that you can see the cart items are cleared?
This depends on how the page is implemented, but typically you can force a page refresh using JavaScript after the download action completes. For example:
location.reload();
Place this after the download link is sent (e.g., in the success callback of the AJAX request that sends the link). If the action is handled via a form postback or server redirect, ensure the redirect lands on a refreshed or reloaded version of the cart page.
Or how can I prevent the cart from being cleared?
There is no public configuration setting in DW9 to prevent the cart from being cleared after sending a download link. This behavior is part of the internal logic of the DAP module and cannot be overridden without customizing the underlying code.
BR Nicolai