Add a simple purchase option
In this tutorial we show you how to add a simple purchase option to your Squarespace website.
In this article
Add Sidecart Functionality
To display the sidecart when a customer adds a product to cart and store customer sessions, you must first load the needed Foxy loader file into your Squarespace website.
- 1
- In Squarespace, click on "Settings".
- 2
- Click on "Advanced" under the Website column.
- 3
- Click on "Code Injection".
- 4
- In the FoxyCart admin, go to the Sample Code page here and copy the snippet of code from Step 1.
- 5
- In Squarespace, paste snippet of code into Footer section.
- 6
- Save your changes.
Add Purchase Option
Any Squarespace element that can be linked can be used as your purchase option.
- 1
-
In Squarespace, click on "Pages" and choose page you want to add purchase option to
- 2
-
Click on "Edit" to edit page content
- 3
-
Add a button element and style it to your liking
- 4
-
In the Foxy admin, copy the "href" value from the link example in Step 2 section
- 5
- In Squarespace, paste the copied link into the "Clickthrough URL" field
- 6
- Modify the product parameters as needed
- 7
- Apply changes and save settings
Display Product Image In Cart
You can display the product image in the cart by passing in the image url as a product parameter.
- 1
-
Switch to view mode and right-click on your product image
- 2
-
From the right-click menu choose "Copy Image Address"
- 3
-
Switch back to edit mode and click to edit your button element
- 4
-
Click to modify the "Clickthrough URL"
- 5
- At the end of your "Clickthrough URL" add &image=
- 6
- Paste the image address you just copied right after the equal sign
- 7
- Apply changes and save settings