2 min read • Updated a month ago
Create an add to cart button or link in Webstudio
Add Sidecart Functionality
To display the sidecart when a customer adds a product to the cart, you need to include the Foxy loader file in your Webstudio project.
Note
You can skip this section if you already added your foxy loader script to your project.
Obtain the Foxy Loader Code
2Navigate to the Settings -> Website & Products
3Copy the code snippet from the Foxy loader.js section textarea.
Add the Code in Webstudio
1Open your Webstudio project.
2Click on the Webstudio logo in the top-left corner and select Project Settings.
3In the General section, locate the Custom Code field.
4Paste the copied Foxy loader code into this field.
Link Component
1In Webstudio, add a Link component to your page.
2Set the link text (e.g., "Add to Cart").
3Customize the link appearance as desired.
4Set the href
attribute for the link to your Foxy product link.
5You can use our Link & Form Builder on the Foxy Admin to set up and copy your Direct Link.
Both options allow customers to add a product to their cart seamlessly. Choose the component that fits your design and interaction requirements.