Last modified by Shop Team on 2023/02/13 22:56

<
From version < 13.1 >
edited by Shop Team
on 2019/08/06 08:21
To version < 14.1 >
edited by Shop Team
on 2023/02/13 22:55
>
Change comment: Renamed back-links.

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +API Tutorials
Content
... ... @@ -28,20 +28,24 @@
28 28  
29 29  To use the full potential of a custom shop implementation it is recommended to import the entries of the [[sellable list>>doc:Sellables]] resource into your own database every 24 hours. The example integration uses the Public Shop API as a direct data source for simplicity, but that is not the recommended approach. The import based solution yields better performance and allows you to introduce all kinds of filtering and sorting options (which are NOT built into the Public Shop API). Once you have imported this data you can build a frontend that meets your requirements.
30 30  
31 -== 3. Build the list page ==
31 +== 3. Build the list page ==
32 32  
33 33  Using the sellable data from your data base, you can now build your own list page giving an overview over the available sellables. Use the "previewImage.url" field directly in your <img> tags. You are free to build any navigational structure and filtering mechanisms you deem necessary. Depending on your needs, the [[doc:ProductType Departments and Categories]] resource might be useful.
34 34  
35 -== 4. Build the detail page ==
35 +== 4. Build the detail page ==
36 36  
37 37  When assembling a detail page on your server, request the [[sellable detail resource>>doc:Sellables]] allowing you to render all available images as well as sizes. If you want to display things like name and description of the product type, appearance names and colors, etc., the [[doc:ProductType]] resource is useful. The response of that resource is slow and rarely changes, so it is a good candidate for caching. In a somewhat generic implementation, the [[doc:Price Formatting Guide]] might be helpful.
38 38  
39 -== 5. Build a basket ==
39 +== 5. Build a basket ==
40 40  
41 -Once a user clicks the add-to-basket button, use the "[[Create a basket>>doc:Baskets]]" resource to create a Spreadshirt basket with the selected sellable in it. Associate the returned basket id with the customer's session. You can now use the fields from the basket payload to assemble a drop-down UI component or something similar. Use the "Update a basket" resource for subsequent customer interactions.
41 +Once a user clicks the add-to-basket button, use the "[[Create a basket>>doc:API.Spreadshirt Public Shop API Documentation.API REST Resources.Baskets.WebHome]]" resource to create a Spreadshirt basket with the selected sellable in it. Associate the returned basket id with the customer's session. You can now use the fields from the basket payload to assemble a drop-down UI component or something similar. Use the "Update a basket" resource for subsequent customer interactions.
42 42  
43 -== 6. Redirect to the Spreadshirt checkout ==
43 +== 6. (Optional) Support promotions ==
44 44  
45 +If you want to show promotion banners in your shop system and enable promotion discounts provided by SpreadShop, we recommend to check out the [[doc:Current Promotion]] resource.
46 +
47 +== 7. Redirect to the Spreadshirt checkout ==
48 +
45 45  Finally, you can redirect the customer to the Spreadshirt checkout using the "shop checkout" link from the basket response. We will take over from there.
46 46  
47 47  \\
image2019-8-2_14-10-26.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +441.9 KB
Content
image2019-8-2_14-10-37.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +441.9 KB
Content
image2019-8-2_14-11-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +441.9 KB
Content
image2019-8-2_14-11-14.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +203.1 KB
Content
image2019-8-2_14-9-28.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +291.4 KB
Content
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -28278940
1 +28278884
url
... ... @@ -1,1 +1,1 @@
1 -https://developer.spreadshirt.net/wiki/spaces/API/pages/28278940/Build your own shop system
1 +https://developer.spreadshirt.net/wiki/spaces/API/pages/28278884/Build your own shop system