- Class name: CartCore
- Parent class: ObjectModel
- Source: classes/Cart.php line 27
- BOTH
- BOTH_WITHOUT_SHIPPING
- ONLY_DISCOUNTS
- ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING
- ONLY_PRODUCTS
- ONLY_PRODUCTS_WITHOUT_SHIPPING
- ONLY_SHIPPING
- ONLY_WRAPPING
- $_attributesLists
- $_carriers
- $_isVirtualCart
- $_nbProducts
- $_products
- $_taxCalculationMethod
- $_taxes_rate
- $_totalWeight
- $allow_seperated_package
- $checkedTos
- $date_add
- $date_upd
- $definition
- $delivery_option
- $gift
- $gift_message
- $id
- $id_address_delivery
- $id_address_invoice
- $id_carrier
- $id_currency
- $id_customer
- $id_guest
- $id_lang
- $id_shop
- $id_shop_group
- $pictures
- $recyclable
- $secure_key
- $textFields
- $webserviceParameters
- $db
- $def
- $fieldsRequired
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $get_shop_from_context
- $id_shop_list
- $identifier
- $image_dir
- $image_format
- $table
- $tables
- $update_fields
- __construct
- _addCustomization
- _deleteCustomization
- _updateCustomizationQuantity
- add
- addCartRule
- addDiscount
- addExtraCarriers
- addFieldsRequiredDatabase
- addPictureToProduct
- addTextFieldToProduct
- associateTo
- autosetProductAddress
- cacheSomeAttributesLists
- carrierIsSelected
- checkDiscountValidity
- checkQuantities
- clearCache
- containsProduct
- delete
- deleteAssociations
- deleteCustomizationToProduct
- deleteDiscount
- deleteImage
- deletePictureToProduct
- deleteProduct
- deleteSelection
- desintifier
- displayFieldName
- duplicate
- duplicateObject
- duplicateProduct
- duplicateShops
- existsInDatabase
- formatFields
- formatValue
- getAddressCollection
- getAssociatedShops
- getCarrierCost
- getCartByOrderId
- getCartIdByOrderId
- getCartRules
- getCustomerCarts
- getDefinition
- getDeliveryAddressesWithoutCarriers
- getDeliveryOption
- getDeliveryOptionList
- getDiscounts
- getDiscountsCustomer
- getFieldByLang
- getFields
- getFieldsLang
- getFieldsRequiredDatabase
- getFieldsShop
- getGiftWrappingPrice
- getIdCarrierFromDeliveryOption
- getLastProduct
- getNbOfPackages
- getNbProducts
- getOrderShippingCost
- getOrderTotal
- getOrderTotalUsingTaxCalculationMethod
- getPackageIdWarehouse
- getPackageList
- getPackageShippingCost
- getProductCustomization
- getProducts
- getSummaryDetails
- getTaxesAverageUsed
- getTotalCart
- getTotalShippingCost
- getTotalWeight
- getTranslationsFields
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- getWsCartRows
- hasMultishopEntries
- hydrate
- hydrateCollection
- intifier
- isAllProductsInStock
- isAssociatedToShop
- isCarrierInRange
- isCurrentlyUsed
- isGuestCartByCartId
- isLangMultishop
- isMultiAddressDelivery
- isMultishop
- isVirtualCart
- lastNoneOrderedCart
- makeTranslationFields
- nbProducts
- orderExists
- removeCartRule
- replaceZeroByShopName
- save
- setDefinitionRetrocompatibility
- setDeliveryOption
- setFieldsToUpdate
- setNoMultishipping
- setProductAddressDelivery
- setWsCartRows
- simulateCarrierSelectedOutput
- simulateCarriersOutput
- sortDeliveryOptionList
- toggleStatus
- update
- updateAddressId
- updateMultishopTable
- updateQty
- validateControler
- validateController
- validateField
- validateFields
- validateFieldsLang
- validateFieldsRequiredDatabase
const BOTH = 3
- Source: classes/Cart.php line 141.
const BOTH_WITHOUT_SHIPPING = 4
- Source: classes/Cart.php line 142.
const ONLY_DISCOUNTS = 2
- Source: classes/Cart.php line 140.
const ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING = 8
- Source: classes/Cart.php line 146.
const ONLY_PRODUCTS = 1
- Source: classes/Cart.php line 139.
const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7
- Source: classes/Cart.php line 145.
const ONLY_SHIPPING = 5
- Source: classes/Cart.php line 143.
const ONLY_WRAPPING = 6
- Source: classes/Cart.php line 144.
protected mixed $_attributesLists = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 91.
protected mixed $_carriers = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 89.
protected mixed $_isVirtualCart = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 84.
protected mixed $_nbProducts = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 83.
protected mixed $_products = null
- Visibility: protected
- Source: classes/Cart.php line 86.
protected mixed $_taxCalculationMethod = PS_TAX_EXC
- Visibility: protected
- Source: classes/Cart.php line 88.
protected mixed $_taxes_rate = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 90.
protected mixed $_totalWeight = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 87.
public boolean $allow_seperated_package = false
- Visibility: public
- Source: classes/Cart.php line 81.
public mixed $checkedTos = false
- Visibility: public
- Source: classes/Cart.php line 74.
public string $date_add
- Visibility: public
- Source: classes/Cart.php line 63.
public string $date_upd
- Visibility: public
- Source: classes/Cart.php line 72.
public mixed $definition = array('table' => 'cart', 'primary' => 'id_cart', 'fields' => array('id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_address_delivery' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_address_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'gift_message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'), 'delivery_option' => array('type' => self::TYPE_STRING), 'secure_key' => array('type' => self::TYPE_STRING, 'size' => 32), 'allow_seperated_package' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat')))
- Visibility: public
- This property is static.
- Source: classes/Cart.php line 96.
public mixed $delivery_option
- Visibility: public
- Source: classes/Cart.php line 78.
public boolean $gift
- Visibility: public
- Source: classes/Cart.php line 57.
public string $gift_message
- Visibility: public
- Source: classes/Cart.php line 60.
public mixed $id
- Visibility: public
- Source: classes/Cart.php line 29.
public integer $id_address_delivery
- Visibility: public
- Source: classes/Cart.php line 36.
public integer $id_address_invoice
- Visibility: public
- Source: classes/Cart.php line 39.
public integer $id_carrier
- Visibility: public
- Source: classes/Cart.php line 69.
public integer $id_currency
- Visibility: public
- Source: classes/Cart.php line 42.
public integer $id_customer
- Visibility: public
- Source: classes/Cart.php line 45.
public integer $id_guest
- Visibility: public
- Source: classes/Cart.php line 48.
public integer $id_lang
- Visibility: public
- Source: classes/Cart.php line 51.
public mixed $id_shop
- Visibility: public
- Source: classes/Cart.php line 33.
public mixed $id_shop_group
- Visibility: public
- Source: classes/Cart.php line 31.
public mixed $pictures
- Visibility: public
- Source: classes/Cart.php line 75.
public boolean $recyclable = 1
- Visibility: public
- Source: classes/Cart.php line 54.
public string $secure_key
- Visibility: public
- Source: classes/Cart.php line 66.
public mixed $textFields
- Visibility: public
- Source: classes/Cart.php line 76.
protected mixed $webserviceParameters = array('fields' => array('id_address_delivery' => array('xlink_resource' => 'addresses'), 'id_address_invoice' => array('xlink_resource' => 'addresses'), 'id_currency' => array('xlink_resource' => 'currencies'), 'id_customer' => array('xlink_resource' => 'customers'), 'id_guest' => array('xlink_resource' => 'guests'), 'id_lang' => array('xlink_resource' => 'languages')), 'associations' => array('cart_rows' => array('resource' => 'cart_row', 'virtual_entity' => true, 'fields' => array('id_product' => array('required' => true, 'xlink_resource' => 'products'), 'id_product_attribute' => array('required' => true, 'xlink_resource' => 'combinations'), 'quantity' => array('required' => true)))))
- Visibility: protected
- Source: classes/Cart.php line 120.
protected \Db $db = false
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 140.
protected array $def
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 130.
protected mixed $fieldsRequired = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 80.
protected mixed $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 65.
protected mixed $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 95.
protected mixed $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 85.
protected mixed $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 100.
protected mixed $fieldsValidate = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 90.
protected mixed $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 105.
protected mixed $get_shop_from_context = true
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 63.
public mixed $id_shop_list = null
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 61.
protected mixed $identifier
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 75.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 116.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 119.
protected mixed $table
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 70.
protected mixed $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 110.
protected array $update_fields = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 135.
mixed CartCore::__construct($id, $id_lang)
- Visibility: public
- Source: classes/Cart.php line 148
- $id mixed
- $id_lang mixed
boolean CartCore::_addCustomization(integer $id_product, integer $id_product_attribute, integer $index, integer $type, string $field, integer $quantity)
Add customization item to database
- Visibility: public
- Source: classes/Cart.php line 1028
- $id_product integer
- $id_product_attribute integer
- $index integer
- $type integer
- $field string
- $quantity integer
boolean CartCore::_deleteCustomization(integer $id_customization, $id_product, $id_product_attribute, $id_address_delivery)
Delete a customization from the cart. If customization is a Picture, then the image is also deleted
- Visibility: protected
- Source: classes/Cart.php line 1208
- $id_customization integer
- $id_product mixed
- $id_product_attribute mixed
- $id_address_delivery mixed
mixed CartCore::_updateCustomizationQuantity($quantity, $id_customization, $id_product, $id_product_attribute, $id_address_delivery, $operator)
- Visibility: protected
- Source: classes/Cart.php line 964
- $quantity mixed
- $id_customization mixed
- $id_product mixed
- $id_product_attribute mixed
- $id_address_delivery mixed
- $operator mixed
mixed CartCore::add($autodate, $null_values)
- Visibility: public
- Source: classes/Cart.php line 168
- $autodate mixed
- $null_values mixed
mixed CartCore::addCartRule($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 755
- $id_cart_rule mixed
mixed CartCore::addDiscount($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 749
- $id_cart_rule mixed
mixed CartCore::addExtraCarriers(array $array)
Execute hook displayCarrierList (extraCarrier) and merge theme to the $array
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3603
- $array array
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1144
- $fields mixed
boolean CartCore::addPictureToProduct($id_product, $index, $type, $file)
Add customer's pictures
- Visibility: public
- Source: classes/Cart.php line 3039
- $id_product mixed
- $index mixed
- $type mixed
- $file mixed
boolean CartCore::addTextFieldToProduct($id_product, $index, $type, $text_value)
Add customer's text
- Visibility: public
- Source: classes/Cart.php line 3026
- $id_product mixed
- $index mixed
- $type mixed
- $text_value mixed
boolean ObjectModelCore::associateTo(integer|array $id_shops)
This function associate an item to its context
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1191
- $id_shops integer|array
mixed CartCore::autosetProductAddress()
Set an address to all products on the cart without address delivery
- Visibility: public
- Source: classes/Cart.php line 3470
mixed CartCore::cacheSomeAttributesLists($ipa_list, $id_lang)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 664
- $ipa_list mixed
- $id_lang mixed
mixed CartCore::carrierIsSelected($id_carrier, $id_address)
- Visibility: public
- Source: classes/Cart.php line 2129
- $id_carrier mixed
- $id_address mixed
mixed CartCore::checkDiscountValidity($obj, $discounts, $order_total, $products, $check_cart_discount)
- Visibility: public
- Source: classes/Cart.php line 2806
- $obj mixed
- $discounts mixed
- $order_total mixed
- $products mixed
- $check_cart_discount mixed
mixed CartCore::checkQuantities()
- Visibility: public
- Source: classes/Cart.php line 2934
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1158
- $all mixed
mixed CartCore::containsProduct($id_product, $id_product_attribute, $id_customization, $id_address_delivery)
- Visibility: public
- Source: classes/Cart.php line 780
- $id_product mixed
- $id_product_attribute mixed
- $id_customization mixed
- $id_address_delivery mixed
mixed CartCore::delete()
- Visibility: public
- Source: classes/Cart.php line 231
mixed CartCore::deleteAssociations()
- Visibility: public
- Source: classes/Cart.php line 3498
boolean CartCore::deleteCustomizationToProduct(integer $id_product, integer $index)
Remove a customer's customization
- Visibility: public
- Source: classes/Cart.php line 3057
- $id_product integer
- $index integer
mixed CartCore::deleteDiscount($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 1091
- $id_cart_rule mixed
boolean ObjectModelCore::deleteImage($force_delete)
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1317
- $force_delete mixed
mixed CartCore::deletePictureToProduct($id_product, $index)
- Visibility: public
- Source: classes/Cart.php line 3044
- $id_product mixed
- $index mixed
boolean CartCore::deleteProduct(integer $id_product, integer $id_product_attribute, integer $id_customization, $id_address_delivery)
Delete a product from the cart
- Visibility: public
- Source: classes/Cart.php line 1125
- $id_product integer - Product ID
- $id_product_attribute integer - Attribute ID if needed
- $id_customization integer - Customization id
- $id_address_delivery mixed
boolean ObjectModelCore::deleteSelection(array $selection)
Delete several objects from database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 737
- $selection array
mixed CartCore::desintifier($int, $delimiter)
Translate a int option_delivery identifier (3240002000) in a string ('24,3,')
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2234
- $int mixed
- $delimiter mixed
mixed ObjectModelCore::displayFieldName($field, $class, $htmlentities, \Context $context)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 937
- $field mixed
- $class mixed
- $htmlentities mixed
- $context Context
mixed CartCore::duplicate()
- Visibility: public
- Source: classes/Cart.php line 3124
\new ObjectModelCore::duplicateObject()
Duplicate current object to database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 527
mixed CartCore::duplicateProduct($id_product, $id_product_attribute, $id_address_delivery, $new_id_address_delivery, $quantity, $keep_quantity)
- Visibility: public
- Source: classes/Cart.php line 3296
- $id_product mixed
- $id_product_attribute mixed
- $id_address_delivery mixed
- $new_id_address_delivery mixed
- $quantity mixed
- $keep_quantity mixed
mixed ObjectModelCore::duplicateShops($id)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1235
- $id mixed
boolean ObjectModelCore::existsInDatabase(integer $id_entity, string $table)
Specify if an ObjectModel is already in database
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1354
- $id_entity integer
- $table string
array ObjectModelCore::formatFields(integer $type, integer $id_lang)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 334
- $type integer - FORMAT_COMMON or FORMAT_LANG or FORMAT_SHOP
- $id_lang integer - If this parameter is given, only take lang fields
mixed ObjectModelCore::formatValue(mixed $value, integer $type, $with_quotes)
Format a data
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 380
- $value mixed
- $type integer
- $with_quotes mixed
mixed CartCore::getAddressCollection()
Get all delivery addresses object for the current cart
- Visibility: public
- Source: classes/Cart.php line 2265
array ObjectModelCore::getAssociatedShops()
Get the list of associated id_shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1220
float CartCore::getCarrierCost(integer $id_carrier, \booleal $useTax, \Country $default_country, array $delivery_option)
Return shipping total of a specific carriers for the cart
- Visibility: public
- Source: classes/Cart.php line 2424
- $id_carrier integer
- $useTax booleal
- $default_country Country
- $delivery_option array - Array of the delivery option for each address
\Cart|boolean CartCore::getCartByOrderId(integer $id_order)
Build cart object from provided id_order
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3000
- $id_order integer
mixed CartCore::getCartIdByOrderId($id_order)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3008
- $id_order mixed
mixed CartCore::getCartRules($filter)
- Visibility: public
- Source: classes/Cart.php line 317
- $filter mixed
mixed CartCore::getCustomerCarts($id_customer, $with_order)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3109
- $id_customer mixed
- $with_order mixed
array ObjectModelCore::getDefinition(string $class, string $field)
Get object definition
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1460
- $class string - Name of object
- $field string - Name of field if we want the definition of one field only
array CartCore::getDeliveryAddressesWithoutCarriers(boolean $return_collection)
Get all the ids of the delivery addresses without carriers
- Visibility: public
- Source: classes/Cart.php line 3634
- $return_collection boolean - Return a collection
array CartCore::getDeliveryOption($default_country, $dontAutoSeletectOptions, $use_cache)
Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
- Visibility: public
- Source: classes/Cart.php line 2327
- $default_country mixed
- $dontAutoSeletectOptions mixed
- $use_cache mixed
array CartCore::getDeliveryOptionList(\Country $default_country, boolean $flush)
Get all deliveries options available for the current cart
- Visibility: public
- Source: classes/Cart.php line 1877
- $default_country Country
- $flush boolean - Force flushing cache
mixed CartCore::getDiscounts($lite, $refresh)
- Visibility: public
- Source: classes/Cart.php line 311
- $lite mixed
- $refresh mixed
mixed CartCore::getDiscountsCustomer($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 361
- $id_cart_rule mixed
mixed ObjectModelCore::getFieldByLang($field_name, null $id_lang)
Return the field value for the specified language if the field is multilang, else the field value.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1548
- $field_name mixed
- $id_lang null
array ObjectModelCore::getFields()
Prepare fields for ObjectModel class (add, update) All fields are verified (pSQL, intval.
..)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 262
array ObjectModelCore::getFieldsLang()
Prepare multilang fields
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 299
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1136
- $all mixed
array ObjectModelCore::getFieldsShop()
Prepare fields for multishop Fields are not validated here, we considere they are already validated in getFields() method, this not the best solution but this is the only one possible for retro compatibility.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 285
\gift CartCore::getGiftWrappingPrice(boolean $with_taxes, $id_address)
Get the gift wrapping price
- Visibility: public
- Source: classes/Cart.php line 1540
- $with_taxes boolean - With or without taxes
- $id_address mixed
mixed CartCore::getIdCarrierFromDeliveryOption($delivery_option)
- Visibility: protected
- Source: classes/Cart.php line 2312
- $delivery_option mixed
mixed CartCore::getLastProduct()
- Visibility: public
- Source: classes/Cart.php line 373
integer CartCore::getNbOfPackages()
Get the number of packages
- Visibility: public
- Source: classes/Cart.php line 1566
mixed CartCore::getNbProducts($id)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 731
- $id mixed
mixed CartCore::getOrderShippingCost($id_carrier, $use_tax, \Country $default_country, $product_list)
- Visibility: public
- Source: classes/Cart.php line 2453
- $id_carrier mixed
- $use_tax mixed
- $default_country Country
- $product_list mixed
float CartCore::getOrderTotal($with_taxes, integer $type, $products, $id_carrier, boolean $use_cache)
This function returns the total cart amount
Possible values for $type: Cart::ONLY_PRODUCTS Cart::ONLY_DISCOUNTS Cart::BOTH Cart::BOTH_WITHOUT_SHIPPING Cart::ONLY_SHIPPING Cart::ONLY_WRAPPING Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING
- Visibility: public
- Source: classes/Cart.php line 1286
- $with_taxes mixed
- $type integer - Total type
- $products mixed
- $id_carrier mixed
- $use_cache boolean - Allow using cache of the method CartRule::getContextualValue
mixed CartCore::getOrderTotalUsingTaxCalculationMethod($id_cart)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 1263
- $id_cart mixed
mixed CartCore::getPackageIdWarehouse($package, $id_carrier)
- Visibility: public
- Source: classes/Cart.php line 1827
- $package mixed
- $id_carrier mixed
array CartCore::getPackageList($flush)
Get products grouped by package and by addresses to be sent individualy (one package = one shipping cost).
- Visibility: public
- Source: classes/Cart.php line 1591
- $flush mixed
float CartCore::getPackageShippingCost(integer $id_carrier, \booleal $use_tax, \Country $default_country, Array $product_list)
Return package shipping cost
- Visibility: public
- Source: classes/Cart.php line 2470
- $id_carrier integer - Carrier ID (default : current carrier)
- $use_tax booleal
- $default_country Country
- $product_list Array
array CartCore::getProductCustomization(integer $id_product, integer $type, boolean $not_in_cart)
Return custom pictures in this cart for a specified product
- Visibility: public
- Source: classes/Cart.php line 3091
- $id_product integer
- $type integer - only return customization of this type
- $not_in_cart boolean - only return customizations that are not in cart already
mixed CartCore::getProducts($refresh, $id_product, $id_country)
Return cart products
- Visibility: public
- Source: classes/Cart.php line 399
- $refresh mixed
- $id_product mixed
- $id_country mixed
array CartCore::getSummaryDetails($id_lang, $refresh)
Return useful informations for cart
- Visibility: public
- Source: classes/Cart.php line 2820
- $id_lang mixed
- $refresh mixed
mixed CartCore::getTaxesAverageUsed($id_cart)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 270
- $id_cart mixed
mixed CartCore::getTotalCart($id_cart, $use_tax_display, $type)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 1252
- $id_cart mixed
- $use_tax_display mixed
- $type mixed
float CartCore::getTotalShippingCost(array $delivery_option, \booleal $use_tax, \Country $default_country)
Return shipping total for the cart
- Visibility: public
- Source: classes/Cart.php line 2396
- $delivery_option array - Array of the delivery option for each address
- $use_tax booleal
- $default_country Country
float CartCore::getTotalWeight($products)
Return cart weight
- Visibility: public
- Source: classes/Cart.php line 2762
- $products mixed
mixed ObjectModelCore::getTranslationsFields($fields_array)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 769
- $fields_array mixed
array ObjectModelCore::getValidationRules(string $class)
Returns object validation rules (fields validity)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 148
- $class string - Child class name for static use (optional)
mixed ObjectModelCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1078
- $sql_join mixed
- $sql_filter mixed
- $sql_sort mixed
- $sql_limit mixed
mixed ObjectModelCore::getWebserviceParameters($ws_params_attribute_name)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1004
- $ws_params_attribute_name mixed
mixed CartCore::getWsCartRows()
- Visibility: public
- Source: classes/Cart.php line 3204
boolean ObjectModelCore::hasMultishopEntries()
Check if there is more than one entries in associated shop table for current entity
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1260
mixed ObjectModelCore::hydrate(array $data, integer $id_lang)
Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1392
- $data array
- $id_lang integer
array ObjectModelCore::hydrateCollection(string $class, array $datas, integer $id_lang)
Fill (hydrate) a list of objects in order to get a collection of these objects
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1411
- $class string - Class of objects to hydrate
- $datas array - List of data (multi-dimensional array)
- $id_lang integer
integer CartCore::intifier($string, $delimiter)
Translate a string option_delivery identifier ('24,3,') in a int (3240002000)
The option_delivery identifier is a list of integers separated by a ','. This method replace the delimiter by a sequence of '0'. The size of this sequence is fixed by the first digit of the return
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2224
- $string mixed
- $delimiter mixed
boolean CartCore::isAllProductsInStock(boolean $ignore_virtual, boolean $exclusive)
- Visibility: public
- Source: classes/Cart.php line 3570
- $ignore_virtual boolean - Ignore virtual product
- $exclusive boolean - If true, the validation is exclusive : it must be present product in stock and out of stock
boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)
Check if current object is associated to a shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1173
- $id_shop integer
mixed CartCore::isCarrierInRange($id_carrier, $id_zone)
isCarrierInRange
Check if the specified carrier is in range
- Visibility: public
- Source: classes/Cart.php line 3530
- $id_carrier mixed
- $id_zone mixed
boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)
This method is allow to know if a entity is currently used
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1372
- $table string - name of table linked to entity
- $has_active_column boolean - true if the table has an active column
boolean CartCore::isGuestCartByCartId(integer $id_cart)
isGuestCartByCartId
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3511
- $id_cart integer
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1272
boolean CartCore::isMultiAddressDelivery()
Does the cart use multiple address
- Visibility: public
- Source: classes/Cart.php line 2246
mixed ObjectModelCore::isMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1267
boolean CartCore::isVirtualCart($strict)
Check if cart contains only virtual products
- Visibility: public
- Source: classes/Cart.php line 2971
- $strict mixed
mixed CartCore::lastNoneOrderedCart($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2951
- $id_customer mixed
mixed ObjectModelCore::makeTranslationFields($fields, $fields_array, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 785
- $fields mixed
- $fields_array mixed
- $id_language mixed
mixed CartCore::nbProducts()
Return cart products quantity
- Visibility: public
- Source: classes/Cart.php line 723
boolean CartCore::orderExists()
Check if order has already been placed
- Visibility: public
- Source: classes/Cart.php line 1083
mixed CartCore::removeCartRule($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 1097
- $id_cart_rule mixed
mixed CartCore::replaceZeroByShopName($echo, $tr)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3119
- $echo mixed
- $tr mixed
boolean ObjectModelCore::save(boolean $null_values, boolean $autodate)
Save current object to database (add or update)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 424
- $null_values boolean
- $autodate boolean
mixed ObjectModelCore::setDefinitionRetrocompatibility()
Retrocompatibility for classes without $definition static Remove this in 1.6 !
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1488
mixed CartCore::setDeliveryOption($delivery_option)
Set the delivery option and id_carrier, if there is only one carrier
- Visibility: public
- Source: classes/Cart.php line 2286
- $delivery_option mixed
mixed ObjectModelCore::setFieldsToUpdate(array $fields)
Set a list of specific fields to update array(field1 => true, field2 => false, langfield1 => array(1 => true, 2 => false))
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1574
- $fields array
mixed CartCore::setNoMultishipping()
Update products cart address delivery with the address delivery of the cart
- Visibility: public
- Source: classes/Cart.php line 3407
mixed CartCore::setProductAddressDelivery($id_product, $id_product_attribute, $old_id_address_delivery, $new_id_address_delivery)
- Visibility: public
- Source: classes/Cart.php line 3232
- $id_product mixed
- $id_product_attribute mixed
- $old_id_address_delivery mixed
- $new_id_address_delivery mixed
mixed CartCore::setWsCartRows($values)
- Visibility: public
- Source: classes/Cart.php line 3216
- $values mixed
mixed CartCore::simulateCarrierSelectedOutput()
- Visibility: public
- Source: classes/Cart.php line 2205
mixed CartCore::simulateCarriersOutput(\Country $default_country, boolean $flush)
Get all deliveries options available for the current cart formated like Carriers::getCarriersForOrder This method was wrote for retrocompatibility with 1.4 theme New theme need to use Cart::getDeliveryOptionList() to generate carriers option in the checkout process
- Visibility: public
- Source: classes/Cart.php line 2157
- $default_country Country
- $flush boolean - Force flushing cache
integer CartCore::sortDeliveryOptionList($option1, $option2)
Sort list of option delivery by parameters define in the BO
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2108
- $option1 mixed
- $option2 mixed
boolean ObjectModelCore::toggleStatus()
Toggle object status in database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 753
mixed CartCore::update($null_values)
- Visibility: public
- Source: classes/Cart.php line 181
- $null_values mixed
mixed CartCore::updateAddressId(integer $id_address, integer $id_address_new)
Update the address id of the cart
- Visibility: public
- Source: classes/Cart.php line 202
- $id_address integer - Current address id to change
- $id_address_new integer - New address id
boolean ObjectModelCore::updateMultishopTable(string $classname, array $data, string $where, string $specific_where)
Update a table and splits the common datas and the shop datas
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1287
- $classname string
- $data array
- $where string
- $specific_where string - Only executed for common table
mixed CartCore::updateQty(integer $quantity, integer $id_product, integer $id_product_attribute, $id_customization, string $operator, $id_address_delivery, \Shop $shop, $auto_add_cart_rule)
Update product quantity
- Visibility: public
- Source: classes/Cart.php line 812
- $quantity integer - Quantity to add (or substract)
- $id_product integer - Product ID
- $id_product_attribute integer - Attribute ID if needed
- $id_customization mixed
- $operator string - Indicate if quantity must be increased or decreased
- $id_address_delivery mixed
- $shop Shop
- $auto_add_cart_rule mixed
mixed ObjectModelCore::validateControler($htmlentities)
TODO: refactor rename all calls to this to validateController
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 952
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 958
- $htmlentities mixed
boolean|string ObjectModelCore::validateField(string $field, mixed $value, integer $id_lang)
Validate a single field
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 890
- $field string - Field name
- $value mixed - Field value
- $id_lang integer
boolean|string ObjectModelCore::validateFields(boolean $die, boolean $error_return)
Check for fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 823
- $die boolean
- $error_return boolean
boolean|string ObjectModelCore::validateFieldsLang(boolean $die, boolean $error_return)
Check for multilingual fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 852
- $die boolean
- $error_return boolean
mixed ObjectModelCore::validateFieldsRequiredDatabase($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1114
- $htmlentities mixed