OXID eShop CE  4.10.2
 All Classes Namespaces Files Functions Variables Pages
oxOrder Class Reference
+ Inheritance diagram for oxOrder:
+ Collaboration diagram for oxOrder:

Public Member Functions

 __construct ()
 __get ($sName)
 assign ($dbRecord)
 getOrderArticles ($blExcludeCanceled=false)
 setOrderArticleList ($oOrderArticleList)
 getOrderDeliveryPrice ()
 getOrderWrappingPrice ()
 getOrderGiftCardPrice ()
 getOrderPaymentPrice ()
 getOrderTsProtectionPrice ()
 getOrderNetSum ()
 finalizeOrder (oxBasket $oBasket, $oUser, $blRecalculatingOrder=false)
 isNettoMode ()
 getOrderLanguage ()
 save ()
 getDelAddressInfo ()
 validateStock ($oBasket)
 delete ($sOxId=null)
 recalculateOrder ($aNewArticles=array())
 setDelivery ($sDeliveryId)
 getOrderUser ()
 pdfFooter ($oPdf)
 pdfHeaderplus ($oPdf)
 pdfHeader ($oPdf)
 genPdf ($sFilename, $iSelLang=0)
 getInvoiceNum ()
 getNextBillNum ()
 getShippingSetList ()
 getVoucherNrList ()
 getOrderSum ($blToday=false)
 getOrderCnt ($blToday=false)
 getBasket ()
 getPayment ()
 getVoucherList ()
 getDelSet ()
 getPaymentType ()
 getGiftCard ()
 setSeparateNumbering ($blSeparateNumbering=null)
 getLastUserPaymentType ($sUserId)
 getTotalOrderSum ()
 getProductVats ($blFormatCurrency=true)
 getBillCountry ()
 getDelCountry ()
 reloadDelivery ($blReload)
 reloadDiscount ($blReload)
 cancelOrder ()
 getOrderCurrency ()
 validateOrder ($oBasket, $oUser)
 validateBasket ($oBasket)
 validateDeliveryAddress ($oUser)
 validateDelivery ($oBasket)
 validatePayment ($oBasket)
 getFormattedTotalNetSum ()
 getFormattedTotalBrutSum ()
 getFormattedDeliveryCost ()
 getFormattedeliveryCost ()
 getFormattedPayCost ()
 getFormattedWrapCost ()
 getFormattedGiftCardCost ()
 getFormattedTotalVouchers ()
 getFormattedDiscount ()
 getFormattedTotalOrderSum ()
 getTrackCode ()
 getShipmentTrackingUrl ()
- Public Member Functions inherited from oxBase
 getUseSkipSaveFields ()
 setUseSkipSaveFields ($blUseSkipSaveFields)
 __set ($sName, $sValue)
 __isset ($mVar)
 __clone ()
 oxClone ($oObject)
 getUpdateSeo ()
 setUpdateSeo ($blUpdateSeo)
 init ($sTableName=null, $blForceAllFields=false)
 getClassName ()
 getCoreTableName ()
 getId ()
 setId ($sOXID=null)
 setShopId ($iShopId)
 getShopId ()
 getViewName ($blForceCoreTableUsage=null)
 modifyCacheKey ($sCacheKey, $blOverride=false)
 disableLazyLoading ()
 isDerived ()
 setIsDerived ($blVal)
 isMultilang ()
 load ($sOXID)
 isLoaded ()
 buildSelectString ($aWhere=null)
 assignRecord ($sSelect)
 getFieldData ($sFieldName)
 getSelectFields ($blForceCoreTableUsage=null)
 allowDerivedUpdate ()
 allowDerivedDelete ()
 exists ($sOXID=null)
 getSqlActiveSnippet ($blForceCoreTable=null)
 beforeUpdate ($sOXID=null)
 onChange ($iAction=null, $sOXID=null)
 setInList ()
 isOx ()
 isReadOnly ()
 setReadOnly ($blReadOnly)
 getFieldNames ()
 addFieldName ($sName)
 getLanguage ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Public Attributes

const ORDER_STATE_MAILINGERROR = 0
const ORDER_STATE_OK = 1
const ORDER_STATE_PAYMENTERROR = 2
const ORDER_STATE_ORDEREXISTS = 3
const ORDER_STATE_INVALIDDELIVERY = 4
const ORDER_STATE_INVALIDPAYMENT = 5
const ORDER_STATE_INVALIDTSPROTECTION = 6
const ORDER_STATE_INVALIDDElADDRESSCHANGED = 7
const ORDER_STATE_BELOWMINPRICE = 8

Protected Member Functions

 _getCountryTitle ($sCountryId)
 _getArticles ($blExcludeCanceled=false)
 _setOrderStatus ($sStatus)
 _convertVat ($sVat)
 _resetVats ()
 _loadFromBasket (oxBasket $oBasket)
 _setUser ($oUser)
 _setWrapping (oxBasket $oBasket)
 _setOrderArticles ($aArticleList)
 _executePayment (oxBasket $oBasket, $oUserpayment)
 _getGateway ()
 _setPayment ($sPaymentid)
 _setFolder ()
 _updateWishlist ($aArticleList, $oUser)
 _updateNoticeList ($aArticleList, $oUser)
 _updateOrderDate ()
 _markVouchers ($oBasket, $oUser)
 _insert ()
 _getCounterIdent ()
 _setNumber ()
 _update ()
 _getOrderBasket ($blStockCheck=true)
 _checkOrderExist ($sOxId=null)
 _sendOrderByEmail ($oUser=null, $oBasket=null, $oPayment=null)
 _addOrderArticlesToBasket ($oBasket, $aOrderArticles)
 _addArticlesToBasket ($oBasket, $aArticles)
 _setTsProtection (oxBasket $oBasket)
 _executeTsProtection (oxBasket $oBasket)
- Protected Member Functions inherited from oxBase
 _setUpdateSeoOnFieldChange ($sField)
 _removeElement2ShopRelations ($sOxId)
 _isInList ()
 _getObjectViewName ($sTable, $sShopID=null)
 _getTableFields ($sTable, $blReturnSimple=false)
 _getAllFields ($blReturnSimple=false)
 _initDataStructure ($blForceFullStructure=false)
 _getNonCachedFieldNames ($blForceFullStructure=false)
 _getFieldStatus ($sFieldName)
 _addField ($sName, $iStatus, $sType=null, $sLength=null)
 _getFieldLongName ($sFieldName)
 _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT)
 _canFieldBeNull ($sFieldName)
 _getFieldDefaultValue ($sFieldName)
 _getUpdateFieldValue ($sFieldName, $oField)
 _getUpdateFields ($blUseSkipSaveFields=true)
 _isDisabledFieldCache ()
 _addSkippedSaveFieldsForMapping ()
 _disableLazyLoadingForCaching ()

Protected Attributes

 $_aSkipSaveFields = array('oxtimestamp')
 $_oArticles = null
 $_oDelSet = null
 $_oGiftCard = null
 $_oPaymentType = null
 $_oPayment = null
 $_aVoucherList = null
 $_oDelPrice = null
 $_oUser = null
 $_oBasket = null
 $_oWrappingPrice = null
 $_oGiftCardPrice = null
 $_oPaymentPrice = null
 $_oTsProtectionPrice = null
 $_sClassName = 'oxorder'
 $_blSeparateNumbering = null
 $_iOrderLang = null
 $_blReloadDelivery = true
 $_blReloadDiscount = true
 $_oOrderCurrency = null
 $_oOrderFiles = null
 $_sShipTrackUrl = null
 $_oOrderBasket = null
- Protected Attributes inherited from oxBase
 $_sOXID = null
 $_iShopId = null
 $_blIsSimplyClonable = true
 $_sClassName = 'oxbase'
 $_sCoreTable = null
 $_sViewTable = null
 $_aFieldNames = array('oxid' => 0)
 $_sCacheKey = null
 $_blUseLazyLoading = false
 $_aSkipSaveFields = array('oxtimestamp')
 $_blUseSkipSaveFields = true
 $_sExistKey = 'oxid'
 $_blIsDerived = null
 $_blIsSeoObject = false
 $_blUpdateSeo = true
 $_blReadOnly = false
 $_blIsInList = false
 $_isLoaded = false
 $_aInnerLazyCache = null
 $_blEmployMultilanguage = false

Additional Inherited Members

- Static Protected Attributes inherited from oxBase
static $_blDisableFieldCaching = array()

Detailed Description

Order manager. Performs creation assigning, updating, deleting and other order functions.

Definition at line 8 of file oxorder.php.

Constructor & Destructor Documentation

oxOrder::__construct ( )

Class constructor, initiates parent constructor (parent::oxBase()).

Reimplemented from oxBase.

Definition at line 232 of file oxorder.php.

Member Function Documentation

oxOrder::__get (   $sName)

Getter made for order delivery set object access

Parameters
string$sNameparameter name
Returns
mixed

Reimplemented from oxBase.

Definition at line 249 of file oxorder.php.

oxOrder::_addArticlesToBasket (   $oBasket,
  $aArticles 
)
protected

Adds new products to basket/order

Parameters
oxbasket$oBasketbasket to add articles
array$aArticlesarticle array

Definition at line 1853 of file oxorder.php.

oxOrder::_addOrderArticlesToBasket (   $oBasket,
  $aOrderArticles 
)
protected

Adds order articles back to virtual basket. Needed for recalculating order.

Parameters
oxBasket$oBasketbasket object
array$aOrderArticlesorder articles

Definition at line 1835 of file oxorder.php.

oxOrder::_checkOrderExist (   $sOxId = null)
protected

Checking if this order is already stored.

Parameters
string$sOxIdorder ID
Returns
bool

Definition at line 1678 of file oxorder.php.

oxOrder::_convertVat (   $sVat)
protected

Converts string VAT representation into float e.g. 7,6 to 7.6

Parameters
string$sVatvat value
Returns
float

Definition at line 620 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.

Parameters
oxBasket$oBasketbasket object
object$oUserpaymentuser payment object
Returns
integer 2 or an error code

Definition at line 936 of file oxorder.php.

oxOrder::_executeTsProtection ( oxBasket  $oBasket)
protected

Executes Trusted shops protection order.

Parameters
oxBasket$oBasketbasket object
Returns
bool

Definition at line 2166 of file oxorder.php.

oxOrder::_getArticles (   $blExcludeCanceled = false)
protected

returned assigned orderarticles from order

Parameters
bool$blExcludeCanceledexcludes canceled items from list
Returns
oxList

Definition at line 309 of file oxorder.php.

oxOrder::_getCounterIdent ( )
protected

creates counter ident

Returns
String

Definition at line 1267 of file oxorder.php.

oxOrder::_getCountryTitle (   $sCountryId)
protected

Gets country title by country id.

Parameters
string$sCountryIdcountry ID
Returns
string

Definition at line 290 of file oxorder.php.

oxOrder::_getGateway ( )
protected

Returns the correct gateway. At the moment only switch between default and IPayment, can be extended later.

Returns
object $oPayTransaction payment gateway object

Definition at line 970 of file oxorder.php.

oxOrder::_getOrderBasket (   $blStockCheck = true)
protected

Returns basket object filled up with discount, delivery, wrapping and all other info

Parameters
bool$blStockCheckperform stock check or not (default true)
Returns
oxBasket

Definition at line 1401 of file oxorder.php.

oxOrder::_insert ( )
protected

Inserts order object information in DB. Returns true on success.

Returns
bool

Reimplemented from oxBase.

Definition at line 1242 of file oxorder.php.

oxOrder::_loadFromBasket ( oxBasket  $oBasket)
protected

Gathers and assigns to new oxOrder object customer data, payment, delivery and shipping info, customer order 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.

Parameters
oxBasket$oBasketShopping basket object

Definition at line 650 of file oxorder.php.

oxOrder::_markVouchers (   $oBasket,
  $oUser 
)
protected

Marks voucher as used (oxvoucher::markAsUsed()) and sets them to $this->_aVoucherList.

Parameters
oxBasket$oBasketbasket object
oxUser$oUseruser object

Definition at line 1133 of file oxorder.php.

oxOrder::_resetVats ( )
protected

Reset Vat info

Definition at line 634 of file oxorder.php.

oxOrder::_sendOrderByEmail (   $oUser = null,
  $oBasket = null,
  $oPayment = null 
)
protected

Send order to shop owner and user

Parameters
oxUser$oUserorder user
oxBasket$oBasketcurrent order basket
oxUserPayment$oPaymentorder payment
Returns
bool

Definition at line 1701 of file oxorder.php.

oxOrder::_setFolder ( )
protected

Assigns oxfolder as new

Definition at line 1044 of file oxorder.php.

oxOrder::_setNumber ( )
protected

Tries to fetch and set next record number in DB. Returns true on success

Returns
bool

Definition at line 1280 of file oxorder.php.

oxOrder::_setOrderArticles (   $aArticleList)
protected

Creates oxorderarticle objects and assigns to them basket articles. Updates quantity of sold articles (oxarticle::updateSoldAmount()).

Parameters
array$aArticleListarticle list

Definition at line 834 of file oxorder.php.

oxOrder::_setOrderStatus (   $sStatus)
protected

Updates order transaction status. Faster than saving whole object

Parameters
string$sStatusorder transaction status

Definition at line 603 of file oxorder.php.

oxOrder::_setPayment (   $sPaymentid)
protected

Creates and returns user payment.

Parameters
string$sPaymentidused payment id
Returns
oxUserPayment

Definition at line 982 of file oxorder.php.

oxOrder::_setTsProtection ( oxBasket  $oBasket)
protected

Assigns Trusted Shops Protection product id and costs

Parameters
oxBasket$oBasketbasket object

Definition at line 2148 of file oxorder.php.

oxOrder::_setUser (   $oUser)
protected

Assigns to new oxorder object customer delivery and shipping info

Parameters
object$oUseruser object

Definition at line 758 of file oxorder.php.

oxOrder::_setWrapping ( oxBasket  $oBasket)
protected

Assigns wrapping VAT and card price + card message info

Parameters
oxBasket$oBasketbasket object

Definition at line 805 of file oxorder.php.

oxOrder::_update ( )
protected

Updates object parameters to DB.

Returns
null

Reimplemented from oxBase.

Definition at line 1300 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

Parameters
array$aArticleListarray of basket products
oxuser$oUserbasket user object

Definition at line 1095 of file oxorder.php.

oxOrder::_updateOrderDate ( )
protected

Updates order date to current date

Definition at line 1117 of file oxorder.php.

oxOrder::_updateWishlist (   $aArticleList,
  $oUser 
)
protected

aAdds/removes user chosen article to/from his noticelist or wishlist (oxuserbasket::addItemToBasket()).

Parameters
array$aArticleListbasket products
object$oUseruser object

Definition at line 1057 of file oxorder.php.

oxOrder::assign (   $dbRecord)

Assigns data, stored in DB to oxorder object

Parameters
mixed$dbRecordDB record
Returns
null

Reimplemented from oxBase.

Definition at line 271 of file oxorder.php.

oxOrder::cancelOrder ( )

Performs order cancel process

Definition at line 1962 of file oxorder.php.

oxOrder::delete (   $sOxId = null)

Updates stock information, deletes current ordering details from DB, returns true on success.

Parameters
string$sOxIdOrdering ID (default null)
Returns
bool

Reimplemented from oxBase.

Definition at line 1316 of file oxorder.php.

oxOrder::finalizeOrder ( oxBasket  $oBasket,
  $oUser,
  $blRecalculatingOrder = false 
)

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 recalculation, 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.

Parameters
oxBasket$oBasketShopping basket object
object$oUserCurrent user object
bool$blRecalculatingOrderOrder recalculation
Returns
integer

Definition at line 483 of file oxorder.php.

oxOrder::genPdf (   $sFilename,
  $iSelLang = 0 
)

Fake entries, pdf is generated in modules.. myorder.

Parameters
string$sFilenamefile name
int$iSelLangselected language

Definition at line 1548 of file oxorder.php.

oxOrder::getBasket ( )

Returns order basket

Returns
oxBasket

Definition at line 1729 of file oxorder.php.

oxOrder::getBillCountry ( )

Get billing country name from billing country id

Returns
oxField

Definition at line 1916 of file oxorder.php.

oxOrder::getDelAddressInfo ( )

Loads and returns delivery address object or null if deladrid is not configured, or object was not loaded

Returns
object

Definition at line 1175 of file oxorder.php.

oxOrder::getDelCountry ( )

Get delivery country name from delivery country id

Returns
oxField

Definition at line 1930 of file oxorder.php.

oxOrder::getDelSet ( )

Returns order deliveryset object

Returns
oxDeliverySet

Definition at line 1759 of file oxorder.php.

oxOrder::getFormattedDeliveryCost ( )

Get Delivery cost sum formatted

Returns
string

Definition at line 2210 of file oxorder.php.

oxOrder::getFormattedDiscount ( )

Get Discount formatted

Returns
string

Definition at line 2272 of file oxorder.php.

oxOrder::getFormattedeliveryCost ( )

Get Delivery cost sum formatted

Deprecated:
in v5.2.0 on 2014-04-12; Typo use oxOrder::getFormattedPayCost()
Returns
string

Definition at line 2222 of file oxorder.php.

oxOrder::getFormattedGiftCardCost ( )

Get wrap cost sum formatted

Returns
string

Definition at line 2252 of file oxorder.php.

oxOrder::getFormattedPayCost ( )

Get pay cost sum formatted

Returns
string

Definition at line 2232 of file oxorder.php.

oxOrder::getFormattedTotalBrutSum ( )

Get total brut sum formatted

Returns
string

Definition at line 2200 of file oxorder.php.

oxOrder::getFormattedTotalNetSum ( )

Get total net sum formatted

Returns
string

Definition at line 2190 of file oxorder.php.

oxOrder::getFormattedTotalOrderSum ( )

Get formatted total sum from last order

Returns
string

Definition at line 2282 of file oxorder.php.

oxOrder::getFormattedTotalVouchers ( )

Get total vouchers formatted

Returns
string

Definition at line 2262 of file oxorder.php.

oxOrder::getFormattedWrapCost ( )

Get wrap cost sum formatted

Returns
string

Definition at line 2242 of file oxorder.php.

oxOrder::getGiftCard ( )

Get gift card

Returns
oxWrapping

Definition at line 1793 of file oxorder.php.

oxOrder::getInvoiceNum ( )

Returns order invoice number.

Returns
integer

Definition at line 1557 of file oxorder.php.

oxOrder::getLastUserPaymentType (   $sUserId)

Get users payment type from last order

Parameters
string$sUserIdorder user id
Returns
string $sLastPaymentId payment id

Definition at line 1820 of file oxorder.php.

oxOrder::getNextBillNum ( )

Returns next possible (free) order bill number.

Returns
integer

Definition at line 1569 of file oxorder.php.

oxOrder::getOrderArticles (   $blExcludeCanceled = false)

Assigns data, stored in oxorderarticles to oxorder object .

Parameters
bool$blExcludeCanceledexcludes canceled items from list
Returns
oxList

Definition at line 331 of file oxorder.php.

oxOrder::getOrderCnt (   $blToday = false)

Returns orders count

Parameters
bool$blTodayif true calculates only current day orders
Returns
int

Definition at line 1658 of file oxorder.php.

oxOrder::getOrderCurrency ( )

Returns actual order currency object. In case currency was not recognized due to changed name returns first shop currency object

Returns
stdClass

Definition at line 1983 of file oxorder.php.

oxOrder::getOrderDeliveryPrice ( )

Returns order delivery expenses price object

Returns
oxprice

Definition at line 360 of file oxorder.php.

oxOrder::getOrderGiftCardPrice ( )

Returns order wrapping expenses price object

Returns
oxprice

Definition at line 396 of file oxorder.php.

oxOrder::getOrderLanguage ( )

Returns language id of current order object. If order already has language defined - checks if this language is defined in shops config

Returns
int

Definition at line 740 of file oxorder.php.

oxOrder::getOrderNetSum ( )

Returns order netto sum (total order price - VAT)

Returns
double

Definition at line 451 of file oxorder.php.

oxOrder::getOrderPaymentPrice ( )

Returns order payment expenses price object

Returns
oxprice

Definition at line 415 of file oxorder.php.

oxOrder::getOrderSum (   $blToday = false)

Returns orders total price

Parameters
bool$blTodayif true calculates only current day orders
Returns
int

Definition at line 1639 of file oxorder.php.

oxOrder::getOrderTsProtectionPrice ( )

Returns order TS protection price object

Returns
oxprice

Definition at line 433 of file oxorder.php.

oxOrder::getOrderUser ( )

Returns current order user object

Returns
oxuser

Definition at line 1483 of file oxorder.php.

oxOrder::getOrderWrappingPrice ( )

Returns order wrapping expenses price object

Returns
oxprice

Definition at line 378 of file oxorder.php.

oxOrder::getPayment ( )

Returns order payment

Returns
oxUserPayment

Definition at line 1739 of file oxorder.php.

oxOrder::getPaymentType ( )

Get payment type

Returns
oxUserPayment

Definition at line 1775 of file oxorder.php.

oxOrder::getProductVats (   $blFormatCurrency = true)

Returns array of plain formatted VATs stored in order

Parameters
bool$blFormatCurrencyenables currency formatting
Returns
array

Definition at line 1890 of file oxorder.php.

oxOrder::getShipmentTrackingUrl ( )

Returns shipment tracking url if oxtrackcode and shipment tracking url are supplied

Returns
string

Definition at line 2302 of file oxorder.php.

oxOrder::getShippingSetList ( )

Loads possible shipping sets for this order

Returns
oxdeliverysetlist

Definition at line 1581 of file oxorder.php.

oxOrder::getTotalOrderSum ( )

Get total sum from last order

Returns
string

Definition at line 1876 of file oxorder.php.

oxOrder::getTrackCode ( )

Returns shipment tracking code

Returns
string

Definition at line 2292 of file oxorder.php.

oxOrder::getVoucherList ( )

Returns order vouchers marked as used

Returns
array

Definition at line 1749 of file oxorder.php.

oxOrder::getVoucherNrList ( )

Get vouchers numbers list which were used with this order

Returns
array

Definition at line 1616 of file oxorder.php.

oxOrder::isNettoMode ( )

Return true if order store in netto mode

Returns
bool

Definition at line 592 of file oxorder.php.

oxOrder::pdfFooter (   $oPdf)

Fake entries, pdf is generated in modules.. myorder.

Parameters
mixed$oPdfpdf object

Definition at line 1520 of file oxorder.php.

oxOrder::pdfHeader (   $oPdf)

Fake entries, pdf is generated in modules.. myorder.

Parameters
mixed$oPdfpdf object

Definition at line 1538 of file oxorder.php.

oxOrder::pdfHeaderplus (   $oPdf)

Fake entries, pdf is generated in modules.. myorder.

Parameters
mixed$oPdfpdf object

Definition at line 1529 of file oxorder.php.

oxOrder::recalculateOrder (   $aNewArticles = array())

Recalculates order. Starts transactions, deletes current order and order articles from DB, adds current order articles to virtual basket and finally recalculates order by calling oxorder::finalizeOrder() If no errors, finishing transaction.

Parameters
array$aNewArticlesarticle list of new order
Exceptions
Exception

Definition at line 1356 of file oxorder.php.

oxOrder::reloadDelivery (   $blReload)

Tells to keep old or reload delivery costs while recalculating order

Parameters
bool$blReloadreload state marker

Definition at line 1944 of file oxorder.php.

oxOrder::reloadDiscount (   $blReload)

Tells to keep old or reload discount while recalculating order

Parameters
bool$blReloadreload state marker

Definition at line 1954 of file oxorder.php.

oxOrder::save ( )

Updates/inserts order object and related info to DB

Returns
null

Reimplemented from oxBase.

Definition at line 1153 of file oxorder.php.

oxOrder::setDelivery (   $sDeliveryId)

Sets new delivery id for order and forces order to recalculate using new delivery type. Order is not recalculated automatically, to do this oxOrder::recalculateOrder() must be called ;

Parameters
string$sDeliveryIdnew delivery id

Definition at line 1472 of file oxorder.php.

oxOrder::setOrderArticleList (   $oOrderArticleList)

Order article list setter

Parameters
oxOrderArticleList$oOrderArticleList

Definition at line 350 of file oxorder.php.

oxOrder::setSeparateNumbering (   $blSeparateNumbering = null)

Set usage of separate orders numbering for different shops

Parameters
bool$blSeparateNumberinguse or not separate orders numbering

Definition at line 1808 of file oxorder.php.

oxOrder::validateBasket (   $oBasket)

Validates basket. Currently checks if minimum order price > basket price

Parameters
oxBasket$oBasketbasket object
Returns
bool

Definition at line 2046 of file oxorder.php.

oxOrder::validateDelivery (   $oBasket)

Checks if delivery set used for current order is available and active. Throws exception if not available

Parameters
oxbasket$oBasketbasket object
Returns
null

Definition at line 2099 of file oxorder.php.

oxOrder::validateDeliveryAddress (   $oUser)

Checks if delivery address (billing or shipping) was not changed during checkout Throws exception if not available

Parameters
oxUser$oUseruser object
Returns
int

Definition at line 2059 of file oxorder.php.

oxOrder::validateOrder (   $oBasket,
  $oUser 
)

Validates order parameters like stock, delivery and payment parameters

Parameters
oxbasket$oBasketbasket object
oxuser$oUserorder user
Returns
null

Definition at line 2011 of file oxorder.php.

oxOrder::validatePayment (   $oBasket)

Checks if payment used for current order is available and active. Throws exception if not available

Parameters
oxbasket$oBasketbasket object
Returns
null

Definition at line 2128 of file oxorder.php.

oxOrder::validateStock (   $oBasket)

Function which checks if article stock is valid. If not displays error and returns false.

Parameters
object$oBasketbasket object
Exceptions
oxOutOfStockExceptionexception

Definition at line 1204 of file oxorder.php.

Member Data Documentation

oxOrder::$_aSkipSaveFields = array('oxtimestamp')
protected

Definition at line 80 of file oxorder.php.

oxOrder::$_aVoucherList = null
protected

Definition at line 122 of file oxorder.php.

oxOrder::$_blReloadDelivery = true
protected

Definition at line 199 of file oxorder.php.

oxOrder::$_blReloadDiscount = true
protected

Definition at line 206 of file oxorder.php.

oxOrder::$_blSeparateNumbering = null
protected

Definition at line 185 of file oxorder.php.

oxOrder::$_iOrderLang = null
protected

Definition at line 192 of file oxorder.php.

oxOrder::$_oArticles = null
protected

Definition at line 87 of file oxorder.php.

oxOrder::$_oBasket = null
protected

Definition at line 143 of file oxorder.php.

oxOrder::$_oDelPrice = null
protected

Definition at line 129 of file oxorder.php.

oxOrder::$_oDelSet = null
protected

Definition at line 94 of file oxorder.php.

oxOrder::$_oGiftCard = null
protected

Definition at line 101 of file oxorder.php.

oxOrder::$_oGiftCardPrice = null
protected

Definition at line 157 of file oxorder.php.

oxOrder::$_oOrderBasket = null
protected

Definition at line 1392 of file oxorder.php.

oxOrder::$_oOrderCurrency = null
protected

Definition at line 213 of file oxorder.php.

oxOrder::$_oOrderFiles = null
protected

Definition at line 220 of file oxorder.php.

oxOrder::$_oPayment = null
protected

Definition at line 115 of file oxorder.php.

oxOrder::$_oPaymentPrice = null
protected

Definition at line 164 of file oxorder.php.

oxOrder::$_oPaymentType = null
protected

Definition at line 108 of file oxorder.php.

oxOrder::$_oTsProtectionPrice = null
protected

Definition at line 171 of file oxorder.php.

oxOrder::$_oUser = null
protected

Definition at line 136 of file oxorder.php.

oxOrder::$_oWrappingPrice = null
protected

Definition at line 150 of file oxorder.php.

oxOrder::$_sClassName = 'oxorder'
protected

Definition at line 178 of file oxorder.php.

oxOrder::$_sShipTrackUrl = null
protected

Definition at line 227 of file oxorder.php.

const oxOrder::ORDER_STATE_BELOWMINPRICE = 8

Definition at line 73 of file oxorder.php.

const oxOrder::ORDER_STATE_INVALIDDElADDRESSCHANGED = 7

Definition at line 66 of file oxorder.php.

const oxOrder::ORDER_STATE_INVALIDDELIVERY = 4

Definition at line 45 of file oxorder.php.

const oxOrder::ORDER_STATE_INVALIDPAYMENT = 5

Definition at line 52 of file oxorder.php.

const oxOrder::ORDER_STATE_INVALIDTSPROTECTION = 6

Definition at line 59 of file oxorder.php.

const oxOrder::ORDER_STATE_MAILINGERROR = 0

Definition at line 17 of file oxorder.php.

const oxOrder::ORDER_STATE_OK = 1

Definition at line 24 of file oxorder.php.

const oxOrder::ORDER_STATE_ORDEREXISTS = 3

Definition at line 38 of file oxorder.php.

const oxOrder::ORDER_STATE_PAYMENTERROR = 2

Definition at line 31 of file oxorder.php.


The documentation for this class was generated from the following file: