Blog » Post

Click to agree, an example for E-Junkie carts

In response to some requests, we've posted example HTML and Javascript code for making a "click to agree" checkbox work with E-Junkie "Add to Cart" links. Feel free to go right to the code and its explanation here: Click to Agree for E-Junkie: An Example.

For posterity, here's more background:

The website we created for Common Craft is integrated with E-Junkie, who provides the cart / checkout pages for the sale of Common Craft's video downloads. E-Junkie is a nice, hosted, shopping cart service that we've found to work well, in our experience using it with Common Craft.

On the Common Craft website, when someone wants to buy a video download, they click an "add to cart" link that then triggers a custom process we created, different than what's standard with E-Junkie. (Click around this video page to see it in action.) That process includes the requirement that the buyer check a box indicating that they agree to Common Craft's video licensing agreement.

A number of people have asked Common Craft (and us directly, as well), how we did this. And, we couldn't find an example posted by anyone else, so we thought it'd be helpful to release an example based on the Common Craft code.

On the current Common Craft website, the code is actually very elaborate, because it's part of a larger process tailored to the specific needs of the Common Craft website—to help buyers select the correct options (license, format, language, etc.) for the videos they are about to purchase.

But, we actually had created some E-Junkie-specific code for the old Common Craft website, that did simply what people were looking for: it required users to check a box prior to making a purchase (e.g., a "click to agree to our license agreement" checkbox).

So, the code example we've posted is a well-commented version of the simpler code we created for the old Common Craft website. Again, you can see the code and its explanation here: Click to Agree for E-Junkie: An Example.

Thanks to Lee and Sachi at Common Craft for allowing us to post this code!

Let us know (here, in the comments) if you have any questions!

Blog Archives

Next post: Goodbye 2009, New Year Thanks

Prev post: Site Launch: Extraordinary Groups (the book)