Welcome
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.......
Requirements
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:
<head>
...
<!-- widget initialization, javascript loader -->
<?php include_once 'jsWidget/widgetLoader.php';?>
...
</head>
<body>
...
<!-- place the widget somewhere-->
<?php include("jsWidget/widget.php"); ?>
...
</body>
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.
