https://oxidforge.org/wp-content/uploads/2015/10/logo_oxidforge-300x85.png 0 0 Marco Steinhäuser https://oxidforge.org/wp-content/uploads/2015/10/logo_oxidforge-300x85.png Marco Steinhäuser2011-10-18 23:26:462015-07-26 23:28:43oxCounter 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).