Super Simple Ecomm - simplecartjs for MODX

Jul 5, 2013

Simple Squared

There's nothing to this package except a few Chunks to help you along, and a Snippet that registers the javascript includes. That's it. It's simple because, well simplecartjs is actually quite simple to integrate into MODX. Setup is really easy, watch the video tutorials here: https://vimeo.com/channels/555298

See the sample Template for reference. To register the required assets, call the [[simplecartjs]] Snippet in your Template, or the Resource on which you want your cart. Or you can write your own script tags.

The most important property of the Snippet is &checkout_email=`[email protected]` but it defaults to the site's [[++emailsender]] system setting. There are several optional settings to configure the initialization javascript that is output.

Insert the included [[$simplecartjsItem]] Chunk, once for each item you're selling. Set custom properties on each Chunk to define that item's name, price and button text.

Call the included [[$simplecartjsCart]] Chunk.

Style with your own CSS, and you're done :) You can optionally use your own Chunks. There's absolutely no requirement to use the included Chunks. They only represent the most basic implementation, for nearly "plug n play" functionality.

I'd highly recommend you read the simplecartjs documentation for all the features and options: http://simplecartjs.org/documentation

Here are the Snippet properties and their default values:

  • &jQueryVersion=`1.10.2`
  • &jQueryExclude=`0`
  • &initTpl=`simplecartjsInitTpl`
  • &cartStyle=`div`
  • &checkout_type=`PayPal`
  • &checkout_email=`[[++emailsender]]`
  • &currency=`USD`
  • &data=``
  • &language=`english-us`
  • &shippingFlatRate=`0`
  • &shippingQuantityRate=`0`
  • &shippingTotalRate=`0`
  • &taxRate=`0`
  • &taxShipping=`false`

That's it. I told you it was simple :) **Right now this Extra is awaiting approval for inclusion in the MODX Extras Repo.