Documentations for all the spreadshirt stuff.
Documentation for the infrastructure of the developer site, drupal stuff and so on.
display by node type
<?php
$match = FALSE;
$types = array('story' => 1, 'page' => 1, 'event' => 1, 'view' =>1);
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nid = arg(1);
$type = db_result(db_query("SELECT type FROM {node} WHERE nid=%d", $nid));
if (isset($types[$type])) {
$match = TRUE;
}
}
return $match;
?>
display by user role
<?php
global $user;
if (in_array('Approved Role',$user->roles)) {
return TRUE;
} else {
return FALSE;
}
?>
If you want to spread your knowledge with the community and programming some cool stuff with our Services then you need a full featured Developer Account.
With this account you get writing access to our subversion repository so you can host your stuff there. You can create your project documentation in the documentation area and you get special moderation rights.
There are som simple stepps you have to take before you become a real Spreadshirt Developer:
We want to organize the Projects with the help of categorys, so please specify the category where you want to store your Project in the descripion area.
These are tho most important steps to host your project at the spreadshirt developer network.
Documentation for the spreadshop webservice based on the SOAP protocol.
This document is designed for technical staff who are implementing spreadshop web services. It describes the interfaces, methods and properties offered by the web services and how they can be invoked by a calling application.
| Code |
Description |
|---|---|
AT |
Austria |
DE |
Germany |
ES |
Spain |
FI |
Finnland |
FR |
France |
GB |
Great Britan |
IE |
Ireland |
JP |
Japan |
NL |
Netherlands |
NO |
Norway |
PL |
Poland |
RU |
Russia |
SE |
Sweden |
| Code |
Description |
|---|---|
US |
United States |
CA |
Canada |
| Code |
Name |
|---|---|
de |
German |
en |
English |
es |
Spanish |
fi |
Finnish (Suomi) |
fr |
French |
it |
Italian |
ja |
Japanese |
nl |
Dutch |
no |
Norwegian |
pl |
Polish |
ru |
Russian |
se |
Swedish |
zh |
Chinese |
| Code |
Name |
|---|---|
es |
Spanish |
fr |
French |
us |
American English |
| Parameter |
Possible Values |
|---|---|
img_id |
Depends on view_count. Most products have two printable sides, so use 1 for front view and 2 for back view. |
Size |
small = 42x42 px medium = 130x130 px big = 190x190 px huge = 280x280 px |
List of Functions
The SOAP web service is used by spreadshop websites to:
Accept the Spreadshirt Terms&Conditions. Without that, the order process cannot proceed.
This section describes the method's signature, specifics about each parameter passed, and returned results.
accept_tnc (
string token
)
The return value is boolean.
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:101: missing token
The SOAP web service is used by spreadshop websites to:
put an article into the shopping basket
This section describes the method's signature, specifics about each parameter passed, and returned results.
add_basketitem (
string token,
int article_id,
int quantity,
int producttype_size_id,
int producttype_color_id
)
The return value is a scalar that contains the following:
101: missing token
103: Missing size
104: Missing quantity
105: Article is stockout
108: Article quantity exceeds limit
201: empty result set
The SOAP web service is used by spreadshop websites to:
get an article object
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_article (
string token,
int article_id
)
The return value is a complex response_object that contains the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing token
102: Missing article_id
201: empty result set
The SOAP web service is used by spreadshop websites to:
get a list of article objects
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_articles (
string token,
int shop_id,
int producttype_id,
int design_id,
string order_by,
int position,
int limit,
string search_phrase
)
The return value is a list of complex response_objects that contain the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing token
102: Missing shop_id
1201: empty result set
The SOAP web service is used by spreadshop websites to:
get a list of basket items
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_basket (
string token
)
The return value is a scalar that contains the following:
101: missing token
201: empty result set
The SOAP web service is used by spreadshop websites to:
get a list of design objects
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_designs (
string token,
int shop_id,
int position,
int limit,
string search_phrase
)
The return value is a list of complex response_objects that contain the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing token
102: Missing shop_id
201: empty result set
The SOAP web service is used by spreadshop websites to:
get a list of product type objects available in the specified shop
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_producttypes (
string token,
int shop_id,
int producttype_category_id,
int position,
int limit,
string search_phrase
)
The return value is a list of complex response_objects that contain the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing token
102: Missing shop_id
201: empty result set
The SOAP web service is used by spreadshop websites to:
get a list of producttype category objects
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_producttype_categories (
string token,
int shop_id,
)
The return value is a list of complex response_objects that contain the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing token
102: Missing shop_id
201: empty result set
The SOAP web service is used by spreadshop websites to:
Retrieve the Spreadshirt Terms&Conditions in the language selected in the session.
This section describes the method's signature, specifics about each parameter passed, and returned results.
get_tnc (
string token
)
The return value is a string.
101: missing token
The SOAP web service is used by spreadshop websites to: initialize a client session
This section describes the method's signature, specifics about each parameter passed, and returned results.
initialize_session (
int shop_id
)
The return value is a scalar that contains the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing shop_id
201: Shop not existing
The SOAP web service is used by spreadshop websites to:
redeem a coupon by customer. You have to create a basket first!
This section describes the method's signature, specifics about each parameter passed, and returned results.
redeem_coupon (
string token
string shop_id
string coupon_code
)
The return value is boolean.
101: missing token
102: missing coupon_code
201: empty result set
300: coupon errors
The SOAP web service is used by spreadshop websites to:
update a basket item's quantity or size in shopping basket
This section describes the method's signature, specifics about each parameter passed, and returned results.
update_basketitem (
string token,
int basketitem_id,
int quantity,
int producttype_size_id,
int producttype_color_id
)
The return value is a scalar that contains the following:
101: missing token
102: missing ship_id
103: Missing size
104: Missing quantity
105: Article is stockout
108: Article quantity exceeds limit
201: empty result set
The SOAP web service is used by spreadshop websites to:
update a client session
This section describes the method's signature, specifics about each parameter passed, and returned results.
update_session (
string token,
string lang,
string locale
)
The return value is a scalar that contains the following:
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method:
101: missing shop_id
107: missing language code
108: missing locale code
201: empty result set