Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.7. Tutorial

By now you just got an impression of how you should set up a shop system with kb_shop and a reference to all available properties, markers and fields.

This tutorial aims at giving a short glimpse about what is possible with kb_shop. When you implemented a shop system on your own and you think that you have a nice structure and want to improve this document then write a tutorial how to implement your kind of shop and I will add it to this document in a section called "Real-world examples".

This tutorial doesn't base on a real project but is rather just a little guide on how to set up a basic table containing some fields, two tables (one of them virtual) for letting an order process happen and will show some basic practices how to create nice web-shops.

IMPORTANT: If you haven't noticed it until now by yourself I should point you at the fact that KB-Shop not only is good for real shop systems where people order products and other stuff but for ANY listing of records. For example if you have a website of a customer and have to list entries for "Talks" which have been held, or a listing for "Brochures" ... or a simple "Jobs" listing you will in some cases not be able to use the standard content elements cause some special sorting (for example after a field "Publication Date") has to get used. In this case you could create a table whose name fits their contents and insert a listing plugin on the specific page. Then the Editors just will have to create Records of Type "Brochue" or similar and will get a nice list sorted after criterias you define using the criteria Tab in the FE plugin.

Example 1: An assumed example bookshop

Step 1: Table Configuration Folder

First you have to create a sysfolder somewhere in your page-structure (most common somewhere on the root-level, next to your extension template storage folder probably). This folder will contain the categories and properties used in the shop.

Step 2: Install Extensions

Make settings: TCA Mode = 1, Property/Category Folder = Folder created in Step 1

Step 3: Create some properties

Example how to create a "Title" Text field property and a IMAGE property for exampe.

Step 4: Create a root category

Step 5: Assign properties

Step 6: Clear shop-cache

Not normal blue/red cache buttons!

Step 7: Create example records

Step 8: Insert and configure FE plugin

Insert record directly on page (Allow Table on Pages must be set in Step 4)

Step 9: Create a HTML template.

Step 10: Create custom TS

Step 11: View result

Step 12: Create order properties

firstname, lastname, addres, + section containing fields ordered product (dbrel) and order amount

Step 13: Create order root-categories / tables

And assign them the order properties. There must be one table which has the virtual flag set.

Step 14: Insert a FE plugin for ordering

Fill the Forms Tab.

Step 15: Create a HTML template for ordering

Copy over listing tempate and insert order amount fields, create delivery/billing addres template

Step 16: View result