We recently tried to integrate the swell commerce plugins on our site. To start with, it seemed that it worked well, and we were able to create a product on swell and have it appear on our page (product image, title, price). However issues arose when we tried to add the add to cart function.
We read that we needed the cart provider as the wrapper on the page for the cart component and add cart component to work. We tried a variety of combinations.
- We tried that “add to cart” component being within the product component (with and without the product ID - We used the product ID URL (both the hash and the name version), we used the product ID hash from swell (end of url on swell product), and the product ID we set (name) - we also tried defining the on-click interaction despite reading that it should automatically do it for the product that it the add to cart component is sitting within - none of this worked ultimately.
- We tried a fresh page with the cart provider at the top and all of the components with the recommended order and variations of that for troubleshooting, no luck either.
Has anyone successfully setup a shop with swell components to avoid having to use the external swell shop?
We’d love to be able to have our products working on-site and to have the user experience stay within the plasmic site.
We’re using vercel to host, if that makes any difference? I read this does not make any difference as to whether the add to cart button would work in plasmic preview (nor when hosted).
The TLDR problem: click add to cart, the cart component does not update, nothing happens
