Definition at line 12 of file oxorder.php.
oxOrder.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxBase.
Definition at line 123 of file oxorder.php.
oxOrder.__get | ( | $ | sName | ) |
Getter made for order deliveryset object access
string | $sName parameter name |
Reimplemented from oxBase.
Definition at line 140 of file oxorder.php.
oxOrder.assign | ( | $ | dbRecord | ) |
Assigns data, stored in DB to oxorder object
mixed | $dbRecord DB record |
Reimplemented from oxBase.
Definition at line 154 of file oxorder.php.
oxOrder._getCountryTitle | ( | $ | sCountryId | ) | [protected] |
Gets country title by country id.
string | $sCountryId Cuntry ID |
Definition at line 187 of file oxorder.php.
oxOrder.getOrderArticles | ( | ) |
Assigns data, stored in oxorderarticles to oxorder object .
Definition at line 204 of file oxorder.php.
oxOrder.getOrderDeliveryPrice | ( | ) |
Returns order delivery expenses price object
Definition at line 226 of file oxorder.php.
oxOrder.getOrderWrappingPrice | ( | ) |
Returns order wrapping expenses price object
Definition at line 243 of file oxorder.php.
oxOrder.getOrderPaymentPrice | ( | ) |
Returns order payment expenses price object
Definition at line 260 of file oxorder.php.
oxOrder.getOrderNetSum | ( | ) |
Returns order netto sum (total price, including delivery, payment etc - VAT) (A. this is very unprecise :())
Definition at line 278 of file oxorder.php.
Order checking, processing and saving method. Before saving performed checking if order is still not executed (checks in database oxorder table for order with know ID), if yes - returns error code 3, if not - loads payment data, assigns all info from basket to new oxorder object and saves full order with error status. Then executes payment. On failure - deletes order and returns error code 2. On success - saves order (oxorder.save()), removes article from wishlist (oxorder._updateWishlist()), updates voucher data (oxorder._markVouchers()). Finally sends order confirmation email to customer (oxemail.SendOrderEMailToUser()) and shop owner (oxemail.SendOrderEMailToOwner()). If this is order racalculation, skipping payment execution, marking vouchers as used and sending order by email to shop owner and user Mailing status (1 if OK, 0 on error) is returned.
oxBasket | $oBasket Shopping basket object | |
object | $oUser Current user object | |
bool | $blRecalculatingOrder Order recalculation |
Definition at line 310 of file oxorder.php.
oxOrder._setOrderStatus | ( | $ | sStatus | ) | [protected] |
Updates order transaction status. Faster than saving whole object
string | $sStatus order transaction status |
Definition at line 395 of file oxorder.php.
oxOrder._loadFromBasket | ( | oxBasket $ | oBasket | ) | [protected] |
Gathers and assigns to new oxorder object customer data, payment, delivery and shipping info, customer odere remark, currency, voucher, language data. Additionally stores general discount and wrapping. Sets order status to "error" and creates oxorderarticle objects and assigns to them basket articles.
oxBasket | $oBasket Shopping basket object |
Definition at line 411 of file oxorder.php.
oxOrder.getOrderLanguage | ( | ) |
Returns language id of current order object. If order allready has language defined - checks if this language is defined in shops config
Definition at line 486 of file oxorder.php.
oxOrder._setUser | ( | $ | oUser | ) | [protected] |
Assigns to new oxorder object customer delivery and shipping info
object | $oUser user object |
Definition at line 505 of file oxorder.php.
oxOrder._setWrapping | ( | oxBasket $ | oBasket | ) | [protected] |
Assigns wrapping VAT and card price + card message info
oxBasket | $oBasket basket object |
Definition at line 552 of file oxorder.php.
oxOrder._setOrderArticles | ( | $ | aArticleList | ) | [protected] |
Creates oxorderarticle objects and assigns to them basket articles. Updates quantity of sold articles (oxarticle.updateSoldAmount()).
array | $aArticleList article list |
Definition at line 581 of file oxorder.php.
oxOrder._executePayment | ( | oxBasket $ | oBasket, | |
$ | oUserpayment | |||
) | [protected] |
Executes payment. Additionally loads oxPaymentGateway object, initiates it by adding payment parameters (oxPaymentGateway.setPaymentParams()) and finally executes it (oxPaymentGateway.executePayment()). On failure - deletes order and returns * error code 2.
oxBasket | $oBasket basket object | |
object | $oUserpayment user payment object |
Definition at line 674 of file oxorder.php.
oxOrder._getGateway | ( | ) | [protected] |
Returns the correct gateway. At the moment only switch between default and IPayment, can be extended later.
Definition at line 707 of file oxorder.php.
oxOrder._setPayment | ( | $ | sPaymentid | ) | [protected] |
Creats and returns user payment.
string | $sPaymentid used payment id |
Definition at line 719 of file oxorder.php.
oxOrder._setFolder | ( | ) | [protected] |
oxOrder._updateWishlist | ( | $ | aArticleList, | |
$ | oUser | |||
) | [protected] |
aAdds/removes user chosen article to/from his noticelist or wishlist (oxuserbasket.addItemToBasket()).
array | $aArticleList basket products | |
object | $oUser user object |
Definition at line 795 of file oxorder.php.
oxOrder._updateNoticeList | ( | $ | aArticleList, | |
$ | oUser | |||
) | [protected] |
After order is finished this method cleans up users notice list, by removing bought items from users notice list
array | $aArticleList array of basket products | |
oxuser | $oUser basket user object |
Definition at line 835 of file oxorder.php.
oxOrder._updateStock | ( | ) | [protected] |
oxOrder._markVouchers | ( | $ | oBasket, | |
$ | oUser | |||
) | [protected] |
Markes voucher as used (oxvoucher.markAsUsed()) and sets them to $this->_aVoucherList.
Definition at line 884 of file oxorder.php.
oxOrder.save | ( | ) |
Updates/inserts order object and related info to DB
Reimplemented from oxBase.
Definition at line 911 of file oxorder.php.
oxOrder.getDelAddressInfo | ( | ) |
Loads and returns delivery adress object or null if deladrid is not configured, or object was not loaded
Definition at line 933 of file oxorder.php.
oxOrder.validateStock | ( | $ | oBasket | ) |
Function whitch cheks if article stock is valid. If not displays error and returns false.
object | $oBasket basket object |
oxOutOfStockException | exception |
Definition at line 961 of file oxorder.php.
oxOrder._insert | ( | ) | [protected] |
Inserts order object information in DB. Returns true on success.
Reimplemented from oxBase.
Definition at line 983 of file oxorder.php.
oxOrder._update | ( | ) | [protected] |
Updates object parameters to DB.
Reimplemented from oxBase.
Definition at line 1017 of file oxorder.php.
oxOrder.delete | ( | $ | sOxId = null |
) |
Updates stock information, deletes current ordering details from DB, returns true on success.
string | $sOxId Ordering ID (default null) |
Reimplemented from oxBase.
Definition at line 1031 of file oxorder.php.
oxOrder.recalculateOrder | ( | $ | aNewOrderArticles = array() , |
|
$ | blChangeDelivery = false , |
|||
$ | blChangeDiscount = false | |||
) |
Recalculates order. Starts transactions, deletes current order and order articles from DB, adds current order articles to virtual basket and finaly recalculates order by calling oxorder.finalizeOrder() If no errors, finishing transaction.
array | $aNewOrderArticles article list of new order | |
bool | $blChangeDelivery if delivery was changed in admin | |
bool | $blChangeDiscount if discount was changed in admin |
Definition at line 1082 of file oxorder.php.
oxOrder.pdfFooter | ( | $ | oPdf | ) |
Fake entries, pdf is generated in modules.. myorder.
mixed | $oPdf pdf object |
Definition at line 1193 of file oxorder.php.
oxOrder.pdfHeaderplus | ( | $ | oPdf | ) |
Fake entries, pdf is generated in modules.. myorder.
mixed | $oPdf pdf object |
Definition at line 1204 of file oxorder.php.
oxOrder.pdfHeader | ( | $ | oPdf | ) |
Fake entries, pdf is generated in modules.. myorder.
mixed | $oPdf pdf object |
Definition at line 1215 of file oxorder.php.
oxOrder.genPdf | ( | $ | sFilename, | |
$ | iSelLang = 0 | |||
) |
Fake entries, pdf is generated in modules.. myorder.
string | $sFilename file name | |
int | $iSelLang selected language |
Definition at line 1227 of file oxorder.php.
oxOrder.getInvoiceNum | ( | ) |
oxOrder.getNextBillNum | ( | ) |
Returns next possible (free) order bill number.
Definition at line 1247 of file oxorder.php.
oxOrder.getShippingSetList | ( | ) |
Loads possible shipping sets for this order
Definition at line 1258 of file oxorder.php.
oxOrder.getVoucherNrList | ( | ) |
Get vouchers numbers list which were used with this order
Definition at line 1283 of file oxorder.php.
oxOrder.getOrderSum | ( | $ | blToday = false |
) |
Returns orders total price
bool | $blToday if true calculates only current day orders |
Definition at line 1305 of file oxorder.php.
oxOrder.getOrderCnt | ( | $ | blToday = false |
) |
Returns orders count
bool | $blToday if true calculates only current day orders |
Definition at line 1324 of file oxorder.php.
oxOrder._checkOrderExist | ( | $ | sOxId = null |
) | [protected] |
Checking if this order is already stored.
string | $sOxId order ID |
Definition at line 1344 of file oxorder.php.
oxOrder._sendOrderByEmail | ( | $ | oUser = null , |
|
$ | oBasket = null , |
|||
$ | oPayment = null | |||
) | [protected] |
Send order to shop owner and user
oxUser | $oUser order user | |
oxBasket | $oBasket current order basket | |
oxPayment | $oPayment order payment |
Definition at line 1366 of file oxorder.php.
oxOrder.getUser | ( | ) |
Returns order user
Reimplemented from oxSuperCfg.
Definition at line 1394 of file oxorder.php.
oxOrder.getBasket | ( | ) |
oxOrder.getPayment | ( | ) |
oxOrder.getVoucherList | ( | ) |
oxOrder.getDelSet | ( | ) |
oxOrder.getPaymentType | ( | ) |
oxOrder.getGiftCard | ( | ) |
oxOrder.setSeparateNumbering | ( | $ | blSeparateNumbering = null |
) |
Set usage of seperate orders numbering for different shops
bool | $blSeparateNumbering use or not separate orders numbering |
Definition at line 1482 of file oxorder.php.
oxOrder.getLastUserPaymentType | ( | $ | sUserId | ) |
Get users payment type from last order
string | $sUserId order user id |
Definition at line 1494 of file oxorder.php.
oxOrder._makeSelListArray | ( | $ | sArtId = null , |
|
$ | sOrderArtSelList = null | |||
) | [protected] |
Make select list array from oxorderarticles__oxselvariant string. This select list array is used when recalculating order and adding items to basket (oxBasket.addToBaske())
string | $sArtId order article ID | |
string | $sOrderArtSelList select list string stored in oxorderarticles__oxselvariant |
Definition at line 1511 of file oxorder.php.
oxOrder._addOrderArticlesToBasket | ( | $ | oUser = null , |
|
$ | aOrderArticles = null , |
|||
$ | blChangeDelivery = false , |
|||
$ | blChangeDiscount = false , |
|||
$ | blStockCheck = true | |||
) | [protected] |
Adds order articles back to virtual basket. Needed for recalculating order.
oxUser | $oUser basket user object | |
array | $aOrderArticles order articles | |
bool | $blChangeDelivery if delivery was changed in admin | |
bool | $blChangeDiscount if discount was changed in admin | |
bool | $blStockCheck to check stock |
Definition at line 1575 of file oxorder.php.
oxOrder._setDeprecatedValues | ( | ) | [protected] |
Sets deprecate values
Definition at line 1659 of file oxorder.php.
oxOrder.getTotalOrderSum | ( | ) |
oxOrder.$_aSkipSaveFields = array( 'oxorderdate' ) [protected] |
oxOrder.$_oArticles = null [protected] |
Definition at line 27 of file oxorder.php.
oxOrder.$_oDelSet = null [protected] |
Definition at line 34 of file oxorder.php.
oxOrder.$_oGiftCard = null [protected] |
Definition at line 41 of file oxorder.php.
oxOrder.$_oPaymentType = null [protected] |
Definition at line 48 of file oxorder.php.
oxOrder.$_oPayment = null [protected] |
Definition at line 55 of file oxorder.php.
oxOrder.$_aVoucherList = null [protected] |
Definition at line 62 of file oxorder.php.
oxOrder.$_oDelPrice = null [protected] |
Definition at line 69 of file oxorder.php.
oxOrder.$_oUser = null [protected] |
Definition at line 76 of file oxorder.php.
oxOrder.$_oBasket = null [protected] |
Definition at line 83 of file oxorder.php.
oxOrder.$_oWrappingPrice = null [protected] |
Definition at line 90 of file oxorder.php.
oxOrder.$_oPaymentPrice = null [protected] |
Definition at line 97 of file oxorder.php.
oxOrder.$_sClassName = 'oxorder' [protected] |
oxOrder.$_blSeparateNumbering = null [protected] |
Definition at line 111 of file oxorder.php.
oxOrder.$_iOrderLang = null [protected] |
Definition at line 118 of file oxorder.php.