- 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
- $_customer
- $_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
- $mobile_theme
- $pictures
- $recyclable
- $secure_key
- $textFields
- $webserviceParameters
- $cache_objects
- $db
- $def
- $fieldsRequired
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $force_id
- $get_shop_from_context
- $id_shop_list
- $identifier
- $image_dir
- $image_format
- $loaded_classes
- $table
- $tables
- $update_fields
- __construct
- _addCustomization
- _deleteCustomization
- _updateCustomizationQuantity
- add
- addCartRule
- addDiscount
- addExtraCarriers
- addFieldsRequiredDatabase
- addPictureToProduct
- addTextFieldToProduct
- associateTo
- autosetProductAddress
- cacheFieldsRequiredDatabase
- cacheSomeAttributesLists
- carrierIsSelected
- checkDiscountValidity
- checkProductsAccess
- checkQuantities
- clearCache
- containsProduct
- delete
- deleteAssociations
- deleteCustomizationToProduct
- deleteDiscount
- deleteImage
- deletePictureToProduct
- deleteProduct
- deleteSelection
- desintifier
- disableCache
- displayFieldName
- duplicate
- duplicateObject
- duplicateProduct
- duplicateShops
- enableCache
- 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
- getOrderedCartRulesIds
- 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
- isMultiShopField
- isMultishop
- isVirtualCart
- lastNoneOrderedCart
- makeTranslationFields
- nbProducts
- orderExists
- removeCartRule
- replaceZeroByShopName
- save
- setDefinitionRetrocompatibility
- setDeliveryOption
- setFieldsToUpdate
- setNoMultishipping
- setProductAddressDelivery
- setTaxCalculationMethod
- setWsCartRows
- simulateCarrierSelectedOutput
- simulateCarriersOutput
- sortDeliveryOptionList
- toggleStatus
- update
- updateAddressId
- updateMultishopTable
- updateQty
- validateControler
- validateController
- validateField
- validateFields
- validateFieldsLang
- validateFieldsRequiredDatabase
const BOTH = 3
- Source: classes/Cart.php line 147.
const BOTH_WITHOUT_SHIPPING = 4
- Source: classes/Cart.php line 148.
const ONLY_DISCOUNTS = 2
- Source: classes/Cart.php line 146.
const ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING = 8
- Source: classes/Cart.php line 152.
const ONLY_PRODUCTS = 1
- Source: classes/Cart.php line 145.
const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7
- Source: classes/Cart.php line 151.
const ONLY_SHIPPING = 5
- Source: classes/Cart.php line 149.
const ONLY_WRAPPING = 6
- Source: classes/Cart.php line 150.
protected mixed $_attributesLists = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 94.
protected mixed $_carriers = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 92.
protected mixed $_customer = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 95.
protected mixed $_isVirtualCart = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 87.
protected mixed $_nbProducts = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 86.
protected mixed $_products = null
- Visibility: protected
- Source: classes/Cart.php line 89.
protected mixed $_taxCalculationMethod = PS_TAX_EXC
- Visibility: protected
- Source: classes/Cart.php line 91.
protected mixed $_taxes_rate = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 93.
protected mixed $_totalWeight = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 90.
public boolean $allow_seperated_package = false
- Visibility: public
- Source: classes/Cart.php line 84.
public mixed $checkedTos = false
- Visibility: public
- Source: classes/Cart.php line 77.
public string $date_add
- Visibility: public
- Source: classes/Cart.php line 66.
public string $date_upd
- Visibility: public
- Source: classes/Cart.php line 75.
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'), 'mobile_theme' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), '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 100.
public mixed $delivery_option
- Visibility: public
- Source: classes/Cart.php line 81.
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 72.
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 boolean $mobile_theme
- Visibility: public
- Source: classes/Cart.php line 63.
public mixed $pictures
- Visibility: public
- Source: classes/Cart.php line 78.
public boolean $recyclable
- Visibility: public
- Source: classes/Cart.php line 54.
public string $secure_key
- Visibility: public
- Source: classes/Cart.php line 69.
public mixed $textFields
- Visibility: public
- Source: classes/Cart.php line 79.
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'), 'id_address_delivery' => array('required' => true, 'xlink_resource' => 'addresses'), 'quantity' => array('required' => true)))))
- Visibility: protected
- Source: classes/Cart.php line 125.
protected boolean $cache_objects = true
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 153.
protected \Db $db = false
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 143.
protected array $def
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 133.
protected mixed $fieldsRequired = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 81.
protected mixed $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 66.
protected mixed $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 96.
protected mixed $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 86.
protected mixed $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 101.
protected mixed $fieldsValidate = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 91.
protected mixed $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 106.
public \boolean, $force_id = false
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 148.
protected mixed $get_shop_from_context = true
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 64.
public mixed $id_shop_list = null
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 62.
protected mixed $identifier
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 76.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 117.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 120.
protected mixed $loaded_classes = array()
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 128.
protected mixed $table
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 71.
protected mixed $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 111.
protected array $update_fields = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 138.
mixed CartCore::__construct($id, $id_lang)
- Visibility: public
- Source: classes/Cart.php line 154
- $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 1059
- $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 1241
- $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 995
- $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 185
- $autodate mixed
- $null_values mixed
mixed CartCore::addCartRule($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 769
- $id_cart_rule mixed
mixed CartCore::addDiscount($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 763
- $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 3798
- $array array
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1244
- $fields mixed
boolean CartCore::addPictureToProduct($id_product, $index, $type, $file)
Add customer's pictures
- Visibility: public
- Source: classes/Cart.php line 3194
- $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 3184
- $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 1302
- $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 3665
mixed ObjectModelCore::cacheFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1231
- $all mixed
mixed CartCore::cacheSomeAttributesLists($ipa_list, $id_lang)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 678
- $ipa_list mixed
- $id_lang mixed
mixed CartCore::carrierIsSelected($id_carrier, $id_address)
- Visibility: public
- Source: classes/Cart.php line 2257
- $id_carrier mixed
- $id_address mixed
mixed CartCore::checkDiscountValidity($obj, $discounts, $order_total, $products, $check_cart_discount)
- Visibility: public
- Source: classes/Cart.php line 2936
- $obj mixed
- $discounts mixed
- $order_total mixed
- $products mixed
- $check_cart_discount mixed
mixed CartCore::checkProductsAccess()
- Visibility: public
- Source: classes/Cart.php line 3096
mixed CartCore::checkQuantities($return_product)
- Visibility: public
- Source: classes/Cart.php line 3078
- $return_product mixed
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1258
- $all mixed
mixed CartCore::containsProduct($id_product, $id_product_attribute, $id_customization, $id_address_delivery)
- Visibility: public
- Source: classes/Cart.php line 798
- $id_product mixed
- $id_product_attribute mixed
- $id_customization mixed
- $id_address_delivery mixed
mixed CartCore::delete()
- Visibility: public
- Source: classes/Cart.php line 248
mixed CartCore::deleteAssociations()
- Visibility: public
- Source: classes/Cart.php line 3693
boolean CartCore::deleteCustomizationToProduct(integer $id_product, integer $index)
Remove a customer's customization
- Visibility: public
- Source: classes/Cart.php line 3212
- $id_product integer
- $index integer
mixed CartCore::deleteDiscount($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 1128
- $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 1433
- $force_delete mixed
mixed CartCore::deletePictureToProduct($id_product, $index)
- Visibility: public
- Source: classes/Cart.php line 3199
- $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 1158
- $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 769
- $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 2358
- $int mixed
- $delimiter mixed
mixed ObjectModelCore::disableCache()
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1719
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 1014
- $field mixed
- $class mixed
- $htmlentities mixed
- $context Context
mixed CartCore::duplicate()
- Visibility: public
- Source: classes/Cart.php line 3279
\new ObjectModelCore::duplicateObject()
Duplicate current object to database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 549
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 3475
- $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 1346
- $id mixed
mixed ObjectModelCore::enableCache()
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1714
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 1470
- $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 348
- $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, $purify)
Format a data
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 395
- $value mixed
- $type integer
- $with_quotes mixed
- $purify mixed
mixed CartCore::getAddressCollection()
Get all delivery addresses object for the current cart
- Visibility: public
- Source: classes/Cart.php line 2389
array ObjectModelCore::getAssociatedShops()
Get the list of associated id_shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1331
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 2556
- $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 3158
- $id_order integer
mixed CartCore::getCartIdByOrderId($id_order)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3166
- $id_order mixed
mixed CartCore::getCartRules($filter)
- Visibility: public
- Source: classes/Cart.php line 334
- $filter mixed
mixed CartCore::getCustomerCarts($id_customer, $with_order)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3264
- $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 1576
- $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 3829
- $return_collection boolean - Return a collection
array CartCore::getDeliveryOption($default_country, $dontAutoSelectOptions, $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 2456
- $default_country mixed
- $dontAutoSelectOptions 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 1969
- $default_country Country
- $flush boolean - Force flushing cache
mixed CartCore::getDiscounts($lite, $refresh)
- Visibility: public
- Source: classes/Cart.php line 328
- $lite mixed
- $refresh mixed
mixed CartCore::getDiscountsCustomer($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 409
- $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 1683
- $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 276
array ObjectModelCore::getFieldsLang()
Prepare multilang fields
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 313
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1223
- $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 299
float CartCore::getGiftWrappingPrice(boolean $with_taxes, $id_address)
Get the gift wrapping price
- Visibility: public
- Source: classes/Cart.php line 1606
- $with_taxes boolean - With or without taxes
- $id_address mixed
mixed CartCore::getIdCarrierFromDeliveryOption($delivery_option)
- Visibility: protected
- Source: classes/Cart.php line 2441
- $delivery_option mixed
mixed CartCore::getLastProduct()
- Visibility: public
- Source: classes/Cart.php line 425
integer CartCore::getNbOfPackages()
Get the number of packages
- Visibility: public
- Source: classes/Cart.php line 1641
mixed CartCore::getNbProducts($id)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 745
- $id mixed
mixed CartCore::getOrderShippingCost($id_carrier, $use_tax, \Country $default_country, $product_list)
- Visibility: public
- Source: classes/Cart.php line 2585
- $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 1319
- $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 1296
- $id_cart mixed
array CartCore::getOrderedCartRulesIds($filter)
Return the cart rules Ids on the cart.
- Visibility: public
- Source: classes/Cart.php line 384
- $filter mixed
mixed CartCore::getPackageIdWarehouse($package, $id_carrier)
- Visibility: public
- Source: classes/Cart.php line 1919
- $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 1669
- $flush mixed
float CartCore::getPackageShippingCost(integer $id_carrier, \booleal $use_tax, \Country $default_country, Array $product_list, $id_zone)
Return package shipping cost
- Visibility: public
- Source: classes/Cart.php line 2602
- $id_carrier integer - Carrier ID (default : current carrier)
- $use_tax booleal
- $default_country Country
- $product_list Array
- $id_zone mixed
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 3246
- $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 451
- $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 2950
- $id_lang mixed
- $refresh mixed
mixed CartCore::getTaxesAverageUsed($id_cart)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 287
- $id_cart mixed
mixed CartCore::getTotalCart($id_cart, $use_tax_display, $type)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 1285
- $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 2526
- $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 2892
- $products mixed
mixed ObjectModelCore::getTranslationsFields($fields_array)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 804
- $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 161
- $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 1164
- $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 1086
- $ws_params_attribute_name mixed
mixed CartCore::getWsCartRows()
- Visibility: public
- Source: classes/Cart.php line 3384
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 1371
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 1508
- $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 1527
- $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 2348
- $string mixed
- $delimiter mixed
boolean CartCore::isAllProductsInStock(boolean $ignore_virtual, boolean $exclusive)
- Visibility: public
- Source: classes/Cart.php line 3765
- $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 1273
- $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 3725
- $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 1488
- $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 3706
- $id_cart integer
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1388
boolean CartCore::isMultiAddressDelivery()
Does the cart use multiple address
- Visibility: public
- Source: classes/Cart.php line 2370
mixed ObjectModelCore::isMultiShopField($field)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1383
- $field mixed
mixed ObjectModelCore::isMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1378
boolean CartCore::isVirtualCart($strict)
Check if cart contains only virtual products
- Visibility: public
- Source: classes/Cart.php line 3129
- $strict mixed
mixed CartCore::lastNoneOrderedCart($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3109
- $id_customer mixed
mixed ObjectModelCore::makeTranslationFields($fields, $fields_array, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 820
- $fields mixed
- $fields_array mixed
- $id_language mixed
mixed CartCore::nbProducts()
Return cart products quantity
- Visibility: public
- Source: classes/Cart.php line 737
boolean CartCore::orderExists()
Check if order has already been placed
- Visibility: public
- Source: classes/Cart.php line 1114
mixed CartCore::removeCartRule($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 1134
- $id_cart_rule mixed
mixed CartCore::replaceZeroByShopName($echo, $tr)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 3274
- $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 446
- $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 1614
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 2415
- $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 1709
- $fields array
mixed CartCore::setNoMultishipping()
Update products cart address delivery with the address delivery of the cart
- Visibility: public
- Source: classes/Cart.php line 3593
mixed CartCore::setProductAddressDelivery($id_product, $id_product_attribute, $old_id_address_delivery, $new_id_address_delivery)
- Visibility: public
- Source: classes/Cart.php line 3411
- $id_product mixed
- $id_product_attribute mixed
- $old_id_address_delivery mixed
- $new_id_address_delivery mixed
mixed CartCore::setTaxCalculationMethod()
- Visibility: public
- Source: classes/Cart.php line 180
mixed CartCore::setWsCartRows($values)
- Visibility: public
- Source: classes/Cart.php line 3393
- $values mixed
mixed CartCore::simulateCarrierSelectedOutput($use_cache)
- Visibility: public
- Source: classes/Cart.php line 2329
- $use_cache mixed
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 2285
- $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 2236
- $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 785
mixed CartCore::update($null_values)
- Visibility: public
- Source: classes/Cart.php line 198
- $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 219
- $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 1403
- $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 830
- $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 1032
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1038
- $htmlentities mixed
boolean|string ObjectModelCore::validateField(string $field, mixed $value, integer $id_lang, $skip, $human_errors)
Validate a single field
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 931
- $field string - Field name
- $value mixed - Field value
- $id_lang integer
- $skip mixed
- $human_errors mixed
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 858
- $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 887
- $die boolean
- $error_return boolean
mixed ObjectModelCore::validateFieldsRequiredDatabase($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1200
- $htmlentities mixed