Hooks in commerce
as of 01/04/2007
Update ist coming soon,in the moment there are about 50-60 Functions with hooks, more to follow
This document describes all the hooks in the typo3 extension commerce (version 0.8.17) as of 01/04/2007. The hooks are sorted by the classes and functions they can be found in.
Each hook has a type which is either Single or Multiple. Single hook classes are written directly to the $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$filename][$hookname] variable as there may never be more than one hook-object.
For hooks with the type "multiple" $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$filename][$hookname] is an array which can contain multiple hook objects. Each of them is called in the order they are found in the array by foreach.
Some hook-methods can return data which is used by the calling function. Others may return some values but they are ignored. For those I used the return type void as known from the C programming language
as of 09/11/2009
Functions: 57
Classes: 17
class tx_commerce_article
function init
function getActualPriceforScaleUid
function calculateDeliveryCosts
function getStock
function hasStock
getSpecialPrice
class tx_commerce_attribute_value
function init
class tx_commerce_attribute
function init
class tx_commerce_basket_item
function calculate_net_sum
function calculate_gross_sum
class tx_commerce_category
function init
class tx_commerce_db_article
function get_prices
class tx_commerce_db_category
function get_child_categories
function get_child_products
class tx_commerce_db_product
function get_articles
class tx_commerce_navigation
function makeArrayPostRender
function getDataRow
class tx_commerce_pibase
function makeListView
function makeBasketInformation
function makeLineView
function addAdditionalLocallang
function renderProductsForList
function renderProduct
function getArticleMarker
class tx_commerce_product
function init
class tx_commerce_pi1
function preInit
function renderSingleView
function makeArticleView
class tx_commerce_pi2
function handleBasket
function generateBasket
function makeArticleView
function makeProductList
function makePayment
function makeDelivery
function postInit
function postDeleteArtUidSingle
class tx_commerce_pi3
function getBillingAddress
function getDeliveryAddress
function getListing
function canMakeCheckout
function finishIt
function getBasketSum
function handleAddress
function sendUserMail
function sendAdminMail
function generateMail
function validationMethod_
function alternativePaymentStep
function prepayment
class tx_commerce_pi4
function noUser
function deleteAddress
function getAddresses
function getInputField
function saveAddressData
function validationMethod_
function processListingMarker
function processAddressfieldsMarkerArray
function processAddressMarker
function processAddressFormMarker
class tx_commerce_categorytree
function loadRecords
tx_commerce_articlecreator
function createArticle
lib/class.tx_commerce_article.php
class tx_commerce_article
function init
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['postinit']
Call: postinit($this)
Type: Multiple
Result: void
These hooks are called after the initialization of the Object.
function getActualPriceforScaleUid
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['getActualPriceforScaleUid']
Call: getActualPriceforScaleUid($count,$this)
Type: Single
Result: float - The price for $count times the article
The hook should return the uid of the price depending on the $count parameter which contains the number of articles to be bought.
function calculateDeliveryCosts
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['calculateDeliveryCost']
Call: calculateDeliveryCostNet($this->deliveryCostNet,$this)
Type: Single
Result: void
This hooks job is to set the $deliveryCostNet variable to the net delivery cost
Call: calculateDeliveryCostGross($this->deliveryCostGross,$this)
Type: Single
Result: void
This hooks job is to set the $deliveryCostGross variable to the gross delivery cost
function getStock
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['getStock']
Call: getStock($this->stock,$this)
Type: Single
Result: void
Set the stock available for this article using this hook
function hasStock
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['hasStock']
Call: hasStock($amount,$this)
Type: Single
Result: boolean - Are there enough articles in stock
Return true iff there are enough articles in stock where $amount is the number of articles to be bought
getSpecialPrice
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['specialPrice']
Call: specialPrice($specialPrice, $this->prices_uids)
Type: Single
Result: void
Set the $specialPrice for this article. $specialPrice is an array with current price and PriceUid. $this->prices_uid is an array containing all the valid prices.
lib/class.tx_commerce_attribute_value.php
class tx_commerce_attribute_value
function init
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_attribute_value.php']['postinit']
Call: postinit($this)
Type: Multiple
Result: void
These hooks are called after the initialization of the Object.
lib/class.tx_commerce_attribute.php
class tx_commerce_attribute
function init
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_attribute.php']['postinit']
Call: postinit($this)
Type: Multiple
Result: void
These hooks are called after the initialization of the Object.
lib/class.tx_commerce_basket_item.php
class tx_commerce_basket_item
function calculate_net_sum
TODO
function calculate_gross_sum
TODO
lib/class.tx_commerce_category.php
class tx_commerce_category
function init
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_category.php']['postinit']
Call: postinit($this)
Type: Multiple
Result: void
These hooks are called after the initialization of the Object.
lib/class.tx_commerce_db_article.php
class tx_commerce_db_article
function get_prices
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_db_article.php']['priceOrder']
Call: priceOrder($orderField)
Type: Single
Result: string - The new ORDER BY clause to read the database
Change the order for the price field and return a new $orderField
lib/class.tx_commerce_db_category.php
class tx_commerce_db_category
function get_child_categories
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_db_category.php']['categoryOrder']
Call: categoryOrder($this->CategoryOrderField,$this)
Type: Single
Result: string - The new ORDER BY clause to read the database
This hook returns the ORDER BY field(s) that will be passed on to the t3lib_db later on.
function get_child_products
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_db_category.php']['productOrder']
Call: productOrder($this->orderField,$this)
Type: Single
Result: string - The new ORDER BY clause to read the database
This hook returns the ORDER BY field(s) that will be passed on to the t3lib_db later on.
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_db_category.php']['productQueryPreHook']
productQueryPreHook($data, $this)
Type: Single
Result: queryArray -> Modificated QueryArray to work with the database
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_db_category.php']['productQueryPostHook']
productQueryPostHook($data, $this)
Type: Single
Result: queryArray -> Modificated of data after the query
lib/class.tx_commerce_db_product.php
class tx_commerce_db_product
function get_articles
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_product.php']['articleOrder']
Call: additionalWhere($where)
Type: Single
Result: string - The new WHERE clause to read the database
The result of this hook is concatenated with the where clause which will be passed on to the t3lib_db later on.
lib/class.tx_commerce_navigation.php
class tx_commerce_navigation
function makeArrayPostRender
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_db_navigation.php']['sortingOrder']
Call: sortingOrder($sorting,$uid_root,$mainTable,$tableMm,$mDepth,$path,$this)
Type: Multiple
TODO: Add a description for this hook
As I did not understand what this function does I was not able to describe this hook
function getDataRow
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_navigation.php']['getDataRow']
Call: processDataRow($row,$tableName,$this)
Type: Multiple
posibilty to modify records used in navigation
lib/class.tx_commerce_pibase.php
class tx_commerce_pibase
function makeListView
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['listview']
Call: additionalMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD some markers to the $markerArray and RETURN it as the result of this hook is used as the new $markerArray
function makeBasketInformation
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['makeBasketInformation']
Call: processMarkerBasketInformation($markerArray,$basketObj,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD some markers to the $markerArray and RETURN it as the result of this hook is used as the new $markerArray
function makeLineView
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['makeLineView']
Call: processMarkerLineView($markerArray,$basketItemObj,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD some markers to the $markerArray and RETURN it as the result of this hook is used as the new $markerArray
formatAttributeValue
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['formatAttributeValue']
Call: formatAttributeValue($key, $myAttributeUid, $matrix[$myAttributeUid]['valueuidlist'][$key], $return2, $this)
Type: Single
Result: string, new formating
Changes the default formating
addAdditionalLocallang
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['locallang']
Call: loadAdditionalLocallang($this)
Type: Multiple
possibility to add your own locallang-files
renderProduct
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['product']
Call: additionalMarkerProduct($markerArray,$myProduct,$this)
Type: Multiple
Possibilty to modify Marker
additionalSubpartsProduct($subpartArray,$myProduct,$this)
Type: Multiple
Possibilty to modify Subparts
ModifyContentProduct($content,$myProduct,$this)
Type: Multiple
Possibilty to modify content
function makeBasketInformation
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['makeBasketInformation']
Call: processMarkerTaxInformation($taxRateTemplate,$basketObj,$this)
Type: Multiple
Result: $taxRateTemplate
possibility to regenerates taxrates and $taxRateTemplate in order to recalculate
taxes.
lib/class.tx_commerce_product.php
class tx_commerce_product
function init
GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['makeLineView']
Call: postinit($this)
Type: Multiple
Result: void
These hooks are called after the initialization of the Object.
pi1/class.tx_commerce_pi1.php
This class is for generating the product listings. (single and list view)
class tx_commerce_pi1
function preInit
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi1/class.tx_commerce_pi1.php']['init']
Call: preInit($this)
Type: Multiple
Result: void
Hook for rewriting something like configuration in the init of the extension.
function renderSingleView
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['singleview']
Call: additionalMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional Markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray
function makeArticleView
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['articleview']
Call: $hookObj->additionalMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional Markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray
This Hook exists three times. It is called for every possible result of the if-switches, so it is only called once for every call of the function. It is anyway called immediately before the call to substituteMarkerArray is made
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['additionalMarkerMakeArticleView']
Call: $hookObj->additionalMarkerMakeArticleView$markerArray,$prod,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional Markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray
This Hook is called at the end of the method, for global replace
pi2/class.tx_commerce_pi2.php
This class is for showing the basket
class tx_commerce_pi2
function handleBasket
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['main']
Call: postInit($this)
Type: Multiple
Result: bool
Hook in the init of pi2 for own basket rendering.
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['postdelBasket']
Call: postdelBasket($this->basket, $this)
Type: Multiple
Result: void
Hook after deleting the basket
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['postartAddUid']
Call: postartAddUid($this->basket,$this)
Type: Multiple
Result: void
Hook for editing the basket after adding an article to it
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['postartAddUid']
Call: postDeleteArtUidSingle($k, $v, $oldCountValue, $this->basket, $this)
Type: Multiple
Result: void
Hook for editing the basket after deleting article form basket
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['postpayArt']
Call: postpayArt($this->basket,$this)
Type: Multiple
Result: void
Hook for editing the basket after adding a payment article to it
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['postdelArt']
Call: postdelArt($this->basket,$this)
Type: Multiple
Result: void
Hook for editing the basket after adding a delivery article to it
function generateBasket
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['generateBasketMarker']
Call: additionalMarker($basketArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
This $markerArray is then used to substitute the template-code for the basket.
function makeArticleView
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['makeArticleView']
Call: additionalMarker($basketArray,$this,$art,$prod)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
This $markerArray is then used to substitute the template-code for the article view.
function makeProductList
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['makeProductList']
Call: SingeDisplayPrefixId()
Type: Multiple
Result: integer - The new prefixId
Changes the prefixId used to create the links to the detail page.
function makePayment
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['paymentArticles']
Call: paymentAllowedArticles($this,$allowedArticles);
Type: Multiple
Result: Array of articles
Changes the allowed articles for Payment
function makeDelivery
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['deliveryArticles']
Call: deliveryAllowedArticles($this,$allowedArticles);
Type: Multiple
Result: Array of articles
Changes the allowed articles for Delivery
pi3/class.tx_commerce_pi3.php
Handles the checkout
class tx_commerce_pi3
function main
function getBillingAddress
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['main']
Call: preSwitch($this->currentStep, $this)
Type: Multiple
Result: non
Method to manipulate $this and other GLOBAL Vars
Call: postSwitch($this->currentStep, $content,$this)
Type: Multiple
Result: $content
Manuipulate Content after call of method
Call:postRender($this->currentStep, $content, $this)
Type: Multiple
Result: $content
Manuipulate Content after call of method render steps
function getDeliveryAddress
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['getDeliveryAddress']
Call: ProcessMarker($markerArray, $this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
This $markerArray is used to substitute the template-code for the "get delivery address"-page.
function getListing
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['getListing']
Call: ProcessMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
This $markerArray is used to substitute the template-code for the "contents of basket"-page.
function canMakeCheckout
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['canMakeCheckout']
Call: canMakeCheckoutOwnTests($checks,$myCheck)
Type: Multiple
Result: void
The parameter $checks is an array with the standard checks of commerce. If you remove for example nopayment from the array
commerce does not check if there is a payment article included.
With the second parameter you can add your own checks. Set $myCheck to a string and it will be used here:
return $this->cObj->cObjGetSingle($this->conf['cantMakeCheckout.'][$canMakeCheckout], $this->conf['cantMakeCheckout.'][$canMakeCheckout.'.']);
function finishIt
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['finishIt']
Call: prepayment($paymentObj,$basket,$this)
Type: Multiple
Result: void
This is called right after the basket is loaded and before the payment is called.
Call: postpayment($paymentObj,$basket,$this)
Type: Multiple
Result: void
This is called when the payment is finished.
Call: generateOrderId($orderId, $basket, $this)
Type: Multiple
Result: void
This is your chance to change the orderId. Return the new $orderId
Call: preinsert($orderData,$this)
Type: Multiple
Result: void
Your last chance to change the order data (cncerning the Addresses). Next step is to inject the data into the database.
Call: modifyBasketPreSave($basket,$this)
Type: Multiple
Result: void
Your last chance to change the order content (basket). Next step is to insert the data into the database.
Call: modifyOrderArticlePreSave($newUid, $oaData, $this);
Type: Multiple
Result: void
Change insert OrderData before they are inserted
Call: modifyOrderArticlePostSave($newUid, $oaData, $this)
Type: Multiple
Result: void
possibility to revert changes made in the presave hook
Call: afterMailSend($orderData,$this)
Type: Multiple
Result: void
Now it's to late. We just sent the acknowledgment to the customer and the admin. But you can change the orderData before the acknowledgment is written to the browser
Call: ProcessMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
One more chance to change the $markerArray. Now it's used to display the page confirming the ordering
function getBasketSum
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['getBasketSum']
Call: ProcessMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
This $markerArray is used to substitute the output of the BasketSum. I.e. the "'###LISTING_BASKET_'.strtoupper($type).'###'" sub part of the template.
function getBasketSum
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['handleAddress']
Call: preProcessUserData($feuData,$this)
Type: Multiple
Result: void
manipulation of fe_user Data, for example for creating a md5 password, before the user is created
Call: preProcessUserData($feuData,$this)
Type: Multiple
Result: void
manipulation of fe_user Data, for example after creating a md5 password, after the user is created
$feuData will be used in the next steps (for example sending a usermail
function sendUserMail
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['sendUserMail']
Call: getUserMail($userMail,$orderUid,$orderData)
Type: Multiple
Result: string - The email address of the user
At this point you should return the email address of the user.
Call: preGenerateMail($UserMailObj,$this)
Type: Multiple
Result: void
This hook is called before the mail content is created by calling $UserMailObj->generateMail($orderUid, $orderData,$userMarker) where $UserMailObj is an instance of the class tx_commerce_pi3.
Call: PostGenerateMail($UserMailObj,$this,$GLOBALS['TSFE']->fe_user->tx_commerce_basket,$mailcontent,$this)
Type: Multiple
Result: void
This hook is called immediately after creating the mailcontent. It could be used to edit $mailcontent for example.
function sendAdminMail
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['sendAdminMail']
Call: preGenerateMail($AdminMailObj,$this)
Type: Multiple
Result: void
This hook is called before the mail content is created by calling $AdminMailObj->generateMail($orderUid, $orderData) where $UserMailObj is an instance of the class tx_commerce_pi3.
Call: $hookObj->PostGenerateMail($AdminMailObj,$this,$GLOBALS['TSFE']->fe_user->tx_commerce_basket,$mailcontent,$this)
Type: Multiple
Result: void
This hook is called immediately after creating the mailcontent. It could be used to edit $mailcontent for example.
function generateMail
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['generateMail']
Call: ProcessMarker($markerArray,$this)
Type: Multiple
Result: array() - A new $markerArray
ADD additional markers to the $markerArray and RETURN it. The result of this hook is used as the new $markerArray.
$markerArray will be used to substitute the markers in the mail template
function validationMethod_
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['bevorValidateAddress']
$act_method is build by the string "validationMethod_" and your method - name
Call: $act_method($this,$name,$value)
Type: Multiple
Result: BOOL
this hook can be used to implement own validation methods.
function alternativePaymentStep
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['handlePayment']
Call: alternativePaymentStep($paymentObj, $this);
Type: Multiple
Result: BOOL
this hook can be used to implement your own payment handling.
pi4/class.tx_commerce_pi4.php
class tx_commerce_pi4
handles everything concerning the addresses
function noUser
[TODO]
function deleteAddress
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['deleteAddress']
Call: deleteAddress($this->piVars['addressid'],$this)
Type: Multiple
Result: string - A system message (potentially ignored)
The result of the last called hook will replace the ###SYS_MESSAGE### marker in the address listing generated later on.
ATTENTION: If there are multiple hooks the results of the prior called ones are ignored. Of cause these hooks could be useful by changing &$this->piVars['addressid'] or &$this
function getAddresses
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses']
Call: editSelectStatement($select, $userId, $addressType, $this)
Type: Multiple
Result: manipulates the select statement
function getInputField
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getInputField']
Call: postGetInputField($content, $fieldName, $fieldConfig, $fieldValue, $this)
Type: Multiple
Result: returns manipulated content
function saveAddressData
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['saveAddress']
Call: beforeAddressSave($newData,$this)
Type: Multiple
Result: void
This hook is called before the new address is saved to the database.
$newdata is an array consisting of the following elements:
$newData['tx_commerce_fe_user_id'] - The users id in the "fe_user"-table
$newData['tx_commerce_address_type_id'] - The id of the address type
$newData['pid'] - The pid of the address
Call: afterAddressSave($newUid,$newData,$this)
Type: Multiple
Result: void
This hook is called after the new address is saved to the database.
$newUid is the uid of the address in the "tt_address"-table
For a description of $newData look at
beforeAddressSave($newData,$this)-hook in this section
Call: beforeAddressEdit($this->piVars['addressid'],$newData,$this)
Type: Multiple
Result: void
This hook is called before the address is changed
$this->piVars['addressid'] is the uid of the address in the "tt_address"-table
For a description of $newData look at
beforeAddressSave($newData,$this)-hook in this section
Call: afterAddressEdit($this->piVars['addressid'],$newData,$this)
Type: Multiple
Result: void
This hook is called after the address is changed
$this->piVars['addressid'] is the uid of the address in the "tt_address"-table
For a description of $newData look at
beforeAddressSave($newData,$this)-hook in this section
function validationMethod_
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['bevorValidateAddress']
$act_method is build by the string "validationMethod_" and your method - name
Call: $act_method($this,$name,$value)
Type: Multiple
Result: BOOL
this hook can be used to implement own validation methods.
function processListingMarker
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getListing']
Call: processListingMarker($baseMA, $linkMA, $addressItems, $addressType, $piArray, $this)
Type: Multiple
Result: void
this hook can be used to manipulate markers in the listing of addresses.
function processAddressMarker
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getListing']
Call: processAddressMarker($itemMA, $address, $piArray, $this)
Type: Multiple
Result: void
this hook can be used to manipulate markers in the listing of addresses.
function processAddressFormMarker
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddressFormItem']
Call: processAddressFormMarker($baseMA, $action, $addressUid, $addressData, $config, $this)
Type: Multiple
Result: void
this hook can be used to manipulate markers from one address from the listing of addresses.
function processAddressfieldsMarkerArray
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddressFormItem']
Call: processAddressfieldsMarkerArray($fieldsMarkerArray, $tplField, $addressData, $action, $addressUid, $config , $this)
Type: Multiple
Result: void
this hook can be used to manipulate markers from one address from the listing of addresses.
class.tx_commerce_articlecreator.php
tx_commerce_articlecreator
function createArticle
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/class.tx_commerce_articlecreator.php']['preinsert']
Call: preinsert($articleData)
Type: Multiple
Result: void
This hook is called before a new article is added to the database.
class.leadData.php
leafData
function loadRecords
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/tree/class.leafData.php']['loadRecords']
Call: extendedFields($articleData)
Type: Multiple
Result: void
This Hooks adds additional fields to the TreeData