less than a minute read • Updated 2 years ago

Create a purchase button in SpaceCraft

In this article we'll show you how to use SpaceCraft's button block to create a Foxy purchase button.


Add Foxy Code Snippet

To display the sidecart when a customer adds a product to cart and to store customer sessions, Foxy's code snippet must be added to the footer of your SpaceCraft website.

  1. 1

    In the Foxy admin, go to the Sample Code page here .

  2. 2

    On the Sample Code page, copy the code snippet from Step 1.

  3. 3

    In the SpaceCraft dashboard, click on the Developer icon at top.

  4. 4

    Under Developer Tools, click on the "Body JS" link.

  5. 5

    Paste the Foxy code snippet into the code editor.

  6. 6

    Click on the "Save" button to save changes.


Create Products Page

If you haven't created your Products page yet, the following steps will show you how.

  1. 1

    Click on the "Content" link at top.

  2. 2

    Click on the "Add New Pages" button.

  3. 3

    From the list of page types, choose "Products".

  4. 4

    Click on the "Add" button to create the page.


Add Products

The following steps can be applied to any page type in SpaceCraft, not just products.

  1. 1

    From the Products page, click on the "Add A product" button.

  2. 2

    Fill out your product information.

  3. 3

    Below the Price block, click on the plus sign icon to add a new block.

  4. 4

    Choose the "Button" option.

  5. 5

    In the Foxy admin, go to the Sample Code page here .

  6. 6

    On the Sample Code page, copy the "href" value from the link example in Step 2 section.

  7. 7

    In SpaceCraft, paste the product link into the Button URL field and modify the product parameters as needed. You can learn more about product links here .

  8. 8

    Specify your button text.

  9. 9

    Publish your changes and test to ensure purchase button works as expected.

  10. 10

    Repeat steps for each additional product.


Need Help?

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