Inheritance diagram for oxBasket:
Collaboration diagram for oxBasket:Definition at line 5 of file oxbasket.php.
| oxBasket.__wakeUp | ( | ) |
Resets new basket item addition state on unserialization
Definition at line 2684 of file oxbasket.php.
| oxBasket._addBundles | ( | ) | [protected] |
Iterates through basket contents and adds bundles to items + adds global basket bundles
Definition at line 593 of file oxbasket.php.
| oxBasket._addBundlesToBasket | ( | $ | aBundles | ) | [protected] |
Adds bundles to basket
| array | $aBundles added bundle articles |
Definition at line 636 of file oxbasket.php.
| oxBasket._addedNewItem | ( | $ | sProductID, | |
| $ | dAmount, | |||
| $ | aSel, | |||
| $ | aPersParam, | |||
| $ | blOverride, | |||
| $ | blBundle, | |||
| $ | sOldBasketItemId | |||
| ) | [protected] |
Is called when new basket item is successfully added
| string | $sProductID id of product | |
| double | $dAmount product amount | |
| array | $aSel product select lists (default null) | |
| array | $aPersParam product persistent parameters (default null) | |
| bool | $blOverride marker to acumulate passed amount or renew (default false) | |
| bool | $blBundle marker if product is bundle or not (default false) | |
| string | $sOldBasketItemId id if old basket item if to change it |
Definition at line 2671 of file oxbasket.php.
| oxBasket._applyDiscounts | ( | ) | [protected] |
Performs netto price and VATs calculations including discounts and vouchers.
Definition at line 981 of file oxbasket.php.
| oxBasket._calcBasketDiscount | ( | ) | [protected] |
Loads basket discounts and calculates discount values.
Definition at line 1021 of file oxbasket.php.
| oxBasket._calcBasketTotalDiscount | ( | ) | [protected] |
| 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.
Definition at line 1096 of file oxbasket.php.
| oxBasket._calcDeliveryCost | ( | ) | [protected] |
Iterates through basket items and calculates its delivery costs
Definition at line 764 of file oxbasket.php.
| oxBasket._calcItemsPrice | ( | ) | [protected] |
Iterates through basket items and calculates its prices and discounts
Definition at line 657 of file oxbasket.php.
| oxBasket._calcPaymentCost | ( | ) | [protected] |
Payment cost calculation, applying payment discount if available. Returns oxprice object.
Definition at line 1136 of file oxbasket.php.
| oxBasket._calcTotalPrice | ( | ) | [protected] |
Performs final sum calculations and roundings.
Definition at line 853 of file oxbasket.php.
| oxBasket._calcTsProtectionCost | ( | ) | [protected] |
TS Protection cost calculation. Returns oxprice object.
Definition at line 1160 of file oxbasket.php.
| oxBasket._calcVoucherDiscount | ( | ) | [protected] |
| oxBasket._canSaveBasket | ( | ) | [protected] |
| oxBasket._changeBasketItemKey | ( | $ | sOldKey, | |
| $ | sNewKey, | |||
| $ | value = null | |||
| ) | [protected] |
change old key to new one but retain key position in array
| string | $sOldKey old key | |
| string | $sNewKey new key to place in old one's place | |
| mixed | $value (optional) |
Definition at line 255 of file oxbasket.php.
| oxBasket._clearBundles | ( | ) | [protected] |
Unsets bundled basket items from basket contents array
Definition at line 483 of file oxbasket.php.
| oxBasket._deleteSavedBasket | ( | ) | [protected] |
Adds item to saved basket (history)
| string | $sProductId product id | |
| double | $dAmount item amount | |
| array | $aSel article select lists | |
| bool | $blOverride override item amount or not | |
| array | $aPersParam product persistent parameters (default null) |
Definition at line 1558 of file oxbasket.php.
| oxBasket._findDelivCountry | ( | ) | [protected] |
Tries to fetch user delivery country ID
Definition at line 1576 of file oxbasket.php.
| oxBasket._getArticleBundles | ( | $ | oBasketItem | ) | [protected] |
Returns array of bundled articles IDs for basket item
| object | $oBasketItem basket item object |
Definition at line 500 of file oxbasket.php.
| oxBasket._getBasketBundles | ( | $ | aBundles = array() |
) | [protected] |
Returns array of bundled discount articles for whole basket
| array | $aBundles array of found bundles |
Definition at line 562 of file oxbasket.php.
| oxBasket._getItemBundles | ( | $ | oBasketItem, | |
| $ | aBundles = array() | |||
| ) | [protected] |
Returns array of bundled discount articles
| object | $oBasketItem basket item object | |
| array | $aBundles array of found bundles |
Definition at line 524 of file oxbasket.php.
| oxBasket._isProductInRootCategory | ( | $ | sProductId, | |
| $ | sRootCatId | |||
| ) | [protected] |
Checks if product is in root category
| string | $sProductId product id | |
| string | $sRootCatId root category id |
Definition at line 2498 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.
Definition at line 746 of file oxbasket.php.
| oxBasket._save | ( | ) | [protected] |
| oxBasket._setDeprecatedValues | ( | ) | [protected] |
Sets deprecate values
Definition at line 1453 of file oxbasket.php.
| oxBasket.addOrderArticleToBasket | ( | $ | oOrderArticle | ) |
Adds order article to basket (method normally used while recalculating order)
| oxorderarticle | $oOrderArticle order article to store in basket |
Definition at line 385 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 succeded
| string | $sProductID id of product | |
| double | $dAmount product amount | |
| array | $aSel product select lists (default null) | |
| array | $aPersParam product persistent parameters (default null) | |
| bool | $blOverride marker to acumulate passed amount or renew (default false) | |
| bool | $blBundle marker if product is bundle or not (default false) | |
| string | $sOldBasketItemId id if old basket item if to change it |
Definition at line 285 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())
| string | $sVoucherId voucher ID |
Definition at line 1378 of file oxbasket.php.
| oxBasket.afterUpdate | ( | ) |
| oxBasket.calculateBasket | ( | $ | blForceUpdate = false |
) |
Executes all needed functions to calculate basket price and other needed info
| bool | $blForceUpdate set this parameter to TRUE to force basket recalculation |
Definition at line 1198 of file oxbasket.php.
| oxBasket.canAddProductToBasket | ( | $ | sProductId | ) |
Checks if product can be added to basket
| string | $sProductId product id |
Definition at line 2449 of file oxbasket.php.
| oxBasket.canCalcDiscounts | ( | ) |
Returns true if discount calculation is enabled
Definition at line 732 of file oxbasket.php.
| oxBasket.deleteBasket | ( | ) |
| oxBasket.getArtStockInBasket | ( | $ | sArtId, | |
| $ | sExpiredArtId = null | |||
| ) |
Returns stock of article in basket, including bundle article
| string | $sArtId article id | |
| string | $sExpiredArtId item id of updated article |
Definition at line 2428 of file oxbasket.php.
| oxBasket.getBasketArticles | ( | ) |
Returns array of basket oxarticle objects
Definition at line 1712 of file oxbasket.php.
| oxBasket.getBasketCurrency | ( | ) |
| oxBasket.getBasketRootCatId | ( | ) |
| 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
Definition at line 1306 of file oxbasket.php.
| oxBasket.getBasketUser | ( | ) |
| oxBasket.getCard | ( | ) |
Returns gift card object (if available)
Definition at line 1973 of file oxbasket.php.
| oxBasket.getCardId | ( | ) |
| oxBasket.getCardMessage | ( | ) |
| oxBasket.getContents | ( | ) |
| oxBasket.getCosts | ( | $ | sId = null |
) |
Returns array of basket costs. By passing cost identifier method will return this cost if available
| string | $sId cost id ( optional ) |
Definition at line 1818 of file oxbasket.php.
| oxBasket.getDelCostNet | ( | ) |
Returns formatted netto price of delivery costs
Definition at line 2136 of file oxbasket.php.
| oxBasket.getDelCostVat | ( | ) |
Returns formatted VAT of delivery costs
Definition at line 2120 of file oxbasket.php.
| oxBasket.getDelCostVatPercent | ( | ) |
| oxBasket.getDeliveryCosts | ( | ) |
Returns if exists delivery costs
Definition at line 2331 of file oxbasket.php.
| oxBasket.getDiscountedNettoPrice | ( | ) |
Returns product netto price with applied discounts and vouchers
Definition at line 1916 of file oxbasket.php.
| oxBasket.getDiscountedProductsBruttoPrice | ( | ) |
Returns ( current basket products sum - total discount - voucher discount )
Definition at line 2380 of file oxbasket.php.
| oxBasket.getDiscountProductsPrice | ( | ) |
Returns pricelist object of discounted products
Definition at line 1754 of file oxbasket.php.
| oxBasket.getDiscounts | ( | ) |
Returns applied discount information array
Definition at line 1998 of file oxbasket.php.
| oxBasket.getFDeliveryCosts | ( | ) |
Returns if exists formatted delivery costs
Definition at line 2317 of file oxbasket.php.
| oxBasket.getFPaymentCosts | ( | ) |
Returns if exists formatted payment costs
Definition at line 2208 of file oxbasket.php.
| oxBasket.getFPrice | ( | ) |
| oxBasket.getFProductsPrice | ( | ) |
| oxBasket.getFTsProtectionCosts | ( | ) |
Returns if exists formatted TS protection costs
Definition at line 2586 of file oxbasket.php.
| oxBasket.getFVoucherDiscountValue | ( | ) |
Returns formated voucher discount
Definition at line 2236 of file oxbasket.php.
| oxBasket.getFWrappingCosts | ( | ) |
Returns if exists formatted wrapping costs
Definition at line 2293 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
| string | $sProductId basket item id | |
| array | $aSel basket item selectlists | |
| array | $aPersParam basket item persistent parameters | |
| bool | $blBundle bundle marker | |
| var | $sAdditionalParam possible additional information |
Definition at line 441 of file oxbasket.php.
| oxBasket.getItemsCount | ( | ) |
Returns count of items stored in basket
Definition at line 1852 of file oxbasket.php.
| oxBasket.getMostUsedVatPercent | ( | ) |
| oxBasket.getNotDiscountProductsPrice | ( | ) |
Returns pricelist object of not discounted products
Definition at line 2653 of file oxbasket.php.
| oxBasket.getOrderId | ( | ) |
Returns unique order ID assigned to current basket. This id is only awailable on last order step
Definition at line 1793 of file oxbasket.php.
| oxBasket.getPayCostNet | ( | ) |
Returns formatted netto price of payment costs
Definition at line 2181 of file oxbasket.php.
| oxBasket.getPayCostVat | ( | ) |
| oxBasket.getPayCostVatPercent | ( | ) |
| oxBasket.getPaymentCosts | ( | ) |
Returns payment costs brutto value
Definition at line 2198 of file oxbasket.php.
| oxBasket.getPaymentId | ( | ) |
Get basket payment, if payment id is not set, try to get it from session
Definition at line 1646 of file oxbasket.php.
| oxBasket.getPrice | ( | ) |
| oxBasket.getPriceForPayment | ( | ) |
Get basket price for payment cost calculation. Returned price is with applied discounts, vouchers and added delivery cost
Definition at line 2359 of file oxbasket.php.
| oxBasket.getProductsCount | ( | ) |
Returns number of different products stored in basket
Definition at line 1842 of file oxbasket.php.
| oxBasket.getProductsNetPrice | ( | ) |
| oxBasket.getProductsPrice | ( | ) |
Returns basket products price list object
Definition at line 1764 of file oxbasket.php.
| oxBasket.getProductVats | ( | $ | blFormatCurrency = true |
) |
Returns array of palain of formatted VATs which were calculated for basket
| bool | $blFormatCurrency enambles currency formating |
Definition at line 1884 of file oxbasket.php.
| oxBasket.getShippingId | ( | ) |
Get basket shipping set, if shipping set id is not set, try to get it from session
Definition at line 1684 of file oxbasket.php.
| oxBasket.getStockCheckMode | ( | ) |
| oxBasket.getTotalDiscount | ( | ) |
Returns total basket discount oxprice object
Definition at line 1988 of file oxbasket.php.
| oxBasket.getTsProductId | ( | ) |
Trusted shops protection product ID getter
Definition at line 2576 of file oxbasket.php.
| oxBasket.getTsProtectionCosts | ( | ) |
Returns TS protection costs brutto value
Definition at line 2639 of file oxbasket.php.
| oxBasket.getTsProtectionNet | ( | ) |
Returns formatted netto price of TS protection costs
Definition at line 2625 of file oxbasket.php.
| oxBasket.getTsProtectionVat | ( | ) |
Returns formatted VAT of TS protection costs
Definition at line 2610 of file oxbasket.php.
| oxBasket.getTsProtectionVatPercent | ( | ) |
Returns VAT of TS protection costs
Definition at line 2600 of file oxbasket.php.
| oxBasket.getVoucherDiscount | ( | ) |
Returns basket voucher discount oxprice object
Definition at line 2014 of file oxbasket.php.
| oxBasket.getVoucherDiscValue | ( | ) |
| oxBasket.getVouchers | ( | ) |
Returns array of vouchers applied to basket
Definition at line 1832 of file oxbasket.php.
| oxBasket.getWeight | ( | ) |
| oxBasket.getWrappCostNet | ( | ) |
Returns formatted netto price of wrapping costs
Definition at line 2278 of file oxbasket.php.
| oxBasket.getWrappCostVat | ( | ) |
Returns formatted VAT of wrapping costs
Definition at line 2262 of file oxbasket.php.
| oxBasket.getWrappCostVatPercent | ( | ) |
| oxBasket.hasDownloadableProducts | ( | ) |
Returns true if at least one product is downloadable in basket
Definition at line 2708 of file oxbasket.php.
| oxBasket.hasSkipedDiscount | ( | ) |
Returns true if discount must be skipped for one of the products
Definition at line 2065 of file oxbasket.php.
| oxBasket.isBelowMinOrderPrice | ( | ) |
Returns TRUE if ( current basket products sum - total discount - voucher discount ) > 0
Definition at line 2403 of file oxbasket.php.
| oxBasket.isEnabled | ( | ) |
Checks if configuration allows basket usage or if user agent is search engine
Definition at line 241 of file oxbasket.php.
| oxBasket.isNewItemAdded | ( | ) |
Returns true if new product was just added to basket
Definition at line 2694 of file oxbasket.php.
| oxBasket.load | ( | ) |
Populates current basket from the saved one.
Definition at line 1483 of file oxbasket.php.
| oxBasket.onUpdate | ( | ) |
Notifies basket that recalculation is needed
Definition at line 1284 of file oxbasket.php.
| oxBasket.removeItem | ( | $ | sItemKey | ) |
Removes item from basket
| string | $sItemKey basket item key |
Definition at line 458 of file oxbasket.php.
| oxBasket.removeVoucher | ( | $ | sVoucherId | ) |
Removes voucher from basket and unreserves it.
| string | $sVoucherId removable voucher ID |
Definition at line 1418 of file oxbasket.php.
| oxBasket.resetUserInfo | ( | ) |
Resets user related information kept in basket object
Definition at line 1440 of file oxbasket.php.
| oxBasket.setBasketCurrency | ( | $ | oCurrency | ) |
Set basket currency
| object | $oCurrency currency object |
Definition at line 2029 of file oxbasket.php.
| oxBasket.setBasketRootCatId | ( | $ | sRoot | ) |
Set active basket root category
| string | $sRoot Root category id |
Definition at line 2522 of file oxbasket.php.
| oxBasket.setBasketUser | ( | $ | oUser | ) |
Basket user setter
| oxuser | $oUser Basket user |
Definition at line 830 of file oxbasket.php.
| oxBasket.setCardId | ( | $ | sCardId | ) |
Gift card ID setter
| string | $sCardId gift card id |
Definition at line 1953 of file oxbasket.php.
| oxBasket.setCardMessage | ( | $ | sMessage | ) |
Gift card message setter
| string | $sMessage gift card message |
Definition at line 1931 of file oxbasket.php.
| oxBasket.setCatChangeWarningState | ( | $ | blShow | ) |
Sets category change warn state
| bool | $blShow to show warning or not |
Definition at line 2544 of file oxbasket.php.
| oxBasket.setCost | ( | $ | sCostName, | |
| $ | oPrice = null | |||
| ) |
Sets basket additional costs
| string | $sCostName additional costs | |
| object | $oPrice oxPrice |
Definition at line 1185 of file oxbasket.php.
| oxBasket.setDeliveryPrice | ( | $ | oShippingPrice = null |
) |
Set basket shipping price
| string | $oShippingPrice delivery costs |
Definition at line 1674 of file oxbasket.php.
| oxBasket.setDiscountCalcMode | ( | $ | blCalcDiscounts | ) |
Sets discount calculation mode
| bool | $blCalcDiscounts calculate discounts or not |
Definition at line 722 of file oxbasket.php.
| oxBasket.setOrderId | ( | $ | sId | ) |
Basket order ID setter
| string | $sId unique id for basket order |
Definition at line 1805 of file oxbasket.php.
| oxBasket.setPayment | ( | $ | sPaymentId = null |
) |
Set basket payment ID
| string | $sPaymentId payment id |
Definition at line 1636 of file oxbasket.php.
| oxBasket.setShipping | ( | $ | sShippingSetId = null |
) |
Set basket shipping set ID
| string | $sShippingSetId deliveryset id |
Definition at line 1661 of file oxbasket.php.
| oxBasket.setSkipDiscounts | ( | $ | blSkip | ) |
Used to set "skip discounts" status for basket
| bool | $blSkip set true to skip discounts |
Definition at line 2077 of file oxbasket.php.
| oxBasket.setSkipVouchersChecking | ( | $ | blSkipChecking = null |
) |
Set skip or not vouchers availability checking
| bool | $blSkipChecking skip or not vouchers checking |
Definition at line 2055 of file oxbasket.php.
| oxBasket.setStockCheckMode | ( | $ | blCheck | ) |
Sets stock control mode
| bool | $blCheck stock control mode |
Definition at line 414 of file oxbasket.php.
| oxBasket.setTotalDiscount | ( | $ | dDiscount | ) |
Sets total discount value
| double | $dDiscount new total discount value |
Definition at line 2346 of file oxbasket.php.
| oxBasket.setTsProductId | ( | $ | sProductId | ) |
Trusted shops protection product ID setter
| string | $sProductId product id |
Definition at line 2566 of file oxbasket.php.
| oxBasket.setVoucherDiscount | ( | $ | dDiscount | ) |
Voucher discount setter
| double | $dDiscount voucher discount value |
Definition at line 912 of file oxbasket.php.
| oxBasket.showCatChangeWarning | ( | ) |
oxBasket.$_aBasketContents = array() [protected] |
Definition at line 12 of file oxbasket.php.
oxBasket.$_aBasketSummary = null [protected] |
Definition at line 110 of file oxbasket.php.
oxBasket.$_aCosts = array() [protected] |
Definition at line 82 of file oxbasket.php.
oxBasket.$_aDiscountedVats = null [protected] |
Definition at line 173 of file oxbasket.php.
oxBasket.$_aDiscounts = array() [protected] |
Definition at line 54 of file oxbasket.php.
oxBasket.$_aItemDiscounts = array() [protected] |
Definition at line 61 of file oxbasket.php.
oxBasket.$_aVouchers = array() [protected] |
Definition at line 75 of file oxbasket.php.
oxBasket.$_blCalcDiscounts = true [protected] |
Definition at line 201 of file oxbasket.php.
oxBasket.$_blCheckStock = true [protected] |
Definition at line 194 of file oxbasket.php.
oxBasket.$_blDownloadableProducts = null [protected] |
Definition at line 234 of file oxbasket.php.
oxBasket.$_blNewITemAdded = null [protected] |
Definition at line 228 of file oxbasket.php.
oxBasket.$_blShowCatChangeWarning = false [protected] |
Definition at line 215 of file oxbasket.php.
oxBasket.$_blSkipDiscounts = false [protected] |
Definition at line 180 of file oxbasket.php.
oxBasket.$_blSkipVouchersAvailabilityChecking = null [protected] |
Definition at line 159 of file oxbasket.php.
oxBasket.$_blUpdateNeeded = true [protected] |
Definition at line 103 of file oxbasket.php.
oxBasket.$_dDiscountedProductNettoPrice = null [protected] |
Definition at line 166 of file oxbasket.php.
oxBasket.$_dItemsCnt = 0.0 [protected] |
Definition at line 26 of file oxbasket.php.
oxBasket.$_dWeight = 0.0 [protected] |
Definition at line 33 of file oxbasket.php.
oxBasket.$_iProductsCnt = 0 [protected] |
Definition at line 19 of file oxbasket.php.
oxBasket.$_oCurrency = null [protected] |
Definition at line 152 of file oxbasket.php.
oxBasket.$_oDeliveryPrice = null [protected] |
Definition at line 187 of file oxbasket.php.
oxBasket.$_oDiscountProductsPriceList = null [protected] |
Definition at line 89 of file oxbasket.php.
oxBasket.$_oNotDiscountedProductsPriceList = null [protected] |
Definition at line 96 of file oxbasket.php.
oxBasket.$_oPrice = null [protected] |
Definition at line 40 of file oxbasket.php.
oxBasket.$_oProductsPriceList = null [protected] |
Definition at line 47 of file oxbasket.php.
oxBasket.$_oTotalDiscount = null [protected] |
Definition at line 138 of file oxbasket.php.
oxBasket.$_oUser = null [protected] |
Definition at line 131 of file oxbasket.php.
oxBasket.$_oVoucherDiscount = null [protected] |
Definition at line 145 of file oxbasket.php.
oxBasket.$_sBasketCategoryId = null [protected] |
Definition at line 208 of file oxbasket.php.
oxBasket.$_sOrderId = null [protected] |
Definition at line 68 of file oxbasket.php.
oxBasket.$_sPaymentId = null [protected] |
Definition at line 117 of file oxbasket.php.
oxBasket.$_sShippingSetId = null [protected] |
Definition at line 124 of file oxbasket.php.
oxBasket.$_sTsProductId = null [protected] |
Definition at line 222 of file oxbasket.php.
1.7.1