OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxBasket Class Reference
+ Inheritance diagram for oxBasket:
+ Collaboration diagram for oxBasket:

Public Member Functions

 isCalculationModeNetto ()
 setCalculationModeNetto ($blNettoMode=true)
 getNettoSum ()
 getBruttoSum ()
 setNettoSum ($dNettoSum)
 setBruttoSum ($dBruttoSum)
 isEnabled ()
 addToBasket ($sProductID, $dAmount, $aSel=null, $aPersParam=null, $blOverride=false, $blBundle=false, $sOldBasketItemId=null)
 addOrderArticleToBasket ($oOrderArticle)
 setStockCheckMode ($blCheck)
 getStockCheckMode ()
 getItemKey ($sProductId, $aSel=null, $aPersParam=null, $blBundle=false, $sAdditionalParam= '')
 removeItem ($sItemKey)
 setDiscountCalcMode ($blCalcDiscounts)
 canCalcDiscounts ()
 getBasketUser ()
 setBasketUser ($oUser)
 getMostUsedVatPercent ()
 getAdditionalServicesVatPercent ()
 isProportionalCalculationOn ()
 setVoucherDiscount ($dDiscount)
 isPriceViewModeNetto ()
 setCost ($sCostName, $oPrice=null)
 calculateBasket ($blForceUpdate=false)
 onUpdate ()
 afterUpdate ()
 getBasketSummary ()
 addVoucher ($sVoucherId)
 removeVoucher ($sVoucherId)
 resetUserInfo ()
 load ()
 deleteBasket ()
 setPayment ($sPaymentId=null)
 getPaymentId ()
 setShipping ($sShippingSetId=null)
 setDeliveryPrice ($oShippingPrice=null)
 getShippingId ()
 getBasketArticles ()
 getDiscountProductsPrice ()
 getProductsPrice ()
 getPrice ()
 getOrderId ()
 setOrderId ($sId)
 getCosts ($sId=null)
 getVouchers ()
 getProductsCount ()
 getItemsCount ()
 getWeight ()
 getContents ()
 getProductVats ($blFormatCurrency=true)
 getDiscountedNettoPrice ()
 setCardMessage ($sMessage)
 getCardMessage ()
 setCardId ($sCardId)
 getCardId ()
 getCard ()
 getTotalDiscount ()
 getDiscounts ()
 getVoucherDiscount ()
 setBasketCurrency ($oCurrency)
 getBasketCurrency ()
 setSkipVouchersChecking ($blSkipChecking=null)
 hasSkipedDiscount ()
 setSkipDiscounts ($blSkip)
 getProductsNetPrice ()
 getFProductsPrice ()
 getDelCostVatPercent ()
 getDelCostVat ()
 getDelCostNet ()
 getPayCostVatPercent ()
 getPayCostVat ()
 getPayCostNet ()
 getPaymentCosts ()
 getPaymentCost ()
 getFPaymentCosts ()
 getVoucherDiscValue ()
 getFVoucherDiscountValue ()
 getWrappCostVatPercent ()
 getGiftCardCostVatPercent ()
 getWrappCostVat ()
 getWrappCostNet ()
 getFWrappingCosts ()
 getWrappingCost ()
 getGiftCardCostVat ()
 getGiftCardCostNet ()
 getFGiftCardCosts ()
 getGiftCardCost ()
 getFPrice ()
 getFDeliveryCosts ()
 getDeliveryCosts ()
 getDeliveryCost ()
 setTotalDiscount ($dDiscount)
 getPriceForPayment ()
 _getDiscountedProductsSum ()
 getDiscountedProductsBruttoPrice ()
 isBelowMinOrderPrice ()
 getArtStockInBasket ($sArtId, $sExpiredArtId=null)
 canAddProductToBasket ($sProductId)
 setBasketRootCatId ($sRoot)
 getBasketRootCatId ()
 setCatChangeWarningState ($blShow)
 showCatChangeWarning ()
 setTsProductId ($sProductId)
 getTsProductId ()
 getFTsProtectionCosts ()
 getTsProtectionVatPercent ()
 getTsProtectionVat ()
 getTsProtectionNet ()
 getTsProtectionCosts ()
 getTrustedShopProtectionCost ()
 getNotDiscountProductsPrice ()
 __wakeUp ()
 isNewItemAdded ()
 hasDownloadableProducts ()
 hasArticlesWithIntangibleAgreement ()
 hasArticlesWithDownloadableAgreement ()
 getMinOrderPrice ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _changeBasketItemKey ($sOldKey, $sNewKey, $value=null)
 _clearBundles ()
 _getArticleBundles ($oBasketItem)
 _getItemBundles ($oBasketItem, $aBundles=array())
 _getBasketBundles ($aBundles=array())
 _addBundles ()
 _addBundlesToBasket ($aBundles)
 _calcItemsPrice ()
 _mergeDiscounts ($aDiscounts, $aItemDiscounts)
 _calcDeliveryCost ()
 _calcTotalPrice ()
 _calcVoucherDiscount ()
 _applyDiscounts ()
 _getPriceObject ()
 _calcBasketDiscount ()
 _calcBasketTotalDiscount ()
 _calcBasketWrapping ()
 _calcBasketGiftCard ()
 _calcPaymentCost ()
 _calcTsProtectionCost ()
 formatDiscount ()
 _canSaveBasket ()
 _save ()
 _deleteSavedBasket ()
 _findDelivCountry ()
 _isProductInRootCategory ($sProductId, $sRootCatId)
 _addedNewItem ($sProductID, $dAmount, $aSel, $aPersParam, $blOverride, $blBundle, $sOldBasketItemId)

Protected Attributes

 $_aBasketContents = array()
 $_iProductsCnt = 0
 $_dItemsCnt = 0.0
 $_dWeight = 0.0
 $_oPrice = null
 $_isCalculationModeNetto = null
 $_dNettoSum = null
 $_dBruttoSum = null
 $_oProductsPriceList = null
 $_aDiscounts = array()
 $_aItemDiscounts = array()
 $_sOrderId = null
 $_aVouchers = array()
 $_aCosts = array()
 $_oDiscountProductsPriceList = null
 $_oNotDiscountedProductsPriceList = null
 $_blUpdateNeeded = true
 $_aBasketSummary = null
 $_sPaymentId = null
 $_sShippingSetId = null
 $_oUser = null
 $_oTotalDiscount = null
 $_oVoucherDiscount = null
 $_oCurrency = null
 $_blSkipVouchersAvailabilityChecking = null
 $_dDiscountedProductNettoPrice = null
 $_aDiscountedVats = null
 $_blSkipDiscounts = false
 $_oDeliveryPrice = null
 $_blCheckStock = true
 $_blCalcDiscounts = true
 $_sBasketCategoryId = null
 $_blShowCatChangeWarning = false
 $_sTsProductId = null
 $_blNewITemAdded = null
 $_blDownloadableProducts = null

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Basket manager

Definition at line 7 of file oxbasket.php.

Member Function Documentation

oxBasket::__wakeUp ( )

Resets new basket item addition state on unserialization

Returns
null

Definition at line 3093 of file oxbasket.php.

oxBasket::_addBundles ( )
protected

Iterates through basket contents and adds bundles to items + adds global basket bundles

Returns
null

Definition at line 691 of file oxbasket.php.

oxBasket::_addBundlesToBasket (   $aBundles)
protected

Adds bundles to basket

Parameters
array$aBundlesadded bundle articles
Returns
null

Definition at line 734 of file oxbasket.php.

oxBasket::_addedNewItem (   $sProductID,
  $dAmount,
  $aSel,
  $aPersParam,
  $blOverride,
  $blBundle,
  $sOldBasketItemId 
)
protected

Is called when new basket item is successfully added

Parameters
string$sProductIDid of product
double$dAmountproduct amount
array$aSelproduct select lists (default null)
array$aPersParamproduct persistent parameters (default null)
bool$blOverridemarker to acumulate passed amount or renew (default false)
bool$blBundlemarker if product is bundle or not (default false)
string$sOldBasketItemIdid if old basket item if to change it
Returns
null

Definition at line 3080 of file oxbasket.php.

oxBasket::_applyDiscounts ( )
protected

Performs netto price and VATs calculations including discounts and vouchers.

Returns
null

Definition at line 1141 of file oxbasket.php.

oxBasket::_calcBasketDiscount ( )
protected

Loads basket discounts and calculates discount values.

Returns
null

Definition at line 1207 of file oxbasket.php.

oxBasket::_calcBasketGiftCard ( )
protected

Adds Gift price info to $this->oBasket (additional field for basket item "oWrap""). Loads each basket item, checks for wrapping data, updates if available and stores back into $this->oBasket. Returns oxprice object for wrapping.

Returns
object oxPrice

Definition at line 1334 of file oxbasket.php.

oxBasket::_calcBasketTotalDiscount ( )
protected

Calculates total basket discount value.

Returns
null

Definition at line 1274 of file oxbasket.php.

oxBasket::_calcBasketWrapping ( )
protected

Adds Gift price info to $this->oBasket (additional field for basket item "oWrap""). Loads each basket item, checks for wrapping data, updates if available and stores back into $this->oBasket. Returns oxprice object for wrapping.

Returns
object oxPrice

Definition at line 1303 of file oxbasket.php.

oxBasket::_calcDeliveryCost ( )
protected

Iterates through basket items and calculates its delivery costs

Returns
oxPrice

Definition at line 861 of file oxbasket.php.

oxBasket::_calcItemsPrice ( )
protected

Iterates through basket items and calculates its prices and discounts

Returns
null

Definition at line 755 of file oxbasket.php.

oxBasket::_calcPaymentCost ( )
protected

Payment cost calculation, applying payment discount if available. Returns oxprice object.

Returns
object oxPrice

Definition at line 1365 of file oxbasket.php.

oxBasket::_calcTotalPrice ( )
protected

Performs final sum calculation and rounding.

Returns
null

Definition at line 990 of file oxbasket.php.

oxBasket::_calcTsProtectionCost ( )
protected

TS Protection cost calculation. Returns oxprice object.

Returns
object oxPrice

Definition at line 1389 of file oxbasket.php.

oxBasket::_calcVoucherDiscount ( )
protected

Calculates voucher discount

Returns
null

Definition at line 1064 of file oxbasket.php.

oxBasket::_canSaveBasket ( )
protected

Checks whether basket can be saved

Returns
bool

Definition at line 1698 of file oxbasket.php.

oxBasket::_changeBasketItemKey (   $sOldKey,
  $sNewKey,
  $value = null 
)
protected

change old key to new one but retain key position in array

Parameters
string$sOldKeyold key
string$sNewKeynew key to place in old one's place
mixed$value(optional)
Returns
null

Definition at line 349 of file oxbasket.php.

oxBasket::_clearBundles ( )
protected

Unsets bundled basket items from basket contents array

Returns
null

Definition at line 581 of file oxbasket.php.

oxBasket::_deleteSavedBasket ( )
protected

Cleans up saved basket data. This method usually is initiated by oxbasket::deleteBasket() method which cleans up basket data when user completes order.

Returns
null

Definition at line 1764 of file oxbasket.php.

oxBasket::_findDelivCountry ( )
protected

Tries to fetch user delivery country ID

Returns
string

Definition at line 1782 of file oxbasket.php.

oxBasket::_getArticleBundles (   $oBasketItem)
protected

Returns array of bundled articles IDs for basket item

Parameters
object$oBasketItembasket item object
Returns
array

Definition at line 598 of file oxbasket.php.

oxBasket::_getBasketBundles (   $aBundles = array())
protected

Returns array of bundled discount articles for whole basket

Parameters
array$aBundlesarray of found bundles
Returns
array

Definition at line 660 of file oxbasket.php.

oxBasket::_getDiscountedProductsSum ( )

Returns ( current basket products sum - total discount - voucher discount )

Returns
double

Definition at line 2745 of file oxbasket.php.

oxBasket::_getItemBundles (   $oBasketItem,
  $aBundles = array() 
)
protected

Returns array of bundled discount articles

Parameters
object$oBasketItembasket item object
array$aBundlesarray of found bundles
Returns
array

Definition at line 622 of file oxbasket.php.

oxBasket::_getPriceObject ( )
protected

Returns prepared oxPrice object depending on view mode

Returns
oxPrice

Definition at line 1189 of file oxbasket.php.

oxBasket::_isProductInRootCategory (   $sProductId,
  $sRootCatId 
)
protected

Checks if product is in root category

Parameters
string$sProductIdproduct id
string$sRootCatIdroot category id
Returns
bool

Definition at line 2886 of file oxbasket.php.

oxBasket::_mergeDiscounts (   $aDiscounts,
  $aItemDiscounts 
)
protected

Merges two discount arrays. If there are two the same discounts, discount values will be added.

Parameters
array$aDiscountsDiscount array
array$aItemDiscountsDiscount array
Returns
array $aDiscounts

Definition at line 843 of file oxbasket.php.

oxBasket::_save ( )
protected

Saves existing basket to database

Returns
null;

Definition at line 1736 of file oxbasket.php.

oxBasket::addOrderArticleToBasket (   $oOrderArticle)

Adds order article to basket (method normally used while recalculating order)

Parameters
oxorderarticle$oOrderArticleorder article to store in basket
Returns
oxbasketitem

Definition at line 479 of file oxbasket.php.

oxBasket::addToBasket (   $sProductID,
  $dAmount,
  $aSel = null,
  $aPersParam = null,
  $blOverride = false,
  $blBundle = false,
  $sOldBasketItemId = null 
)

Adds user item to basket. Returns oxBasketItem object if adding succeeded

Parameters
string$sProductIDid of product
double$dAmountproduct amount
mixed$aSelproduct select lists (default null)
mixed$aPersParamproduct persistent parameters (default null)
bool$blOverridemarker to accumulate passed amount or renew (default false)
bool$blBundlemarker if product is bundle or not (default false)
mixed$sOldBasketItemIdid if old basket item if to change it
Exceptions
oxOutOfStockExceptionoxArticleInputException, oxNoArticleException
Returns
object

Definition at line 379 of file oxbasket.php.

oxBasket::addVoucher (   $sVoucherId)

Checks and sets voucher information. Checks it's availability according to few conditions: oxvoucher::checkVoucherAvailability(), oxvoucher::checkUserAvailability(). Errors are stored in oxbasket::voucherErrors array. After all voucher is marked as reserved (oxvoucher::MarkAsReserved())

Parameters
string$sVoucherIdvoucher ID
Returns
null

Definition at line 1606 of file oxbasket.php.

oxBasket::afterUpdate ( )

Marks basket as up-to-date

Returns
null

Definition at line 1522 of file oxbasket.php.

oxBasket::calculateBasket (   $blForceUpdate = false)

Executes all needed functions to calculate basket price and other needed info

Parameters
bool$blForceUpdateset this parameter to TRUE to force basket recalculation
Returns
null

Definition at line 1424 of file oxbasket.php.

oxBasket::canAddProductToBasket (   $sProductId)

Checks if product can be added to basket

Parameters
string$sProductIdproduct id
Returns
bool

Definition at line 2837 of file oxbasket.php.

oxBasket::canCalcDiscounts ( )

Returns true if discount calculation is enabled

Returns
bool

Definition at line 829 of file oxbasket.php.

oxBasket::deleteBasket ( )

Deletes user basket object from session

Returns
null

Definition at line 1822 of file oxbasket.php.

oxBasket::formatDiscount ( )
protected

Formatting discounts

Returns
null

Definition at line 1679 of file oxbasket.php.

oxBasket::getAdditionalServicesVatPercent ( )

Get most used vat percent:

Returns
double|int

Definition at line 956 of file oxbasket.php.

oxBasket::getArtStockInBasket (   $sArtId,
  $sExpiredArtId = null 
)

Returns stock of article in basket, including bundle article

Parameters
string$sArtIdarticle id
string$sExpiredArtIditem id of updated article
Returns
double

Definition at line 2816 of file oxbasket.php.

oxBasket::getBasketArticles ( )

Returns array of basket oxarticle objects

Returns
array

Definition at line 1918 of file oxbasket.php.

oxBasket::getBasketCurrency ( )

Basket currency getter

Returns
oxuser

Definition at line 2245 of file oxbasket.php.

oxBasket::getBasketRootCatId ( )

Get active basket root category

Returns
string

Definition at line 2920 of file oxbasket.php.

oxBasket::getBasketSummary ( )

Function collects summary information about basket. Usually this info is used while calculating discounts or so. Data is stored in static class parameter oxbasket::$_aBasketSummary

Returns
object

Definition at line 1534 of file oxbasket.php.

oxBasket::getBasketUser ( )

Basket user getter

Returns
oxuser

Definition at line 915 of file oxbasket.php.

oxBasket::getBruttoSum ( )

Return basket brutto sum (in B2C view mode sum include discount)

Returns
decimal

Definition at line 301 of file oxbasket.php.

oxBasket::getCard ( )

Returns gift card object (if available)

Returns
oxwrapping

Definition at line 2180 of file oxbasket.php.

oxBasket::getCardId ( )

Returns applied gift card ID

Returns
string

Definition at line 2170 of file oxbasket.php.

oxBasket::getCardMessage ( )

Returns gift card message text

Returns
string

Definition at line 2148 of file oxbasket.php.

oxBasket::getContents ( )

Returns basket items array

Returns
array

Definition at line 2077 of file oxbasket.php.

oxBasket::getCosts (   $sId = null)

Returns array of basket costs. By passing cost identifier method will return this cost if available

Parameters
string$sIdcost id ( optional )
Returns
array

Definition at line 2023 of file oxbasket.php.

oxBasket::getDelCostNet ( )

Returns formatted netto price of delivery costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2349 of file oxbasket.php.

oxBasket::getDelCostVat ( )

Returns formatted VAT of delivery costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2331 of file oxbasket.php.

oxBasket::getDelCostVatPercent ( )

Returns VAT of delivery costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
double

Definition at line 2319 of file oxbasket.php.

oxBasket::getDeliveryCost ( )

Returns delivery costs

Returns
oxPrice

Definition at line 2698 of file oxbasket.php.

oxBasket::getDeliveryCosts ( )

Returns if exists delivery costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2685 of file oxbasket.php.

oxBasket::getDiscountedNettoPrice ( )

Returns product netto price with applied discounts and vouchers

Deprecated:
in v4.7.5/5.0.5 on 2013-04-15; not used in code, not needed. Use getNettoSum() method if needed.
Returns
double

Definition at line 2123 of file oxbasket.php.

oxBasket::getDiscountedProductsBruttoPrice ( )

Returns ( current basket products sum - total discount - voucher discount )

Returns
double

Definition at line 2768 of file oxbasket.php.

oxBasket::getDiscountProductsPrice ( )

Returns pricelist object of discounted products

Returns
oxprice

Definition at line 1959 of file oxbasket.php.

oxBasket::getDiscounts ( )

Returns applied discount information array

Returns
array

Definition at line 2206 of file oxbasket.php.

oxBasket::getFDeliveryCosts ( )

Returns if exists formatted delivery costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2668 of file oxbasket.php.

oxBasket::getFGiftCardCosts ( )

Returns if exists formatted gift card costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2629 of file oxbasket.php.

oxBasket::getFPaymentCosts ( )

Returns if exists formatted payment costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2444 of file oxbasket.php.

oxBasket::getFPrice ( )

Returns formatted basket total price

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2656 of file oxbasket.php.

oxBasket::getFProductsPrice ( )

Formatted Products price getter

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2307 of file oxbasket.php.

oxBasket::getFTsProtectionCosts ( )

Returns if exists formatted TS protection costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2976 of file oxbasket.php.

oxBasket::getFVoucherDiscountValue ( )

Returns formatted voucher discount

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2473 of file oxbasket.php.

oxBasket::getFWrappingCosts ( )

Returns if exists formatted wrapping costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2558 of file oxbasket.php.

oxBasket::getGiftCardCost ( )

Get giftcard cost

Returns
array

Definition at line 2644 of file oxbasket.php.

oxBasket::getGiftCardCostNet ( )

Returns formatted netto price of gift card costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2608 of file oxbasket.php.

oxBasket::getGiftCardCostVat ( )

Returns formatted VAT of gift card costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2586 of file oxbasket.php.

oxBasket::getGiftCardCostVatPercent ( )

Returns VAT of gift card costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
double

Definition at line 2504 of file oxbasket.php.

oxBasket::getItemKey (   $sProductId,
  $aSel = null,
  $aPersParam = null,
  $blBundle = false,
  $sAdditionalParam = '' 
)

Returns unique basket item identifier which consist from product ID, select lists data, persistent info and bundle property

Parameters
string$sProductIdbasket item id
array$aSelbasket item selectlists
array$aPersParambasket item persistent parameters
bool$blBundlebundle marker
string$sAdditionalParampossible additional information
Returns
string

Definition at line 539 of file oxbasket.php.

oxBasket::getItemsCount ( )

Returns count of items stored in basket

Returns
double

Definition at line 2057 of file oxbasket.php.

oxBasket::getMinOrderPrice ( )

Returns min order price value

Returns
decimal

Definition at line 3177 of file oxbasket.php.

oxBasket::getMostUsedVatPercent ( )

Get most used vat percent:

Returns
double|null

Definition at line 942 of file oxbasket.php.

oxBasket::getNettoSum ( )

Return basket netto sum (in B2B view mode sum include discount)

Returns
decimal

Definition at line 291 of file oxbasket.php.

oxBasket::getNotDiscountProductsPrice ( )

Returns pricelist object of not discounted products

Returns
oxprice in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin

Definition at line 3062 of file oxbasket.php.

oxBasket::getOrderId ( )

Returns unique order ID assigned to current basket. This id is only awailable on last order step

Returns
string

Definition at line 1998 of file oxbasket.php.

oxBasket::getPayCostNet ( )

Returns formatted netto price of payment costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2400 of file oxbasket.php.

oxBasket::getPayCostVat ( )

Returns formatted VAT of payment costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2382 of file oxbasket.php.

oxBasket::getPayCostVatPercent ( )

Returns VAT of payment costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
double

Definition at line 2370 of file oxbasket.php.

oxBasket::getPaymentCost ( )

Returns payment costs

Returns
oxPrice

Definition at line 2432 of file oxbasket.php.

oxBasket::getPaymentCosts ( )

Returns payment costs brutto value

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
double|bool

Definition at line 2419 of file oxbasket.php.

oxBasket::getPaymentId ( )

Get basket payment, if payment id is not set, try to get it from session

Returns
string

Definition at line 1852 of file oxbasket.php.

oxBasket::getPrice ( )

Returns basket price object

Returns
oxprice

Definition at line 1983 of file oxbasket.php.

oxBasket::getPriceForPayment ( )

Get basket price for payment cost calculation. Returned price is with applied discounts, vouchers and added delivery cost

Returns
double

Definition at line 2723 of file oxbasket.php.

oxBasket::getProductsCount ( )

Returns number of different products stored in basket

Returns
int

Definition at line 2047 of file oxbasket.php.

oxBasket::getProductsNetPrice ( )

Formatted Products net price getter

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2295 of file oxbasket.php.

oxBasket::getProductsPrice ( )

Returns basket products price list object

Returns
oxpricelist

Definition at line 1969 of file oxbasket.php.

oxBasket::getProductVats (   $blFormatCurrency = true)

Returns array of plain of formatted VATs which were calculated for basket

Parameters
bool$blFormatCurrencyenables currency formatting
Returns
array

Definition at line 2089 of file oxbasket.php.

oxBasket::getShippingId ( )

Get basket shipping set, if shipping set id is not set, try to get it from session

Returns
string oxDeliverySet

Definition at line 1890 of file oxbasket.php.

oxBasket::getStockCheckMode ( )

Returns stock control mode

Returns
bool

Definition at line 522 of file oxbasket.php.

oxBasket::getTotalDiscount ( )

Returns total basket discount oxprice object

Returns
oxprice

Definition at line 2196 of file oxbasket.php.

oxBasket::getTrustedShopProtectionCost ( )

Returns TS protection costs brutto value

Returns
double in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin

Definition at line 3051 of file oxbasket.php.

oxBasket::getTsProductId ( )

Trusted shops protection product ID getter

Returns
string

Definition at line 2964 of file oxbasket.php.

oxBasket::getTsProtectionCosts ( )

Returns TS protection costs brutto value

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
double

Definition at line 3037 of file oxbasket.php.

oxBasket::getTsProtectionNet ( )

Returns formatted netto price of TS protection costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 3021 of file oxbasket.php.

oxBasket::getTsProtectionVat ( )

Returns formatted VAT of TS protection costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 3004 of file oxbasket.php.

oxBasket::getTsProtectionVatPercent ( )

Returns VAT of TS protection costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2992 of file oxbasket.php.

oxBasket::getVoucherDiscount ( )

Returns basket voucher discount oxprice object

Returns
oxprice

Definition at line 2220 of file oxbasket.php.

oxBasket::getVoucherDiscValue ( )

Returns value of voucher discount

Returns
double

Definition at line 2458 of file oxbasket.php.

oxBasket::getVouchers ( )

Returns array of vouchers applied to basket

Returns
array

Definition at line 2037 of file oxbasket.php.

oxBasket::getWeight ( )

Returns total basket weight

Returns
double

Definition at line 2067 of file oxbasket.php.

oxBasket::getWrappCostNet ( )

Returns formatted netto price of wrapping costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string

Definition at line 2537 of file oxbasket.php.

oxBasket::getWrappCostVat ( )

Returns formatted VAT of wrapping costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
string | bool

Definition at line 2516 of file oxbasket.php.

oxBasket::getWrappCostVatPercent ( )

Returns VAT of wrapping costs

Deprecated:
in v4.8/5.1 on 2013-10-14; for formatting use oxPrice smarty plugin
Returns
double

Definition at line 2491 of file oxbasket.php.

oxBasket::getWrappingCost ( )

Get wrapping cost

Returns
array

Definition at line 2574 of file oxbasket.php.

oxBasket::hasArticlesWithDownloadableAgreement ( )

Returns whether there are any articles in basket with downloadable products agreement enabled.

Returns
bool

Definition at line 3157 of file oxbasket.php.

oxBasket::hasArticlesWithIntangibleAgreement ( )

Returns whether there are any articles in basket with intangible products agreement enabled.

Returns
bool

Definition at line 3137 of file oxbasket.php.

oxBasket::hasDownloadableProducts ( )

Returns true if at least one product is downloadable in basket

Returns
bool

Definition at line 3118 of file oxbasket.php.

oxBasket::hasSkipedDiscount ( )

Returns true if discount must be skipped for one of the products

Returns
bool

Definition at line 2271 of file oxbasket.php.

oxBasket::isBelowMinOrderPrice ( )

Returns TRUE if ( current basket products sum - total discount - voucher discount ) > 0

Returns
bool

Definition at line 2791 of file oxbasket.php.

oxBasket::isCalculationModeNetto ( )

Return true if calculation mode is netto

Returns
bool

Definition at line 265 of file oxbasket.php.

oxBasket::isEnabled ( )

Checks if configuration allows basket usage or if user agent is search engine

Returns
bool

Definition at line 335 of file oxbasket.php.

oxBasket::isNewItemAdded ( )

Returns true if new product was just added to basket

Returns
bool

Definition at line 3104 of file oxbasket.php.

oxBasket::isPriceViewModeNetto ( )

Returns true if view mode is netto

Returns
bool

Definition at line 1173 of file oxbasket.php.

oxBasket::isProportionalCalculationOn ( )

Get most used vat percent:

Returns
double

Definition at line 974 of file oxbasket.php.

oxBasket::load ( )

Populates current basket from the saved one.

Returns
null

Definition at line 1709 of file oxbasket.php.

oxBasket::onUpdate ( )

Notifies basket that recalculation is needed

Returns
null

Definition at line 1512 of file oxbasket.php.

oxBasket::removeItem (   $sItemKey)

Removes item from basket

Parameters
string$sItemKeybasket item key
Returns
null

Definition at line 556 of file oxbasket.php.

oxBasket::removeVoucher (   $sVoucherId)

Removes voucher from basket and unreserved it.

Parameters
string$sVoucherIdremovable voucher ID
Returns
null

Definition at line 1646 of file oxbasket.php.

oxBasket::resetUserInfo ( )

Resets user related information kept in basket object

Returns
null

Definition at line 1668 of file oxbasket.php.

oxBasket::setBasketCurrency (   $oCurrency)

Set basket currency

Parameters
object$oCurrencycurrency object
Returns
null

Definition at line 2235 of file oxbasket.php.

oxBasket::setBasketRootCatId (   $sRoot)

Set active basket root category

Parameters
string$sRootRoot category id
Returns
null

Definition at line 2910 of file oxbasket.php.

oxBasket::setBasketUser (   $oUser)

Basket user setter

Parameters
oxuser$oUserBasket user
Returns
null

Definition at line 931 of file oxbasket.php.

oxBasket::setBruttoSum (   $dBruttoSum)

Set basket brutto sum

Parameters
decimal$dBruttoSumsum of basket in brutto mode
Returns
null

Definition at line 325 of file oxbasket.php.

oxBasket::setCalculationModeNetto (   $blNettoMode = true)

Set netto calculation mode

Parameters
bool$blNettoMode- true in netto; false - turn off
Returns
null

Definition at line 281 of file oxbasket.php.

oxBasket::setCardId (   $sCardId)

Gift card ID setter

Parameters
string$sCardIdgift card id
Returns
null

Definition at line 2160 of file oxbasket.php.

oxBasket::setCardMessage (   $sMessage)

Gift card message setter

Parameters
string$sMessagegift card message
Returns
null

Definition at line 2138 of file oxbasket.php.

oxBasket::setCatChangeWarningState (   $blShow)

Sets category change warn state

Parameters
bool$blShowto show warning or not
Returns
null

Definition at line 2932 of file oxbasket.php.

oxBasket::setCost (   $sCostName,
  $oPrice = null 
)

Sets basket additional costs

Parameters
string$sCostNameadditional costs
object$oPriceoxPrice
Returns
null

Definition at line 1411 of file oxbasket.php.

oxBasket::setDeliveryPrice (   $oShippingPrice = null)

Set basket shipping price

Parameters
string$oShippingPricedelivery costs
Returns
null

Definition at line 1880 of file oxbasket.php.

oxBasket::setDiscountCalcMode (   $blCalcDiscounts)

Sets discount calculation mode

Parameters
bool$blCalcDiscountscalculate discounts or not
Returns
null

Definition at line 819 of file oxbasket.php.

oxBasket::setNettoSum (   $dNettoSum)

Set basket netto sum

Parameters
decimal$dNettoSumsum of basket in netto mode
Returns
null

Definition at line 313 of file oxbasket.php.

oxBasket::setOrderId (   $sId)

Basket order ID setter

Parameters
string$sIdunique id for basket order
Returns
null

Definition at line 2010 of file oxbasket.php.

oxBasket::setPayment (   $sPaymentId = null)

Set basket payment ID

Parameters
string$sPaymentIdpayment id
Returns
null

Definition at line 1842 of file oxbasket.php.

oxBasket::setShipping (   $sShippingSetId = null)

Set basket shipping set ID

Parameters
string$sShippingSetIddeliveryset id
Returns
null

Definition at line 1867 of file oxbasket.php.

oxBasket::setSkipDiscounts (   $blSkip)

Used to set "skip discounts" status for basket

Parameters
bool$blSkipset true to skip discounts
Returns
null

Definition at line 2283 of file oxbasket.php.

oxBasket::setSkipVouchersChecking (   $blSkipChecking = null)

Set skip or not vouchers availability checking

Parameters
bool$blSkipCheckingskip or not vouchers checking
Returns
null

Definition at line 2261 of file oxbasket.php.

oxBasket::setStockCheckMode (   $blCheck)

Sets stock control mode

Parameters
bool$blCheckstock control mode
Returns
null

Definition at line 512 of file oxbasket.php.

oxBasket::setTotalDiscount (   $dDiscount)

Sets total discount value

Parameters
double$dDiscountnew total discount value
Returns
null

Definition at line 2710 of file oxbasket.php.

oxBasket::setTsProductId (   $sProductId)

Trusted shops protection product ID setter

Parameters
string$sProductIdproduct id
Returns
null

Definition at line 2954 of file oxbasket.php.

oxBasket::setVoucherDiscount (   $dDiscount)

Voucher discount setter

Parameters
double$dDiscountvoucher discount value
Returns
null

Definition at line 1052 of file oxbasket.php.

oxBasket::showCatChangeWarning ( )

Tells to show category change warning

Returns
bool

Definition at line 2942 of file oxbasket.php.

Member Data Documentation

oxBasket::$_aBasketContents = array()
protected

Definition at line 14 of file oxbasket.php.

oxBasket::$_aBasketSummary = null
protected

Definition at line 133 of file oxbasket.php.

oxBasket::$_aCosts = array()
protected

Definition at line 105 of file oxbasket.php.

oxBasket::$_aDiscountedVats = null
protected

Definition at line 196 of file oxbasket.php.

oxBasket::$_aDiscounts = array()
protected

Definition at line 77 of file oxbasket.php.

oxBasket::$_aItemDiscounts = array()
protected

Definition at line 84 of file oxbasket.php.

oxBasket::$_aVouchers = array()
protected

Definition at line 98 of file oxbasket.php.

oxBasket::$_blCalcDiscounts = true
protected

Definition at line 224 of file oxbasket.php.

oxBasket::$_blCheckStock = true
protected

Definition at line 217 of file oxbasket.php.

oxBasket::$_blDownloadableProducts = null
protected

Definition at line 257 of file oxbasket.php.

oxBasket::$_blNewITemAdded = null
protected

Definition at line 251 of file oxbasket.php.

oxBasket::$_blShowCatChangeWarning = false
protected

Definition at line 238 of file oxbasket.php.

oxBasket::$_blSkipDiscounts = false
protected

Definition at line 203 of file oxbasket.php.

oxBasket::$_blSkipVouchersAvailabilityChecking = null
protected

Definition at line 182 of file oxbasket.php.

oxBasket::$_blUpdateNeeded = true
protected

Definition at line 126 of file oxbasket.php.

oxBasket::$_dBruttoSum = null
protected

Definition at line 63 of file oxbasket.php.

oxBasket::$_dDiscountedProductNettoPrice = null
protected

Definition at line 189 of file oxbasket.php.

oxBasket::$_dItemsCnt = 0.0
protected

Definition at line 28 of file oxbasket.php.

oxBasket::$_dNettoSum = null
protected

Definition at line 56 of file oxbasket.php.

oxBasket::$_dWeight = 0.0
protected

Definition at line 35 of file oxbasket.php.

oxBasket::$_iProductsCnt = 0
protected

Definition at line 21 of file oxbasket.php.

oxBasket::$_isCalculationModeNetto = null
protected

Definition at line 49 of file oxbasket.php.

oxBasket::$_oCurrency = null
protected

Definition at line 175 of file oxbasket.php.

oxBasket::$_oDeliveryPrice = null
protected

Definition at line 210 of file oxbasket.php.

oxBasket::$_oDiscountProductsPriceList = null
protected

Definition at line 112 of file oxbasket.php.

oxBasket::$_oNotDiscountedProductsPriceList = null
protected

Definition at line 119 of file oxbasket.php.

oxBasket::$_oPrice = null
protected

Definition at line 42 of file oxbasket.php.

oxBasket::$_oProductsPriceList = null
protected

Definition at line 70 of file oxbasket.php.

oxBasket::$_oTotalDiscount = null
protected

Definition at line 161 of file oxbasket.php.

oxBasket::$_oUser = null
protected

Definition at line 154 of file oxbasket.php.

oxBasket::$_oVoucherDiscount = null
protected

Definition at line 168 of file oxbasket.php.

oxBasket::$_sBasketCategoryId = null
protected

Definition at line 231 of file oxbasket.php.

oxBasket::$_sOrderId = null
protected

Definition at line 91 of file oxbasket.php.

oxBasket::$_sPaymentId = null
protected

Definition at line 140 of file oxbasket.php.

oxBasket::$_sShippingSetId = null
protected

Definition at line 147 of file oxbasket.php.

oxBasket::$_sTsProductId = null
protected

Definition at line 245 of file oxbasket.php.


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