

| oxBasket.isEnabled | ( | ) |
| oxBasket._changeBasketItemKey | ( | $ | sOldKey, | |
| $ | sNewKey, | |||
| $ | value = null | |||
| ) | [protected] |
change old key to new one but retain key position in array
| $sOldKey | string old key | |
| $sNewKey | string new key to place in old one's place | |
| $value | mixed (optional) |
| oxBasket.addToBasket | ( | $ | sProductID, | |
| $ | dAmount, | |||
| $ | blAllowUnevenAmounts, | |||
| $ | 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 | |
| bool | $blAllowUnevenAmounts uneven amounts availability | |
| 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 |
| 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 |
| oxBasket.removeItem | ( | $ | sItemKey | ) |
Removes item from basket
| string | $sItemKey basket item key |
| oxBasket._clearBundles | ( | ) | [protected] |
Unsets bundled basket items from basket contents array
| oxBasket._getArticleBundles | ( | $ | oBasketItem | ) | [protected] |
Returns array of bundled articles IDs for basket item
| object | $oBasketItem basket item object |
| oxBasket._getItemBundles | ( | $ | oBasketItem | ) | [protected] |
Returns array of bundled discount articles
| object | $oBasketItem basket item object |
| oxBasket._getBasketBundles | ( | ) | [protected] |
Returns array of bundled discount articles for whole basket
| oxBasket._addBundles | ( | $ | blAllowUnevenAmounts | ) | [protected] |
Iterates through basket contents and adds bundles to items + adds global basket bundles
| bool | $blAllowUnevenAmounts uneven amounts are either allowed or not |
| oxBasket._addBundlesToBasket | ( | $ | blAllowUnevenAmounts, | |
| $ | aBundles | |||
| ) | [protected] |
Adds bundles to basket
| bool | $blAllowUnevenAmounts uneven amounts are either allowed or not | |
| array | $aBundles added bundle articles |
| oxBasket._calcItemsPrice | ( | ) | [protected] |
Iterates through basket items and calculates its prices and discounts
| oxBasket._mergeDiscounts | ( | $ | aDiscounts, | |
| $ | aItemDiscounts | |||
| ) | [protected] |
| oxBasket._calcDeliveryCost | ( | $ | blExclNonMaterial = false |
) | [protected] |
Iterates through basket items and calculates its delivery costs
| bool | $blExclNonMaterial Exclude non material products while calculating |
| oxBasket.setBasketUser | ( | $ | oUser | ) |
| oxBasket.getMostUsedVatPercent | ( | ) |
Get most used vat percent:
| oxBasket._calcTotalPrice | ( | ) | [protected] |
Performs final sum calculations and roundings.
| oxBasket._calcVoucherDiscount | ( | ) | [protected] |
Calculates voucher discount
| oxBasket._applyDiscounts | ( | ) | [protected] |
Performs netto price and VATs calculations including discounts and vouchers.
| oxBasket._calcBasketDiscount | ( | ) | [protected] |
Loads basket discounts and calculates discount values.
| oxBasket._calcBasketTotalDiscount | ( | ) | [protected] |
Calculates total basket discount value.
| 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.
| oxBasket._calcPaymentCost | ( | ) | [protected] |
| oxBasket.setCost | ( | $ | sCostName, | |
| $ | oPrice = null | |||
| ) |
Sets basket additional costs
| string | $sCostName additional costs | |
| object | $oPrice oxPrice |
| oxBasket.calculateBasket | ( | $ | blAllowUnevenAmounts, | |
| $ | blForceUpdate = false, |
|||
| $ | blExclNonMaterial = false | |||
| ) |
Executes all needed functions to calculate basket price and other needed info
| bool | $blAllowUnevenAmounts uneven amounts are either allowed or not | |
| bool | $blForceUpdate set this parameter to TRUE to force basket recalculation | |
| bool | $blExclNonMaterial exclude non material products from delivery calculation |
| oxBasket.onUpdate | ( | ) |
Notifies basket that recalculation is needed
| oxBasket.afterUpdate | ( | ) |
Marks basket as up-to-date
| 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
| 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 | |
| bool | $blSkipChecking skip voucher availability checking |
| oxBasket.removeVoucher | ( | $ | sVoucherId | ) |
Removes voucher from basket and unreserves it.
| string | $sVoucherId removable voucher ID |
| oxBasket.resetUserInfo | ( | ) |
| oxBasket._setDeprecatedValues | ( | ) | [protected] |
Sets deprecate values
| oxBasket._mergeSavedBasket | ( | $ | blAllowUnevenAmounts | ) | [protected] |
Populates current basket from the saved one. Saves current basket items to SaveBasket
| bool | $blAllowUnevenAmounts describes if uneven amounts are allowed |
| oxBasket._addItemToSavedBasket | ( | $ | sProductId, | |
| $ | dAmount, | |||
| $ | aSel, | |||
| $ | blOverride = false | |||
| ) | [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 |
| oxBasket._deleteSavedBasket | ( | ) | [protected] |
| oxBasket._findDelivCountry | ( | ) | [protected] |
| oxBasket.deleteBasket | ( | ) |
| oxBasket.setPayment | ( | $ | sPaymentId = null |
) |
Set basket payment ID
| string | $sPaymentId payment id |
| oxBasket.getPaymentId | ( | ) |
Get basket payment, if payment id is not set, try to get it from session
| oxBasket.setShipping | ( | $ | sShippingSetId = null |
) |
Set basket shipping set ID
| string | $sShippingSetId deliveryset id |
| oxBasket.getShippingId | ( | ) |
Get basket shipping set, if shipping set id is not set, try to get it from session
| oxBasket.getBasketArticles | ( | ) |
Returns array of basket oxarticle objects
| oxBasket.getDiscountProductsPrice | ( | ) |
Returns discount articles products price object
| oxBasket.getProductsPrice | ( | ) |
Returns basket products price list object
| oxBasket.getPrice | ( | ) |
Returns basket price object
| oxBasket.getOrderId | ( | ) |
| oxBasket.setOrderId | ( | $ | sId | ) |
| 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 ) |
| oxBasket.getVouchers | ( | ) |
Returns array of vouchers applied to basket
| oxBasket.getProductsCount | ( | ) |
Returns number of different products stored in basket
| oxBasket.getItemsCount | ( | ) |
Returns count of items stored in basket
| oxBasket.getWeight | ( | ) |
Returns total basket weight
| oxBasket.getContents | ( | ) |
Returns basket items array
| oxBasket.getProductVats | ( | ) |
Returns array of formatted VATs which were calculated for basket
| oxBasket.getDiscountedNettoPrice | ( | ) |
Returns products netto price with applied discounts and vouschers
| oxBasket.setCardMessage | ( | $ | sMessage | ) |
Gift card message setter
| string | $sMessage gift card message |
| oxBasket.getCardMessage | ( | ) |
Returns gift card message text
| oxBasket.setCardId | ( | $ | sCardId | ) |
Gift card ID setter
| string | $sCardId gift card id |
| oxBasket.getCardId | ( | ) |
Returns applied gift card ID
| oxBasket.getCard | ( | ) |
Returns gift card object (if available)
| oxBasket.getTotalDiscount | ( | ) |
Returns total basket discount oxprice object
| oxBasket.getDiscounts | ( | ) |
Returns applied discount information array
| oxBasket.getVoucherDiscount | ( | ) |
Returns basket voucher discount oxprice object
| oxBasket.setBasketCurrency | ( | $ | oCurrency | ) |
Set basket currency
| object | $oCurrency currency object |
| oxBasket.getBasketCurrency | ( | ) |
| oxBasket.setSkipVouchersChecking | ( | $ | blSkipChecking = null |
) |
Set skip or not vouchers availability checking
| bool | $blSkipChecking skip or not vouchers checking |
| oxBasket.hasSkipedDiscount | ( | ) |
Returns true if discount must be skipped for one of the products
| oxBasket.setSkipDiscounts | ( | $ | blSkip | ) |
Used to set "skip discounts" status for basket
| bool | $blSkip set true to skip discounts |
| oxBasket.getProductsNetPrice | ( | ) |
Formatted Products net price getter
| oxBasket.getFProductsPrice | ( | ) |
Formatted Products price getter
| oxBasket.getDelCostVatPercent | ( | ) |
Returns VAT of delivery costs
| oxBasket.getDelCostVat | ( | ) |
Returns formatted VAT of delivery costs
| oxBasket.getDelCostNet | ( | ) |
Returns formatted netto price of delivery costs
| oxBasket.getPayCostVatPercent | ( | ) |
Returns VAT of payment costs
| oxBasket.getPayCostVat | ( | ) |
Returns formatted VAT of payment costs
| oxBasket.getPayCostNet | ( | ) |
Returns formatted netto price of payment costs
| oxBasket.getPaymentCosts | ( | ) |
Returns payment costs
| oxBasket.getVoucherDiscValue | ( | ) |
Returns value of voucher discount
| oxBasket.getWrappCostVatPercent | ( | ) |
Returns VAT of wrapping costs
| oxBasket.getWrappCostVat | ( | ) |
Returns formatted VAT of wrapping costs
| oxBasket.getWrappCostNet | ( | ) |
Returns formatted netto price of wrapping costs
| oxBasket.getFPrice | ( | ) |
Returns formatted basket total price
| oxBasket.getFDeliveryCosts | ( | ) |
Returns if exists formatted delivery costs
| oxBasket.getDeliveryCosts | ( | ) |
Returns if exists delivery costs
oxBasket.$_aBasketContents = array() [protected] |
oxBasket.$_iProductsCnt = 0 [protected] |
oxBasket.$_dItemsCnt = 0.0 [protected] |
oxBasket.$_dWeight = 0.0 [protected] |
oxBasket.$_oPrice = null [protected] |
oxBasket.$_oProductsPriceList = null [protected] |
oxBasket.$_aDiscounts = array() [protected] |
oxBasket.$_aItemDiscounts = array() [protected] |
oxBasket.$_sOrderId = null [protected] |
oxBasket.$_aVouchers = array() [protected] |
oxBasket.$_aCosts = array() [protected] |
oxBasket.$_oDiscountProductsPriceList = null [protected] |
oxBasket.$_oNotDiscountedProductsPriceList = null [protected] |
oxBasket.$_blUpdateNeeded = true [protected] |
oxBasket.$_aBasketSummary = null [protected] |
oxBasket.$_blBasketMerged = false [protected] |
oxBasket.$_sPaymentId = null [protected] |
oxBasket.$_sShippingSetId = null [protected] |
oxBasket.$_oUser = null [protected] |
oxBasket.$_oTotalDiscount = null [protected] |
oxBasket.$_oVoucherDiscount = null [protected] |
oxBasket.$_oCurrency = null [protected] |
oxBasket.$_blSkipVouchersAvailabilityChecking = null [protected] |
oxBasket.$_dDiscountedProductNettoPrice = null [protected] |
oxBasket.$_aDiscountedVats = null [protected] |
oxBasket.$_blSkipDiscounts = false [protected] |
1.5.5