less than a minute read • Updated 2 years ago
Create a purchase button in Squarespace
Add Foxy Code Snippet
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.
In Squarespace, click on "Settings".
Click on "Advanced" under the Website column.
Click on "Code Injection".
In the FoxyCart admin, go to the Sample Code page here and copy the snippet of code from Step 1.
In Squarespace, paste snippet of code into Footer section.
Save your changes.
Add Purchase Option
Any Squarespace element that can be linked can be used as your purchase option.
In Squarespace, click on "Pages" and choose page you want to add purchase option to
Click on "Edit" to edit page content
Add a button element and style it to your liking
In the Foxy admin, copy the "href" value from the link example in Step 2 section
In Squarespace, paste the copied link into the "Link" field
Modify the product parameters as needed
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.
Switch to view mode and right-click on your product image
From the right-click menu choose "Copy Image Address"
Switch back to edit mode and click to edit your button element
Click to modify the "Link" field
At the end of your "Link", add &image=
Paste the image address you just copied right after the equal sign
Apply changes and save settings