Skip to content
Andy Day edited this page Jul 9, 2015 · 3 revisions

Examples

Add to Cart Button

Prerequisites

Before proceeding make sure to follow the setup steps in Getting Started.

Usage

To use the Add To Cart Widget, copy and paste the following code into the HTML of your site.

<div data-fc-addtocart="OPTIONS"></div>

For example this snippet sets all available options.

<div data-fc-addtocart="type:link;buttonText:BUY;loadingText:BUYing...ean:9780300197716"></div>

Options

Option Valid Values Default Value Description
type default, primary, or link default default button, primary button, or link. These are all Bootstrap button designations.
buttonText text string Add to Cart The text shown on the button / link
loadingText text string Adding to Cart... The text shown when the item is in the middle of being added to the cart. Shows progress.
ean EAN/ISBN-13 NO DEFAULT The EAN/ISBN-13 of the book to add to the cart. This is setting is required.

Clone this wiki locally