diff --git a/doc/hooks.html b/doc/hooks.html index acd0847..c148c68 100644 --- a/doc/hooks.html +++ b/doc/hooks.html @@ -58,6 +58,7 @@ Some hook-methods can return data which is used by the calling function. Others
class tx_commerce_article
function init
+
function load_data
function getActualPriceforScaleUid
function calculateDeliveryCosts
function getStock
@@ -185,6 +186,14 @@ Some hook-methods can return data which is used by the calling function. Others Result: void
These hooks are called after the initialization of the Object. +
function load_data
+
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['post_loaddata']
+
+ Call: post_loaddata($this)
+ Type: Multiple
+ Result: void
+ These hooks are called after the data of the Object is loaded. +
function getActualPriceforScaleUid
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['getActualPriceforScaleUid']
diff --git a/lib/class.tx_commerce_article.php b/lib/class.tx_commerce_article.php index de0a5ca..121d0ac 100644 --- a/lib/class.tx_commerce_article.php +++ b/lib/class.tx_commerce_article.php @@ -476,25 +476,32 @@ return $this->conn_db->getSupplierName($this->getSupplierUid()); } return ''; - } - - - /** - * Loads the data and divides comma sparated images in array - * @access public - * @return void - */ - - function load_data($translationMode = false) { - parent::load_data($translationMode); - $this->load_prices($translationMode); - $this->images_array=t3lib_div::trimExplode(',',$this->images); - $this->calculateDeliveryCosts(); - - } - - - /** + } + + + /** + * Loads the data and divides comma sparated images in array + * @access public + * @return void + */ + function load_data($translationMode = false) { + parent::load_data($translationMode); + $this->load_prices($translationMode); + $this->images_array = t3lib_div::trimExplode(',', $this->images); + $this->calculateDeliveryCosts(); + + if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['post_loaddata'])) { + foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['post_loaddata'] as $classRef) { + $hookObj = &t3lib_div::getUserObj($classRef); + if (method_exists($hookObj, 'post_loaddata')) { + $hookObj->post_loaddata($this); + } + } + } + } + + + /** * Calculates the Net deliverycost for this article * Called by $this->load_data() * @return delivery_cost