In this article we'll show you how to use Carrd's button element to create a Foxy purchase option.
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 a hidden embed element in your Carrd website.
- In the Foxy dashboard, go to the Sample Code page.
- On the Sample Code page, copy the snippet of code from Step 1.
- In Carrd, click on the "Add an element" icon.
- From the elements menu, click on the "Embed" option.
- In the Embed panel, set the "Style" to "Hidden".
- Paste the snippet of code you just copied into the "Code" field.
- Click on the "Done" button to save your changes.
Link Button Element
- In Carrd, select your purchase button to load the Buttons panel.
- Go to the Foxy Sample Code page to get a sample purchase link.
- From the Step 2 section, copy the link example href value.
- In Carrd, paste the link you just copied into the "URL" field.
- Modify the product parameters as needed. More information about product parameters can be found in our wiki here .
- Click on "Done" to save your changes.
- Click on the "Save" icon to display the Publish panel.
- Scroll down and click on the "Publish Changes" button.
- Test your purchase button to ensure it works as expected.