Embedded Shop and Basket Help


In the many years it’s been since implementing the embed JS shop I still seem to have problems finding a collective set of instructions for those that go beyond the copy and paste method. I’ve reached out to a couple of the veteran shops to see how they are doing it now as I keep having issues.

This morning I resolved 2 out of 3 of my issues but I still have a lack of understanding on what exactly, or how, the embedded shop functions.

I have a page with the shop embedded that I’ve added:

startToken:"?q=I<?php the_field("spreadshirt_product_id"); ?>"

I pass the design ID per product page because I have some buttons being created in the same manner for each section the product is located it and for the user to change the very product they are looking at.

On another page I have the very same shop code embedded with the exception of the startToken. On this page I passed the product IDs as part of the URL…


So this is where my lack of understanding takes place. Why do the carts not match? For the last example my custom basket page does not work. For the first embedded shop code it works fine.

This could have something to do with my cart page which also has my shop code embedded but in other examples I’ve added:

window.location.hash = '#!/basket'; & startToken: '/basket',

Anyone able to point me in the right direction. Eventually it’s not going to matter as I’m doing away with passing the product IDs by URL but until then I would like both to function when someone ads an item to the cart either way.