DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Shopping cart

Created:2010-02-18T17:33:18
Changed by:Roman Büchler
Changed:2012-01-09T19:45:29.740000000
Classification:shopcart
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ----
Keywords:shop, cart
Author:Roman Buechler
Email:rb@synac.com
Info 4:
Language:en

img-1 img-2 EXT: Shopping cart - shopcart

EXT: Shopping cart

Extension Key: shopcart

Language: en

Keywords: shop, cart

Copyright 2000-2012, Roman Buechler, <rb@synac.com>

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.org

Table of Contents

EXT: Shopping cart 1

`Introduction 3 <#__RefHeading__2427_1290504815>`_

Foreword 3

What does it do? 3

Screenshots 3

`Administration 5 <#__RefHeading__2437_1290504815>`_

`Configuration 6 <#__RefHeading__2441_1290504815>`_

Functional overview 6

TS setup 6

JS item data 6

`Known problems 7 <#__RefHeading__2449_1290504815>`_

`To-Do list 8 <#__RefHeading__2451_1290504815>`_

`ChangeLog 9 <#__RefHeading__2453_1290504815>`_

Introduction

Foreword

This documentation isn't complete yet. Advanced Typo3 and/or developer knowledge might be needed to get the extension running.

What does it do?

  • Embeds a shopping cart on a web page
  • Specifies an interface for shop items to be placed in the cart
  • Shop item references are saved in a cookie
  • Shop item data is being retrieved through hooks

Screenshots

Administration

Follow these steps to install the extension:

  • Create an extension template for the shop top page.
  • Add the synlib and shopcart static templates
  • Use the constant editor to define the extension parameters.
  • Add the rendering code into the TS setup. This might look something like this:page.80 < plugin.tx_shopcart_pi1

Configuration

Functional overview

Items being added to the cart hold all the data needed to list the item in the cart.

A cookie storing the item reference data is maintained. With the reference data the item data is being compiled upon cart initialization. There might be several sources adding items to the cart. Each item source needs to provide a hook to supply the item details.

Shipping options are compiled by a user method. The default user method allows to compile shipping options defined through TS.

TS setup

general

Property

general

Data type

Array

Description

See /static/base/setup.txt from the extension

Default

render

Property

render

Data type

Array

Description

See /static/base/setup.txt from the extension

Default

shipOptions

Property

shipOptions

Data type

Array

Description

a

passText

b

String

c

Pass through text

a

passRef

b

String

c

Pass through reference

a

text

b

String

c

Text to be shown in selector

a

cost

b

String

c

Cost from option.

a

checkout

b

Bool

c

Flag indicating whether the option enables to proceed to the cashier

a

threshold

b

Float

c

In case the total is bigger, options with this threshold will be available

((Unknown Property))

Property

Data type

Description

Default

[tsref:plugin.tx_shopcart_pi1]

((generated))
Example
plugin.tx_shopcart_pi1.shipOptions {
  10 {
    text = Standard delivery (3 days)
    cost = 15
    checkout = 1
    threshold = 0
  }
  20 {
    text = Standard delivery (3 days)
    cost = 0
    checkout = 1
    threshold = 100
  }
}

JS item data

To add items to the cart an object with the following properties needs to be passed over to the addItemToCart method:

var Item = {

provider : 'shopitem', // string. extension keyuid : 12, // int. with this UID the provider should be able to provide all data from the itemref : 'GH12-196', // string. the item referencetext : 'Jacket', // string. item abbreviationuprice : 12.35, // float. item unit priceresellerUprice : 11.10, // float. item reseller pricequantity : 3.0, // float. order quantityoption : [ // array holding options[ref,text,price], // just list the values for ref, text and price…],

extRef : 23, // the item is associated with a record with this UID from an external system

}

Known problems

None so far

To-Do list

Provide a possibility to generate shipping options dependent on items weight and dimensions.

ChangeLog

0.1.0

Version

0.1.0

Changes

Initial upoad

img-2 10