https://oxidforge.org/wp-content/uploads/2018/01/OXID_forge_sub.png 0 0 Marco Steinhäuser https://oxidforge.org/wp-content/uploads/2018/01/OXID_forge_sub.png Marco Steinhäuser2011-10-18 23:26:462018-02-05 10:17:17oxCounter implementation
What’s new and what has been changed:
- oxOrder::_insert() now does not call oxOrder::_setRecordNumber() (which is deprecated since version 4.6.x), instead calls oxOrder::_setNumber() if order number is not set; in case the order has a defined number, the counter is updated by calling oxCounter::update();
- oxOrder::_setNumber() calls oxCounter::getNext() which returns next possible number for item;
oxCounter class overview:
- oxCounter::getNext( $sIdent ) – returns the next possible number for the given ident;
- oxCounter::update( $sIdent, $iCount ) – updates the current counter;
- the parameter $sIdent – is the name of the counters. For example when saving an order depending on shop configuration order numbers should be unique per shop (1) or unique globally (2), thus in case (1) $sIdent looks “oxOrder_” + shopId or, in case (2), “oxOrder”; the counter name might depend on the table which has special counter rules name (oxOrder, oxUser and etc).