A small description of our php demo and how to use it!

This demo site contains a small description of our Shirt-Of-Day PHP-Widget and some technical details. You can see the widget in action at the right side. There is a DONATE US! part and you can click the shirt. Now you can buy the shirt (select size, go to checkout).
By the way, most of other content stuff at this demo site doesn't work (e.g. links), this is not a bug it a f.......


You need PHP with curl package for the core functionality (see raw demo). This demo site is driven by PHP and some additional javascript (jQuery) to get a smoother user handling. All you need is to put 2 lines of code into your site, copy the widget source files and setup the widget.

First Steps

The PHP-Widget is pre-configured for using out-of-the box. After copy the PHP-widget source files into the root folder of your website you can put:

    <!-- widget initialization, javascript loader -->
    <?php include_once 'jsWidget/widgetLoader.php';?>
  <!-- place the widget somewhere-->
  <?php include("jsWidget/widget.php"); ?>

into the php sources of your website. Thats all!

Setup the shirt

You need the id of the article and the shop-id of the article's shop. Put these informations into the sprd/ShirtOfDay.php file.

Setup checkout

For placing orders and getting a working checkout you need a Spreadshirt API key. This is a security feature for shop and partner accounts. Please request at Spreadshirt customer support for your own key. Put your API key and your secrect into the sprd/CheckoutController.php file. Now a visitor of your site can buy your shirts.



About the html template

This is EarthlingTwo, a free template by nodethirtythree and Free CSS Templates. It’s kind of a sequel to an older template I did for FCT a long time ago named Earthling.

This template is released under the Creative Commons Attribution license, so use it however you like, just keep the links back to our sites. The scenic photo above is a public domain work from PDPhoto.org. Be sure to check out my other work at my site or follow me on Twitter for news and updates. Have fun.