SiteBuilder > WSDK > Shopping Cart > Resolve Intermittent Dropping of Items on Google Chrome

Written by
Ryan
Published on
June 30, 2023 at 12:57:57 AM PDT June 30, 2023 at 12:57:57 AM PDTth, June 30, 2023 at 12:57:57 AM PDT

Scenario

When adding unique items into the cart using External Web Sites (WSDK), the shopping cart intermittently drops the previously added items, leaving only the recent added item. Issue is caused by changes to Chrome browser, making cross-site requests have cookies with SameSite=Lax attribute by default when not specified. (additional information can be found here)

Solution

To resolve this here are:

  1. Go to Setup > Site Builder > Preview Web Site.
  2. Under the External Catalog Site Tools heading, click HTML and URLs for querying items.
  3. Edit Add Item To Cart HTML
  4. Instead of using the non-secure shopping domain, use the secure checkout domain for requests to additemtocart.nl. For example:

Before Change:

<form name="form16" action="http://123456.shop.netsuite.com/app/site/query/additemtocart.nl?c=718722&ext=T" method="post">
...
</form>

After Change:

<form name="form16" action="https://123456.secure.netsuite.com/app/site/query/additemtocart.nl?c=718722&ext=T" method="post">
...
</form>