Embed Spreadshirt T-Shirt Designer into your shop system

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History


The product prices for fulfillment partners differ from Spreadshirt's regular consumer prices. The prices displayed in the T-Shirt Designer are those of the fulfillment price list agreed on with the partner and directly connected to your Spreadshirt shop. Since the fulfillment prices for products sent into Spreadshirt via the Order API (fulfillment API) are free of any partner commissions, do not contain a commission, you have the possibility to add your own surcharge by using the *calculatePriceFunction*.

To calculate prices for display in the T-Shirt Designer the option *calculatePriceFunction* has to be set for the creation of the confomat instance. This function's definition looks the following:
return product.price * 1.2 + product.configurations.length * 2;
},
addToBasketFunction: function(item, function(basketItem, callback) {

// replace with ajax request
// refresh basket content
var div = document.createElement("div");
div.innerHTML = '<img src="http://image.spreadshirt.net/image-server/v1/products/' + item.productId basketItem.productId + '/views/1" />';
document.getElementById("basket").appendChild(div);