Documentation TYPO3 par Ameos

tx_ttproducts Class Reference

Inheritance diagram for tx_ttproducts:

Inheritance graph
[legend]
Collaboration diagram for tx_ttproducts:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 main_products ($content, $conf)
 getExternalCObject ($mConfKey)
 products_tracking ($theCode)
 products_basket ($theCode)
 load_noLinkExtCobj ()
 spMarker ($subpartMarker)
 products_display ($theCode)
 setPidlist ($pid_list)
 initRecursive ($recursive)
 initCategories ()
 generatePageArray ()
 initBasket ($basket)
 checkExtraAvailable ($name, $key)
 setBasketExtras ($basket)
 getClearBasketRecord ()
 createOrder ()
 getBlankOrderUid ()
 getOrderRecord ($orderUid, $tracking='')
 getOrderNumber ($orderUid)
 finalizeOrder ($orderUid, $mainMarkerArray=array())
 getPrice ($price, $tax=1)
 searchWhere ($sw)
 getLinkUrl ($id="", $excludeList="")
 priceFormat ($double)
 mapPersonIntoToDelivery ()
 checkRequired ()
 includeCalcScript ($calcScript, $conf)
 includeHandleScript ($handleScript, $conf)
 getItemMarkerArray ($row, $catTitle, $imageNum=0, $imageRenderObj="image")
 userProcess ($mConfKey, $passVar)
 addURLMarkers ($markerArray)
 generateRadioSelect ($key)
 cleanConfArr ($confArr, $checkShow=0)
 getBasket ($subpartMarker="###BASKET_TEMPLATE###", $templateCode="", $mainMarkerArray=array())
 shopAdmin ()
 getTrackingInformation ($orderRow, $templateCode)
 sendNotifyEmail ($recipient, $v, $tracking, $uid, $templateCode)

Public Attributes

 $cObj
 $searchFieldList = "title,note,itemnumber"
 $pid_list = ""
 $uid_list = ""
 $categories = array()
 $pageArray = array()
 $orderRecord = array()
 $templateCode = ""
 $basket = array()
 $basketExtra
 $recs = Array()
 $personInfo
 $deliveryInfo
 $calculatedBasket
 $calculatedSums_tax
 $calculatedSums_no_tax
 $config = array()
 $conf = array()
 $tt_product_single = ""
 $globalMarkerArray = array()
 $externalCObject = ""

Detailed Description

changes:

12.9.2001

added 'page browsing': <- 1 2 3 ->

13.9.2001 René Fritz

added range check for $begin_at

14.9.2001 René Fritz bugfix: with adding of page browsing 'orderby' was damaged

19.9.2001 René Fritz changed counting select to 'select count(*)'

20.9.2001 René Fritz new TS value 'stdSearchFieldExt' extends the search fields. Example: 'stdSearchFieldExt = note2,year'

Definition at line 70 of file class.tx_ttproducts.php.


Member Function Documentation

tx_ttproducts::addURLMarkers markerArray  ) 
 

Adds URL markers to a markerArray

Definition at line 1076 of file class.tx_ttproducts.php.

Referenced by products_basket().

tx_ttproducts::checkExtraAvailable name,
key
 

Check if payment/shipping option is available

Definition at line 616 of file class.tx_ttproducts.php.

tx_ttproducts::checkRequired  ) 
 

Checks if required fields are filled in

Definition at line 979 of file class.tx_ttproducts.php.

References t3lib_div::trimExplode().

Referenced by products_basket().

tx_ttproducts::createOrder  ) 
 

Create a new order record

This creates a new order-record on the page with pid, .PID_sys_products_orders. That page must exist! Should be called only internally by eg. getBlankOrderUid, that first checks if a blank record is already created.

Definition at line 684 of file class.tx_ttproducts.php.

References t3lib_div::intInRange().

tx_ttproducts::finalizeOrder orderUid,
mainMarkerArray = array()
 

Finalize an order

This finalizes an order by saving all the basket info in the current order_record. A finalized order is then marked "not deleted" and with status=1 The basket is also emptied, but address info is preserved for any new orders. $orderUid is the order-uid to finalize $mainMarkerArray is optional and may be pre-prepared fields for substitutiong in the template.

Definition at line 761 of file class.tx_ttproducts.php.

References t3lib_div::isFirstPartOfStr(), t3lib_div::makeInstance(), t3lib_div::makeInstanceClassName(), and t3lib_div::trimExplode().

Referenced by products_basket().

tx_ttproducts::generatePageArray  ) 
 

Generates an array, ->pageArray of the pagerecords from ->pid_list

Definition at line 562 of file class.tx_ttproducts.php.

Referenced by products_basket(), and products_display().

tx_ttproducts::generateRadioSelect key  ) 
 

Generates a radio or selector box for payment shipping

Definition at line 1096 of file class.tx_ttproducts.php.

tx_ttproducts::getBasket subpartMarker = "###BASKET_TEMPLATE###",
templateCode = "",
mainMarkerArray = array()
 

This generates the shopping basket layout and also calculates the totals. Very important function.

Definition at line 1150 of file class.tx_ttproducts.php.

Referenced by products_basket().

tx_ttproducts::getBlankOrderUid  ) 
 

Returns a blank order uid. If there was no order id already, a new one is created.

Blank orders are marked deleted and with status=0 initialy. Blank orders are not necessarily finalized because users may abort instead of buying. A finalized order is marked "not deleted" and with status=1. Returns this uid which is a blank order record uid.

Definition at line 722 of file class.tx_ttproducts.php.

Referenced by products_basket().

tx_ttproducts::getClearBasketRecord  ) 
 

Returns a clear 'recs[tt_products]' array - so clears the basket.

Definition at line 662 of file class.tx_ttproducts.php.

tx_ttproducts::getExternalCObject mConfKey  ) 
 

Get External CObjects

Definition at line 212 of file class.tx_ttproducts.php.

Referenced by load_noLinkExtCobj(), and main_products().

tx_ttproducts::getItemMarkerArray row,
catTitle,
imageNum = 0,
imageRenderObj = "image"
 

Fills in the markerArray with data for a product

Definition at line 1021 of file class.tx_ttproducts.php.

Referenced by products_display().

tx_ttproducts::getLinkUrl id = "",
excludeList = ""
 

Returns a url for use in forms and links

Definition at line 940 of file class.tx_ttproducts.php.

References t3lib_div::_GP(), and t3lib_div::inList().

Referenced by products_display(), and products_tracking().

tx_ttproducts::getOrderNumber orderUid  ) 
 

This returns the order-number (opposed to the order_uid) for display in the shop, confirmation notes and so on. Basically this prefixes the .orderNumberPrefix, if any

Definition at line 748 of file class.tx_ttproducts.php.

tx_ttproducts::getOrderRecord orderUid,
tracking = ''
 

Returns the orderRecord if $orderUid. If $tracking is set, then the order with the tracking number is fetched instead.

Definition at line 739 of file class.tx_ttproducts.php.

Referenced by products_tracking().

tx_ttproducts::getPrice price,
tax = 1
 

Returns the $price with either tax or not tax, based on if $tax is true or false. This function reads the TypoScript configuration to see whether prices in the database are entered with or without tax. That's why this function is needed.

Definition at line 911 of file class.tx_ttproducts.php.

tx_ttproducts::getTrackingInformation orderRow,
templateCode
 

Tracking administration

Definition at line 1394 of file class.tx_ttproducts.php.

References t3lib_div::_GP().

Referenced by products_tracking().

tx_ttproducts::includeCalcScript calcScript,
conf
 

Include calculation script which should be programmed to manipulate internal data.

Definition at line 996 of file class.tx_ttproducts.php.

tx_ttproducts::includeHandleScript handleScript,
conf
 

Include handle script

Definition at line 1003 of file class.tx_ttproducts.php.

Referenced by products_basket().

tx_ttproducts::initBasket basket  ) 
 

Initialized the basket, setting the deliveryInfo if a users is logged in

$basket is the TYPO3 default shopping basket array from ses-data

Definition at line 576 of file class.tx_ttproducts.php.

References t3lib_div::intInRange(), t3lib_div::testInt(), and t3lib_div::trimExplode().

Referenced by main_products().

tx_ttproducts::initCategories  ) 
 

Getting all tt_products_cat categories into internal array

Definition at line 550 of file class.tx_ttproducts.php.

Referenced by main_products().

tx_ttproducts::initRecursive recursive  ) 
 

Extends the internal pid_list by the levels given by $recursive

Definition at line 536 of file class.tx_ttproducts.php.

Referenced by products_basket(), and products_display().

tx_ttproducts::main_products content,
conf
 

Main method. Call this from TypoScript by a USER cObject.

Definition at line 108 of file class.tx_ttproducts.php.

References $conf, $globalMarkerArray, t3lib_div::_GET(), getExternalCObject(), initBasket(), initCategories(), t3lib_div::intInRange(), products_basket(), products_display(), products_tracking(), setPidlist(), and t3lib_div::trimExplode().

tx_ttproducts::mapPersonIntoToDelivery  ) 
 

Fills in all empty fields in the delivery info array

Definition at line 967 of file class.tx_ttproducts.php.

Referenced by products_basket().

tx_ttproducts::priceFormat double  ) 
 

Formatting a price

Definition at line 960 of file class.tx_ttproducts.php.

tx_ttproducts::products_basket theCode  ) 
 

Takes care of basket, address info, confirmation and gate to payment

Definition at line 247 of file class.tx_ttproducts.php.

References t3lib_div::_GP(), addURLMarkers(), checkRequired(), finalizeOrder(), generatePageArray(), getBasket(), getBlankOrderUid(), includeHandleScript(), initRecursive(), load_noLinkExtCobj(), mapPersonIntoToDelivery(), setPidlist(), and spMarker().

Referenced by main_products().

tx_ttproducts::products_display theCode  ) 
 

Displaying single products/ the products list / searching

Definition at line 340 of file class.tx_ttproducts.php.

References t3lib_div::_GP(), generatePageArray(), getItemMarkerArray(), getLinkUrl(), initRecursive(), t3lib_div::intInRange(), searchWhere(), setPidlist(), and spMarker().

Referenced by main_products().

tx_ttproducts::products_tracking theCode  ) 
 

Order tracking

Definition at line 222 of file class.tx_ttproducts.php.

References t3lib_div::_GP(), getLinkUrl(), getOrderRecord(), getTrackingInformation(), shopAdmin(), and spMarker().

Referenced by main_products().

tx_ttproducts::searchWhere sw  ) 
 

Generates a search where clause.

Definition at line 932 of file class.tx_ttproducts.php.

Referenced by products_display().

tx_ttproducts::sendNotifyEmail recipient,
v,
tracking,
uid,
templateCode
 

Send notification email for tracking

Definition at line 1542 of file class.tx_ttproducts.php.

References t3lib_div::trimExplode().

tx_ttproducts::setBasketExtras basket  ) 
 

Setting shipping and payment methods

Definition at line 625 of file class.tx_ttproducts.php.

References t3lib_div::intExplode().

tx_ttproducts::setPidlist pid_list  ) 
 

Sets the pid_list internal var

Definition at line 529 of file class.tx_ttproducts.php.

Referenced by main_products(), products_basket(), and products_display().

tx_ttproducts::shopAdmin  ) 
 

Returns 1 if user is a shop admin

Definition at line 1381 of file class.tx_ttproducts.php.

References t3lib_div::_GP().

Referenced by products_tracking().

tx_ttproducts::spMarker subpartMarker  ) 
 

Returning template subpart marker

Definition at line 327 of file class.tx_ttproducts.php.

Referenced by products_basket(), products_display(), and products_tracking().

tx_ttproducts::userProcess mConfKey,
passVar
 

Calls user function

Definition at line 1064 of file class.tx_ttproducts.php.


Member Data Documentation

tx_ttproducts::$conf = array()
 

Should normally be set in the main function with the TypoScript content passed to the method.

$conf[LOCAL_LANG][_key_] is reserved for Local Language overrides. $conf[userFunc] / $conf[includeLibs] reserved for setting up the USER / USER_INT object. See TSref

Reimplemented from tslib_pibase.

Definition at line 99 of file class.tx_ttproducts.php.

Referenced by main_products().


The documentation for this class was generated from the following file:


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6