Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

tx_commerce_dmhooks Class Reference

List of all members.

Public Member Functions

 tx_commerce_dmhooks ()
 processDatamap_preProcessFieldArray (&$incomingFieldArray, $table, $id, $pObj)
 saveCategoryRelations ($cUid, $fieldArray=NULL, $saveAnyway=false, $delete=true, $updateXML=true)
 saveProductRelations ($pUid, $fieldArray=NULL)
 processDatamap_postProcessFieldArray ($status, $table, $id, &$fieldArray, $pObj)
 processDatamap_afterDatabaseOperations ($status, $table, $id, $fieldArray, $pObj)
 moveOrders ($status, $table, $id, &$fieldArray, &$th_obj)
 doNotChangeCrdate ($status, $table, $id, &$fieldArray, &$th_obj)
 recalculateOrderSum ($status, $table, $id, &$fieldArray, &$th_obj)

Public Attributes

 $belib
 $catList = NULL

Constructor & Destructor Documentation

tx_commerce_dmhooks::tx_commerce_dmhooks  ) 
 

This is just a constructor to instanciate the backend library

Author:
Thomas Hempel <thomas@work.de>


Member Function Documentation

tx_commerce_dmhooks::doNotChangeCrdate status,
table,
id,
&$  fieldArray,
&$  th_obj
 

Process Data when saving Order Basically removes the crdate field and so prevents vom chan ging the crdate by admin

Parameters:
[type] $status: ...
[type] $table: ...
[type] $id: ...
[type] $fieldArray: ...
[type] $th_obj: ...
Returns:
[type] ...
Author:
Ingo Schmitt <is@marketing-factory.de>

tx_commerce_dmhooks::moveOrders status,
table,
id,
&$  fieldArray,
&$  th_obj
 

Process Data when saving Order Change the PID from this order via the new field newpid As TYPO3 don't allowes changing the PId directly

Parameters:
[type] $status: ...
[type] $table: ...
[type] $id: ...
[type] $fieldArray: ...
[type] $th_obj: ...
Returns:
[type] ...
Author:
Ingo Schmitt <is@marketing-factory.de>
: Should all relations to orders be moved oder should we invent separate storage folders for order_articles and system_informations as Payment and Customers

tx_commerce_dmhooks::processDatamap_afterDatabaseOperations status,
table,
id,
fieldArray,
pObj
 

When all operations in the database where made from TYPO3 side, we have to make some special entries for the shop. Because we don't use the built in routines to save relations between tables, we have to do this on our own. We make it manually because we save some additonal information in the relation tables like values, correlation types and such stuff. The hole save stuff is done by the "saveAllCorrelations" method. After the relations are stored in the database, we have to call the dynaflex extension to modify the TCA that it fit's the current situation of saved database entries. We call it here because the TCA is allready built and so the calls in the tca.php of commerce won't be executed between now and the point where the backendform is rendered.

Parameters:
[type] $status: ...
[type] $table: ...
[type] $id: ...
[type] $fieldArray: ...
[type] $pObj: ...
Returns:
[type] ...
Author:
Thomas Hempel <thomas@work.de>

tx_commerce_dmhooks::processDatamap_postProcessFieldArray status,
table,
id,
&$  fieldArray,
pObj
 

tx_commerce_dmhooks::processDatamap_preProcessFieldArray &$  incomingFieldArray,
table,
id,
pObj
 

This hook is processed BEFORE a datamap is processed (save, update etc.) We use this to check if a product or category is inheriting any attributes from other categories (parents or similiar). It also removes invalid attributes from the fieldArray which is saved in the database after this method. So, if we change it here, the method "processDatamap_afterDatabaseOperations" will work with the data we maybe have modified here.

Parameters:
array $incomingFieldArray: the array of fields that where changed in BE (passed by reference)
string $table: the table the data will be stored in
integer $id: The uid of the dataset we're working on
object $pObj: The instance of the BE Form
Returns:
void
Author:
Thomas Hempel <thomas@work.de>
Since:
6.10.2005
Author:
Ingo Schmitt <is@marketing-factory.de> Calculation of missing price
Since:
13.12.2005 / 03.01.2006 Fixed Bug in passing Variables to getUidFromKey Ingo Schmitt <is@marketing-factory.de>
Price from tax calculation
Since:
06.10.2005
Author:
Ingo Schmitt <is@marketing-factory.de>
Do nothing;

Calculare from net

Calculate from gross

Do Localisation in Output

Do some Checks with the data,

tx_commerce_dmhooks::recalculateOrderSum status,
table,
id,
&$  fieldArray,
&$  th_obj
 

Process Data when saving Ordered_artciles Recalculate Order sum

Parameters:
[type] $status: ...
[type] $table: ...
[type] $id: ...
[type] $fieldArray: ...
[type] $th_obj: ...
Returns:
[type] ...
Author:
Ingo Schmitt <is@marketing-factory.de>
Calculate Sums

tx_commerce_dmhooks::saveCategoryRelations cUid,
fieldArray = NULL,
saveAnyway = false,
delete = true,
updateXML = true
 

[Describe function...]

Parameters:
[type] $cUid: ...
[type] $fieldArray: ...
[type] $saveAnyway: ...
[type] $delete: ...
[type] $updateXML: ...
Returns:
[type] ...
Author:
Thomas Hempel <thomas@work.de>

tx_commerce_dmhooks::saveProductRelations pUid,
fieldArray = NULL
 

Saves all relations between products and his attributes

Parameters:
integr $pUid: The UID of the product
array $fieldArray:
Author:
Thomas Hempel <thomas@work.de>


Member Data Documentation

tx_commerce_dmhooks::$belib
 

tx_commerce_dmhooks::$catList = NULL
 


The documentation for this class was generated from the following file:
Generated on Sun Jan 13 23:12:20 2008 for tx_commerce by  doxygen 1.4.4