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

Chapter 1. EXT: KB Shop

Extension Key: kb_shop

Copyright 2000-2002, Bernhard Kraft, Tomas Peterson, <kraftb@kraftb.at, info@thomas-peterson.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

1.1. Introduction

What does it do?

This extension is a special kind of shop system which enables you to dynamically define the table structure of multiple tables similar like in the Extension kickstarter of TYPO3. This allows you to create a shopping system tailored perfectly to your needs. You create “Category” records which define the tables available in the system. Then you create property records like “Title” (Text field), “Description” (RTE field), etc. and assign those properties to the categories. The shop extension automatically creates an ext_tables.sql, ext_tables.php and tca.php file for the defined tables which makes them available like in TYPO3 like normal “News” or “Guestbook” tables.

But this is not the only sense of this extension. It also offers a very configurable FE Plugin which enables you to output lists generated from those tables – the FE plugin is some kind of “general data display” extension – but only allowing you to display tables generated by this extension. You can dynamically define criterias by which the displayed records shall get filtered. You can either choose to display only records with a criteria set to a specific predefined value or you can decide to let the choice which records to display to the website visitor and display “Criteria selectors” in the FE.

The FE plugin is completely extendable via TypoScript as all properties from the tables get passed through stdWrap and custom cObjects can get inserted into the FE Output which get's generated from HTML-Templates. You can not only insert the values of the fields which you created before but also the labels of the specific fields.

The extension supports multilinugal content.

The extension support a shopping basket by storing the user-data (ordered products, wishlist, etc.) in so called “virtual” tables. Those tables don't really get stored in the database but rather in the FE-User session of the visitor.

There exists a mailer extension (kb_shop_mailer) which allows to send mails on successful ordering. This is achieved via a hook. When a virtual-table (an basket) get's stored to the database it becomse an “order” - upon such an event a hook get's called which can perform various tasks like performing payment or simply sending mails.

Screenshots

This screenshot shows a property which is assigned ot a root-category/table and a record of the resulting table when edited:

On the left you see how a property/field get's defined. On the right side you see how the generated field looks when editing a record having this field assigned.