less than a minute read • Updated 2 years ago

Create a purchase button in Squarespace

In this article we show you how to add a simple purchase button to your Squarespace website.


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.

  1. 1

    In Squarespace, click on "Settings".

  2. 2

    Click on "Advanced" under the Website column.

  3. 3

    Click on "Code Injection".

  4. 4

    In the FoxyCart admin, go to the Sample Code page here and copy the snippet of code from Step 1.

  5. 5

    In Squarespace, paste snippet of code into Footer section.

  6. 6

    Save your changes.


Add Purchase Option

Any Squarespace element that can be linked can be used as your purchase option.

  1. 1

    In Squarespace, click on "Pages" and choose page you want to add purchase option to

  2. 2

    Click on "Edit" to edit page content

  3. 3

    Add a button element and style it to your liking

  4. 4

    In the Foxy admin, copy the "href" value from the link example in Step 2 section

  5. 5

    In Squarespace, paste the copied link into the "Link" field

  6. 6

    Modify the product parameters as needed

  7. 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. 1

    Switch to view mode and right-click on your product image

  2. 2

    From the right-click menu choose "Copy Image Address"

  3. 3

    Switch back to edit mode and click to edit your button element

  4. 4

    Click to modify the "Link" field

  5. 5

    At the end of your "Link", add &image=

  6. 6

    Paste the image address you just copied right after the equal sign

  7. 7

    Apply changes and save settings


Need Help?

Did this article answer your questions? Need help with anything? Please click below to contact us.