Adding ADD TO CART links

Adding ADD TO CART links
You can use ADD TO CART links on your site and third party sites by simply adding the following line of code to an element like a button on the book pages of your site. When an end customer clicks the link, they will be taken to your Glassboxx cart with the ISBN specified added:
Magento websites and carts:
<a href=”https://[cart-url]/addtobasket?sku=[ISBN13]&fromurl=[fullurl-of-calling-page]” title=”Buy now on Glassboxx”>ADD TO CART</a>
WooCommerce websites and carts:
<a href=”https://[cart-url]/?add-to-cart=[product_id]&quantity=[qty]”>ADD TO CART
You should replace [cart-url] with the URL of your Glassboxx cart, and the following parameters populated as required:
SKU – (Mandatory) replace [ISBN13} with the ISBN13/SKU of the book. This must be passed exactly as it has been uploaded to your website/cart. If an ISBN is passed that is not present on your website/cart, the message ‘Sorry, [ISBN13] is not currently available on {publisher-name} website.’ is displayed in the basket.
Fromurl – (Optional) replace [fullurl-of-calling-page] with the URL of the page on your site on which the ADD TO CART Link has been added. This allows the Continue shopping button in the cart to return to the original page on your site.
Automatically embedding ADD TO CART links
To automatically embed ADD TO CART links into the pages of your site, your IT developer just needs to add a script that generates the ADD TO CART link code above on the pages of your site. This is normally straight forward for your IT developer to implement.
With the addtobasket script, make sure the ISBN13 used in the links has been uploaded to your Glassboxx account – if not, your customers will see an error message when they click through to the cart from your site.