SMARTi
-
Posts
3 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by SMARTi
-
-
Hi!
Yes I do understand that I need to add the products to my site, but the way I want to add them / remove them to/from the customers cart is where I am thinking of the possibility of using the Squarespace API to accomplish this.
A link to the site is here:
https://www.smarti.dev/smarti-configuration-toolWhen entering the site, select a couple of floors, and select how many rooms there are for each floor and press the generate button.
What I am trying to accomplish is that when a user clicks on the "Add Component" button in a room and selects one, that item should be added to the cart. This should also work for removing the item and updating the amount.
Thanks!
-
So I have a question. Would I be able to call the Squaresapce API through javascript thats in a code block?
As of now I have a code block which contains quite a large script and it basically involves the user adding products to an order list, but in a certain way (without going too much into the details). The problem is that this order list is not in any way associated with products I have in my store. What I want is that when a user adds one of theese products in the code that runs in the code block, the shopping cart should be updated. Like is it possible to add a line of code in the code block that does something like the following:
When a user adds a component :
javascript pseudo code:
squarespaceAPI.call.addProduct(product).toCart(User)
Thanks!
Adding a product to cart in a code block
in Customize with code
Posted
Hi
I was wondering if there was any way to add /remove a product in my store to the cart using a button and some javascript in a code block?
So on my site i am adding a layout designer where a user can add smart components to different rooms (a house or an apartment). When the user adds a component to the room I want to add that component to the cart as well, this also goes for deletion of that item from the room. Can I manage this without using the Squarespace API?