VSF sync & creating a new cart

When I refresh the page VSF seems to create a brand new cart (logged in or otherwise), pulls the old cart, and puts it in the new cart. In this process it seems to lose the discount code. IE:

\ Anyone know why vsf would both pull & create a new cart at the same time (server is paused but both are running at the same time)
ie it does two requests at the same time:
http://localhost:8080/api/cart/pull?token=tok&cartId=12778a7d-715a-41a9-b212-d27adc75419f
http://localhost:8080/api/cart/create?token=tok

(where 12778a7d is my old cart); is this designed behavior and the losing discount code just an oversight or something I can enable/disable?

Hi @carlokok Please let us know on which VSF version you experience this behavior? Develop branch maybe?

I’m asking because we recently optimized the way how carts are synced applying lazy loading. It might caused some side effects.

The cart shouldn’t be recreated the way you described I guess

@gibkigonzo

This was a master checkout from ~ feb 5th.

Hey @carlokok :slight_smile:
This could be related with new cart token creation. Here is issue which can be what you occurred https://github.com/DivanteLtd/vue-storefront/issues/4062
and I’ve fixed it here https://github.com/DivanteLtd/vue-storefront/pull/4070
It will be released in 1.11.2. Can you check if this is still a problem on branch hotfix/v1.11.2?

1 Like

Hrmmm this is even worse:

Logical order:
[Added to Cart]

  • check sku 16993868
  • cart pull: {“code”:200,“result”:[]} (Was dec0cd22-2742-4402-9be7-6c1ea42d3a89)
  • cart update: {with product} {"code":200,"result":{"item_id":"290edf8b-8cd2-4914-810c-0b1d3048a2aa","sku":"16993868","qty":1,"qty_ordered":1,"name":"Beats by Dre Powerbeats 2 In-ear Bluetooth Wireless Sport","price":223.33,"price_incl_tax":223.33,"row_total_incl_tax":223.33,"product_type":null,"quote_id":null,"product_option":{"extension_attributes":{"configurable_item_options":[]}}}}

[Pressed CART]

  • shipping methods
  • payment methods
  • shipping info
  • check sku 16993868

[Entered coupon]

  • apply coupon {“code”:200,“result”:true}
  • shipping methods
  • payment methods
  • shipping info (returns the new coupon as a segment)

[Refresh]

  • Cart create {“code”:200,“result”:“3a894286-1080-4724-9bdf-39201136e082”}
  • user/me
  • Cart pull dec0cd22-2742-4402-9be7-6c1ea42d3a89 (returns old cart)
  • check sku 16993868
  • Order history
  • Cart pull 3a894286-1080-4724-9bdf-39201136e082 {“code”:200,“result”:[]}
  • Cart update 3a894286-1080-4724-9bdf-39201136e08 {“cartItem”:{“sku”:“16993868”,“qty”:1,“product_option”:{“extension_attributes”:{“custom_options”:[],“configurable_item_options”:[],“bundle_options”:[]}},“quoteId”:“3a894286-1080-4724-9bdf-39201136e082”}}
  • Cart update 3a894286-1080-4724-9bdf-39201136e08 {“cartItem”:{“sku”:“16993868”,“qty”:1,“product_option”:{“extension_attributes”:{“custom_options”:[],“configurable_item_options”:[],“bundle_options”:[]}},“quoteId”:“3a894286-1080-4724-9bdf-39201136e082”}} again

So I somehow end up with two items (vsf doesn’t pass the original item_id returned for the cart item).

But it still recreates the cart with your branch.

[Added to Cart]
here should be created token

[Refresh]
before refresh do you have token in localstorage? current-cart-token? it shouldn’t be created because it should be in LS

Oke so something interesting is going on in this branch. As anonymous user I get this:

Anonymous

fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL",
{
    "method": "GET",
}); ;

{"code":200,"result":{"item_id":null,"product_id":"8b7b07c165924a879392f4f51a6f7ce0","stock_id":0,"qty":672,"is_in_stock":true,"is_qty_decimal":false,"show_default_notification_message":false,"use_config_min_qty":true,"min_qty":0,"use_config_min_sale_qty":1,"min_sale_qty":1,"use_config_max_sale_qty":true,"max_sale_qty":10000,"use_config_backorders":true,"backorders":1,"use_config_notify_stock_qty":true,"notify_stock_qty":1,"stock":{"is_in_stock":true},"use_config_qty_increments":true,"qty_increments":0,"use_config_enable_qty_inc":true,"enable_qty_increments":false,"use_config_manage_stock":true,"manage_stock":true,"low_stock_date":null,"is_decimal_divided":false,"stock_status_changed_auto":0}}

fetch("http://localhost:8080/api/cart/create?token=",
{
    "body": null,
    "method": "POST",
}); ;
{"code":200,"result":"655d96dd-b242-4bac-855a-e75a6032a6f3"}

fetch("http://localhost:8080/api/cart/pull?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": null,
    "method": "GET",
}); ;
{"code":200,"result":[]}

fetch("http://localhost:8080/api/cart/update?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": "{\"cartItem\":{\"sku\":\"ASZF216GBSL\",\"qty\":1,\"product_option\":{\"extension_attributes\":{\"custom_options\":[],\"configurable_item_options\":[],\"bundle_options\":[]}},\"quoteId\":\"655d96dd-b242-4bac-855a-e75a6032a6f3\"}}",
    "method": "POST",
}); ;
{"code":200,"result":{"item_id":"ec8ef634-913d-4e6c-9613-5d9e83384915","sku":"ASZF216GBSL","qty":1,"qty_ordered":1,"name":"ASUS ZenFone 2 ZE551ML 16GB Smartphone","price":99.99,"price_incl_tax":99.99,"row_total_incl_tax":99.99,"product_type":null,"quote_id":null,"product_option":{"extension_attributes":{"configurable_item_options":[]}}}}

fetch("http://localhost:8080/api/cart/pull?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": null,
    "method": "GET",
}); ;
{"code":200,"result":[{"item_id":"ec8ef634-913d-4e6c-9613-5d9e83384915","sku":"ASZF216GBSL","qty":1,"qty_ordered":1,"name":"ASUS ZenFone 2 ZE551ML 16GB Smartphone","price":99.99,"price_incl_tax":120.9879,"row_total_incl_tax":99.99,"product_type":null,"quote_id":null,"product_option":{"extension_attributes":{"configurable_item_options":[]}}}]}

fetch("http://localhost:8080/api/cart/shipping-methods?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": "{\"address\":{\"region\":\"\",\"region_id\":0,\"country_id\":\"US\",\"street\":[null,null],\"postcode\":\"\",\"city\":\"\",\"region_code\":\"\"}}",
    "method": "POST",
}); ;
{"code":200,"result":[{"carrier_code":null,"method_code":"Ground","carrier_title":null,"method_title":"Ground","available":true,"error_message":null,"price_excl_tax":10,"price_incl_tax":12.1},{"carrier_code":null,"method_code":"Air","carrier_title":null,"method_title":"Air","available":true,"error_message":null,"price_excl_tax":15,"price_incl_tax":18.15}]}

fetch("http://localhost:8080/api/cart/update?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": "{\"cartItem\":{\"sku\":\"ASZF216GBSL\",\"qty\":1,\"product_option\":{\"extension_attributes\":{\"custom_options\":[],\"configurable_item_options\":[],\"bundle_options\":[]}},\"quoteId\":\"655d96dd-b242-4bac-855a-e75a6032a6f3\"}}",
    "method": "POST",
}); ;
{"code":200,"result":{"item_id":"ec8ef634-913d-4e6c-9613-5d9e83384915","sku":"ASZF216GBSL","qty":2,"qty_ordered":2,"name":"ASUS ZenFone 2 ZE551ML 16GB Smartphone","price":99.99,"price_incl_tax":99.99,"row_total_incl_tax":199.98,"product_type":null,"quote_id":null,"product_option":{"extension_attributes":{"configurable_item_options":[]}}}}

fetch("http://localhost:8080/api/cart/payment-methods?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": null,
    "method": "GET",
}); ;
{"code":200,"result":[{"code":"DefaultManualPaymentMethod","title":"Test payment method"}]}

fetch("http://localhost:8080/api/cart/shipping-information?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": "{\"addressInformation\":{\"shippingAddress\":{\"countryId\":\"US\",\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"]},\"billingAddress\":{\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"],\"countryId\":\"\"},\"shippingCarrierCode\":null,\"shippingMethodCode\":\"Ground\"}}",
    "method": "POST",
}); ;
{"code":200,"result":{"grand_total":133.09,"subtotal":99.99,"discount_amount":0,"subtotal_with_discount":0,"tax_amount":23.1,"shipping_tax_amount":null,"base_shipping_tax_amount":null,"subtotal_incl_tax":120.99,"shipping_incl_tax":12.1,"shipping_amount":null,"discount_tax_compensation_amount":null,"customer_firstname":null,"customer_lastname":null,"base_currency_code":"USD","quote_currency_code":"USD","items_qty":1,"applied_rule_ids":null,"billing_address_id":null,"created_at":null,"customer_email":null,"customer_group_id":0,"customer_note_notify":0,"customer_is_guest":0,"updated_at":null,"status":null,"store_id":1,"store_name":null,"items":[{"item_id":"ec8ef634-913d-4e6c-9613-5d9e83384915","sku":"ASZF216GBSL","qty":1,"qty_ordered":1,"name":"ASUS ZenFone 2 ZE551ML 16GB Smartphone","price":99.99,"price_incl_tax":120.9879,"row_total_incl_tax":99.99,"product_type":null,"quote_id":null,"product_option":{"extension_attributes":{"configurable_item_options":[]}}}],"entity_id":0,"shipping_description":null,"increment_id":null,"total_segments":[{"code":"subtotal","title":"Subtotal","value":99.99,"area":null},{"code":"tax0,21","title":"Tax 21%","value":20.9979,"area":null},{"code":"shipping","title":"Shipping","value":12.1,"area":null},{"code":"total","title":"Grand total","value":133.09,"area":null}],"extension_attributes":null,"payment":null,"billing_address":null}}

fetch("http://localhost:8080/api/cart/delete?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3",
{
    "body": "{\"cartItem\":{\"sku\":\"ASZF216GBSL\",\"item_id\":\"ec8ef634-913d-e6c-9613-5d9e83384915\",\"quoteId\":\"655d96dd-b242-4bac-855a-e75a6032a6f3\"}}",
    "method": "POST",
}); ;
{"code":200,"result":{"item_id":"ec8ef634-913d-4e6c-9613-5d9e83384915","sku":"ASZF216GBSL","qty":0,"qty_ordered":0,"name":"ASUS ZenFone 2 ZE551ML 16GB Smartphone","price":99.99,"price_incl_tax":120.9879,"row_total_incl_tax":0,"product_type":null,"quote_id":null,"product_option":{"extension_attributes":{"configurable_item_options":[]}}}}

fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL",
{
    "body": null,
    "method": "GET",
    "mode": "cors"
}); ;

{"code":200,"result":{"item_id":null,"product_id":"8b7b07c165924a879392f4f51a6f7ce0","stock_id":0,"qty":672,"is_in_stock":true,"is_qty_decimal":false,"show_default_notification_message":false,"use_config_min_qty":true,"min_qty":0,"use_config_min_sale_qty":1,"min_sale_qty":1,"use_config_max_sale_qty":true,"max_sale_qty":10000,"use_config_backorders":true,"backorders":1,"use_config_notify_stock_qty":true,"notify_stock_qty":1,"stock":{"is_in_stock":true},"use_config_qty_increments":true,"qty_increments":0,"use_config_enable_qty_inc":true,"enable_qty_increments":false,"use_config_manage_stock":true,"manage_stock":true,"low_stock_date":null,"is_decimal_divided":false,"stock_status_changed_auto":0}}

fetch("http://localhost:8080/api/cart/apply-coupon?token=&cartId=655d96dd-b242-4bac-855a-e75a6032a6f3&coupon=carlo",
{
    "method": "POST",
    "mode": "cors"
});
{"code":200,"result":false} <<< Fails because of the delete.

At this point, current-cart-token is "655d96dd-b242-4bac-855a-e75a6032a6f3"
current-cart-hash is "1c40f8ffa45d7b7b7d64bc0ad6a1a9be65b931f88e404b08b1e3cf58"
shop/syncTasks/1582188156482-12f9605f-d9a3-0b0e-589a-7f592471a869:  {"url":"http://localhost:8080/api/stock/check?sku=ASZF216GBSL","payload":{"method":"GET","headers":{"Content-Type":"application/json"},"mode":"cors"},"is_result_cacheable":true,"product_sku":"ASZF216GBSL","callback_event":"store:cart/stockSync","task_id":"1582188156482-12f9605f-d9a3-0b0e-589a-7f592471a869","transmited":true,"created_at":"2020-02-20T08:42:36.482Z","updated_at":"2020-02-20T08:42:36.482Z","transmited_at":"2020-02-20T08:42:36.728Z","result":{"item_id":null,"product_id":"8b7b07c165924a879392f4f51a6f7ce0","stock_id":0,"qty":672,"is_in_stock":true,"is_qty_decimal":false,"show_default_notification_message":false,"use_config_min_qty":true,"min_qty":0,"use_config_min_sale_qty":1,"min_sale_qty":1,"use_config_max_sale_qty":true,"max_sale_qty":10000,"use_config_backorders":true,"backorders":1,"use_config_notify_stock_qty":true,"notify_stock_qty":1,"stock":{"is_in_stock":true},"use_config_qty_increments":true,"qty_increments":0,"use_config_enable_qty_inc":true,"enable_qty_increments":false,"use_config_manage_stock":true,"manage_stock":true,"low_stock_date":null,"is_decimal_divided":false,"stock_status_changed_auto":0},"resultCode":200,"code":200,"acknowledged":false}
shop/cart/current-cart [{"name":"ASUS ZenFone 2 ZE551ML 16GB Smartphone","image":"http://localhost:10645/assets/catalog/ASZF216GBSL/1431971520000_1134360.jpg","small_image":null,"slug":"asus-zenfone-2-ze551ml-us-version-16gb-smartp","required_options":null,"has_options":null,"thumbnail":null,"tax_class_id":null,"sku":"ASZF216GBSL","url_key":"asus-zenfone-2-ze551ml-us-version-16gb-smartp","url_path":"cell-phones/asus-zenfone-2-ze551ml-us-version-16gb-smartp","price":99.99,"special_price":null,"final_price":null,"max_price":null,"max_regular_price":null,"minimal_regular_price":null,"minimal_price":null,"price_incl_tax":120.9879,"special_price_incl_tax":null,"special_to_date":null,"special_from_date":null,"type_id":"simple","status":1,"visibility":4,"categories":[{"category_id":"0d4ad9bab9184d69a6e586effdf9c2ea","name":"Cell phones","slug":"cell-phones","path":"cell-phones"}],"configurable_options":[],"configurable_children":[],"tsk":0,"id":"8b7b07c165924a879392f4f51a6f7ce0","type":null,"created_at":"2015-10-06 22:39:34","updated_at":null,"foreign_id":null,"brand":3,"color":6,"deep":0.4,"displaysize":5.5,"frontcameramp":5,"internalstoragegb":16,"memorycardslot":1,"nfc":1,"operatingsystem":1,"pixelsperinchppi":403,"processorcoreghz":"1.8 GHz Intel GTX Quad-Core","rammemorygb":2,"rearcameramp":13,"simcardslots":1,"twosimcards":1,"videorecording":1,"weightoz":6,"yearreleased":2015,"_score":1,"errors":{},"info":{},"parentSku":"ASZF216GBSL","qty":1,"options":[],"product_option":{"extension_attributes":{"custom_options":[],"configurable_item_options":[],"bundle_options":[]}},"checksum":"228214dd5d4b5ace370c6405f2b79a3a1b23ba8f942fc388dd67e948","onlineStockCheckid":"1582188156482-12f9605f-d9a3-0b0e-589a-7f592471a869"}]

Whats curious is that it’s doing two updates and a delete.

Logged in

When I’m logged in I get the behavior described above. It doesn’t update twice/delete, it does however create a new cart (I have a valid cart id from before [added to cart]), it’s set in current-cart-token. I refresh, it pulls old, creates a new cart and updates the new cart with the old articles (but in the process loses the discount)


fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/pull?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":null,"method":"GET","mode":"cors"}); ;

fetch("http://localhost:8080/api/user/order-history?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&pageSize=20&currentPage=1", {"credentials":"omit","headers":{"accept":"application/json, text/plain, */*","accept-language":"nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7","content-type":"application/json","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site"},"body":null,"method":"GET","mode":"cors"}); ;

fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/pull?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/update?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":"{\"cartItem\":{\"sku\":\"ASZF216GBSL\",\"qty\":1,\"product_option\":{\"extension_attributes\":{\"custom_options\":[],\"configurable_item_options\":[],\"bundle_options\":[]}},\"quoteId\":\"e3e4dc3c-3793-4b90-97db-44b11b1b055a\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":"{\"address\":{\"region\":\"\",\"region_id\":0,\"country_id\":\"US\",\"street\":[null,null],\"postcode\":\"\",\"city\":\"\",\"region_code\":\"\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/payment-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-information?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":"{\"addressInformation\":{\"shippingAddress\":{\"countryId\":\"US\",\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"]},\"billingAddress\":{\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"],\"countryId\":\"\"},\"shippingCarrierCode\":null,\"shippingMethodCode\":\"Ground\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL", {"body":null,"method":"GET","mode":"cors"}); ;

fetch("http://localhost:8080/api/cart/apply-coupon?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a&coupon=carlo", {"body":null,"method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":"{\"address\":{\"region\":\"\",\"region_id\":0,\"country_id\":\"US\",\"street\":[null,null],\"postcode\":\"\",\"city\":\"\",\"region_code\":\"\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/payment-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-information?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":"{\"addressInformation\":{\"shippingAddress\":{\"countryId\":\"US\",\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"]},\"billingAddress\":{\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"],\"countryId\":\"\"},\"shippingCarrierCode\":null,\"shippingMethodCode\":\"Ground\"}}","method":"POST","mode":"cors"}); ;

<< Refresh; old cart-id is: e3e4dc3c-3793-4b90-97db-44b11b1b055a

fetch("http://localhost:8080/api/cart/create?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz", {"body":null,"method":"POST","mode":"cors"}); ;
^creates new: 0ca14629-ce68-4e99-a160-367d70920eb0
fetch("http://localhost:8080/api/cart/pull?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=e3e4dc3c-3793-4b90-97db-44b11b1b055a", {"body":null,"method":"GET","mode":"cors"}); ;
^ pulls old.

fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL", {"body":null,"method":"GET","mode":"cors"}); ;

fetch("http://localhost:8080/api/cart/pull?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":null,"method":"GET","mode":"cors"}); ;

fetch("http://localhost:8080/api/cart/update?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":"{\"cartItem\":{\"sku\":\"ASZF216GBSL\",\"qty\":1,\"product_option\":{\"extension_attributes\":{\"custom_options\":[],\"configurable_item_options\":[],\"bundle_options\":[]}},\"quoteId\":\"0ca14629-ce68-4e99-a160-367d70920eb0\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/update?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":"{\"cartItem\":{\"sku\":\"ASZF216GBSL\",\"qty\":1,\"product_option\":{\"extension_attributes\":{\"custom_options\":[],\"configurable_item_options\":[],\"bundle_options\":[]}},\"quoteId\":\"0ca14629-ce68-4e99-a160-367d70920eb0\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":"{\"address\":{\"region\":\"\",\"region_id\":0,\"country_id\":\"US\",\"street\":[null,null],\"postcode\":\"\",\"city\":\"\",\"region_code\":\"\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/stock/check?sku=ASZF216GBSL", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":"{\"address\":{\"region\":\"\",\"region_id\":0,\"country_id\":\"US\",\"street\":[null,null],\"postcode\":\"\",\"city\":\"\",\"region_code\":\"\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/payment-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/payment-methods?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":null,"method":"GET","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-information?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":"{\"addressInformation\":{\"shippingAddress\":{\"countryId\":\"US\",\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"]},\"billingAddress\":{\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"],\"countryId\":\"\"},\"shippingCarrierCode\":null,\"shippingMethodCode\":\"Ground\"}}","method":"POST","mode":"cors"}); ;
fetch("http://localhost:8080/api/cart/shipping-information?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJ1c2VybmFtZSI6ImNhcmxva29rQGdtYWlsLmNvbSIsInVzZXJpZCI6IjkyY2FiYjRlLTY3MWMtNDZjNi1hYmYyLTdkYjRiNjQ2NTk2NyIsImVtYWlsIjoiY2FybG9rb2tAZ21haWwuY29tIiwiY29udGFjdGlkIjoiMjEyZTE0NjAtMzg1NS00MTM4LWI1N2QtMzM2ZDhjNzQ5MjJiIiwiZXhwIjoxNTgyMTg5Mjc4LjAsInJlZnJlc2giOm51bGx9.d__L5ms37X0vr-M72gTIv82rtR25LKveuAkpqmg8lLG9s7FIIz5XEnwwlLlqO4mz&cartId=0ca14629-ce68-4e99-a160-367d70920eb0", {"body":"{\"addressInformation\":{\"shippingAddress\":{\"countryId\":\"US\",\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"]},\"billingAddress\":{\"firstname\":\"\",\"lastname\":\"\",\"city\":\"\",\"postcode\":\"\",\"street\":[\"\"],\"countryId\":\"\"},\"shippingCarrierCode\":null,\"shippingMethodCode\":\"Ground\"}}","method":"POST","mode":"cors"});