- Class name: CartCore
- Parent class: ObjectModel
- Source: classes/Cart.php line 28
- BOTH
- BOTH_WITHOUT_SHIPPING
- ONLY_DISCOUNTS
- 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_group_shop
- $id_guest
- $id_lang
- $id_shop
- $pictures
- $recyclable
- $secure_key
- $textFields
- $webserviceParameters
- $def
- $fieldsRequired
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $identifier
- $image_dir
- $image_format
- $table
- $tables
- __construct
- _addCustomization
- _deleteCustomization
- _updateCustomizationQuantity
- add
- addCartRule
- addDiscount
- addFieldsRequiredDatabase
- addPictureToProduct
- addTextFieldToProduct
- associateTo
- autosetProductAddress
- cacheSomeAttributesLists
- checkDiscountValidity
- checkQuantities
- clearCache
- containsProduct
- delete
- deleteAssociations
- deleteCustomizationToProduct
- deleteDiscount
- deleteImage
- deleteProduct
- deleteSelection
- desintifier
- displayFieldName
- duplicate
- duplicateProduct
- duplicateShops
- existsInDatabase
- formatFields
- formatValue
- getAddressCollection
- getCarrierCost
- getCartByOrderId
- getCartIdByOrderId
- getCartRules
- getCustomerCarts
- getDefinition
- getDeliveryOption
- getDeliveryOptionList
- getDiscounts
- getDiscountsCustomer
- getEntity
- getFields
- getFieldsLang
- getFieldsRequiredDatabase
- getIdCarrierFromDeliveryOption
- getLastProduct
- getNbProducts
- getOrderShippingCost
- getOrderTotal
- getOrderTotalUsingTaxCalculationMethod
- getPackageList
- getPackageShippingCost
- getProductCustomization
- getProducts
- getSummaryDetails
- getTaxesAverageUsed
- getTotalCart
- getTotalShippingCost
- getTotalWeight
- getTranslationsFields
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- getWsCartRows
- hydrate
- hydrateCollection
- intifier
- isAllProductsInStock
- isAssociatedToGroupShop
- isAssociatedToShop
- isCarrierInRange
- isCurrentlyUsed
- isGuestCartByCartId
- isLangMultishop
- isMultiAddressDelivery
- isVirtualCart
- lastNoneOrderedCart
- makeTranslationFields
- nbProducts
- orderExists
- removeCartRule
- replaceZeroByShopName
- save
- setDefinitionRetrocompatibility
- setDeliveryOption
- setNoMultishipping
- setProductAddressDelivery
- setWsCartRows
- simulateCarrierSelectedOutput
- simulateCarriersOutput
- toggleStatus
- update
- updateQty
- validateControler
- validateController
- validateField
- validateFields
- validateFieldsLang
const BOTH = 3
- Source: classes/Cart.php line 142.
const BOTH_WITHOUT_SHIPPING = 4
- Source: classes/Cart.php line 143.
const ONLY_DISCOUNTS = 2
- Source: classes/Cart.php line 141.
const ONLY_PRODUCTS = 1
- Source: classes/Cart.php line 140.
const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7
- Source: classes/Cart.php line 146.
const ONLY_SHIPPING = 5
- Source: classes/Cart.php line 144.
const ONLY_WRAPPING = 6
- Source: classes/Cart.php line 145.
protected mixed $_attributesLists = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 92.
protected mixed $_carriers = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 90.
protected mixed $_isVirtualCart = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 85.
protected mixed $_nbProducts = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 84.
protected mixed $_products = null
- Visibility: protected
- Source: classes/Cart.php line 87.
protected mixed $_taxCalculationMethod = PS_TAX_EXC
- Visibility: protected
- Source: classes/Cart.php line 89.
protected mixed $_taxes_rate = null
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 91.
protected mixed $_totalWeight = array()
- Visibility: protected
- This property is static.
- Source: classes/Cart.php line 88.
public boolean $allow_seperated_package = false
- Visibility: public
- Source: classes/Cart.php line 82.
public mixed $checkedTos = false
- Visibility: public
- Source: classes/Cart.php line 75.
public string $date_add
- Visibility: public
- Source: classes/Cart.php line 64.
public string $date_upd
- Visibility: public
- Source: classes/Cart.php line 73.
public mixed $definition = array('table' => 'cart', 'primary' => 'id_cart', 'fields' => array('id_group_shop' => 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 97.
public mixed $delivery_option
- Visibility: public
- Source: classes/Cart.php line 79.
public boolean $gift
- Visibility: public
- Source: classes/Cart.php line 58.
public string $gift_message
- Visibility: public
- Source: classes/Cart.php line 61.
public mixed $id
- Visibility: public
- Source: classes/Cart.php line 30.
public integer $id_address_delivery
- Visibility: public
- Source: classes/Cart.php line 37.
public integer $id_address_invoice
- Visibility: public
- Source: classes/Cart.php line 40.
public mixed $id_carrier
- Visibility: public
- Source: classes/Cart.php line 70.
public integer $id_currency
- Visibility: public
- Source: classes/Cart.php line 43.
public integer $id_customer
- Visibility: public
- Source: classes/Cart.php line 46.
public mixed $id_group_shop
- Visibility: public
- Source: classes/Cart.php line 32.
public integer $id_guest
- Visibility: public
- Source: classes/Cart.php line 49.
public integer $id_lang
- Visibility: public
- Source: classes/Cart.php line 52.
public mixed $id_shop
- Visibility: public
- Source: classes/Cart.php line 34.
public mixed $pictures
- Visibility: public
- Source: classes/Cart.php line 76.
public boolean $recyclable = 1
- Visibility: public
- Source: classes/Cart.php line 55.
public string $secure_key
- Visibility: public
- Source: classes/Cart.php line 67.
public mixed $textFields
- Visibility: public
- Source: classes/Cart.php line 77.
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 121.
protected array $def
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 122.
protected mixed $fieldsRequired = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 72.
protected mixed $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 57.
protected mixed $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 87.
protected mixed $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 77.
protected mixed $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 92.
protected mixed $fieldsValidate = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 82.
protected mixed $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 97.
protected mixed $identifier
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 67.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 108.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 111.
protected mixed $table
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 62.
protected mixed $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 102.
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 944
- $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 1113
- $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 880
- $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 167
- $autodate mixed
- $null_values mixed
mixed CartCore::addCartRule($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 691
- $id_cart_rule mixed
mixed CartCore::addDiscount($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 685
- $id_cart_rule mixed
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 961
- $fields mixed
boolean CartCore::addPictureToProduct($id_product, $index, $type, $file)
Add customer's pictures
- Visibility: public
- Source: classes/Cart.php line 2601
- $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 2588
- $id_product mixed
- $index mixed
- $type mixed
- $text_value mixed
boolean ObjectModelCore::associateTo(integer|array $id_shops, string $type)
This function associate an item to its context
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1009
- $id_shops integer|array
- $type string
mixed CartCore::autosetProductAddress()
Set an address to all products on the cart without address delivery
- Visibility: public
- Source: classes/Cart.php line 3012
mixed CartCore::cacheSomeAttributesLists($ipa_list, $id_lang)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 600
- $ipa_list mixed
- $id_lang mixed
mixed CartCore::checkDiscountValidity($obj, $discounts, $order_total, $products, $check_cart_discount)
- Visibility: public
- Source: classes/Cart.php line 2442
- $obj mixed
- $discounts mixed
- $order_total mixed
- $products mixed
- $check_cart_discount mixed
mixed CartCore::checkQuantities()
- Visibility: public
- Source: classes/Cart.php line 2496
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 975
- $all mixed
mixed CartCore::containsProduct($id_product, $id_product_attribute, $id_customization, $id_address_delivery)
- Visibility: public
- Source: classes/Cart.php line 703
- $id_product mixed
- $id_product_attribute mixed
- $id_customization mixed
- $id_address_delivery mixed
mixed CartCore::delete()
- Visibility: public
- Source: classes/Cart.php line 193
mixed CartCore::deleteAssociations()
- Visibility: public
- Source: classes/Cart.php line 3040
boolean CartCore::deleteCustomizationToProduct(integer $id_product, integer $index)
Remove a customer's customization
- Visibility: public
- Source: classes/Cart.php line 2613
- $id_product integer
- $index integer
mixed CartCore::deleteDiscount($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 1007
- $id_cart_rule mixed
boolean ObjectModelCore::deleteImage()
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1079
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 1030
- $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 553
- $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 1895
- $int mixed
- $delimiter mixed
mixed ObjectModelCore::displayFieldName($field, $className, $htmlentities, \Context $context)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 740
- $field mixed
- $className mixed
- $htmlentities mixed
- $context Context
mixed CartCore::duplicate()
- Visibility: public
- Source: classes/Cart.php line 2680
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 2851
- $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 1049
- $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 1113
- $id_entity integer
- $table string
array ObjectModelCore::formatFields(integer $id_lang)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 272
- $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 319
- $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 1920
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 2051
- $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 2562
- $id_order integer
mixed CartCore::getCartIdByOrderId($id_order)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2570
- $id_order mixed
mixed CartCore::getCartRules()
- Visibility: public
- Source: classes/Cart.php line 273
mixed CartCore::getCustomerCarts($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2665
- $id_customer mixed
mixed ObjectModelCore::getDefinition($class, $field)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1209
- $class mixed
- $field mixed
array CartCore::getDeliveryOption($default_country)
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 1982
- $default_country 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 1626
- $default_country Country
- $flush boolean - Force flushing cache
mixed CartCore::getDiscounts($lite, $refresh)
- Visibility: public
- Source: classes/Cart.php line 267
- $lite mixed
- $refresh mixed
mixed CartCore::getDiscountsCustomer($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 314
- $id_cart_rule mixed
mixed ObjectModelCore::getEntity($entity)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1269
- $entity mixed
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 234
array ObjectModelCore::getFieldsLang()
Prepare multilang fields
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 249
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 953
- $all mixed
mixed CartCore::getIdCarrierFromDeliveryOption($delivery_option)
- Visibility: private
- Source: classes/Cart.php line 1967
- $delivery_option mixed
mixed CartCore::getLastProduct()
- Visibility: public
- Source: classes/Cart.php line 327
mixed CartCore::getNbProducts($id)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 667
- $id mixed
float CartCore::getOrderShippingCost(integer $id_carrier, \booleal $use_tax, \Country $default_country, Array $product_list)
Return shipping total This function is dépreciate, use getTotalShippingCost or getPackageShippingCost
- Visibility: public
- Source: classes/Cart.php line 2090
- $id_carrier integer - Carrier ID (default : current carrier)
- $use_tax booleal
- $default_country Country
- $product_list Array
float CartCore::getOrderTotal($with_taxes, integer $type, $products, $id_carrier)
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
- Visibility: public
- Source: classes/Cart.php line 1189
- $with_taxes mixed
- $type integer - Total type
- $products mixed
- $id_carrier mixed
mixed CartCore::getOrderTotalUsingTaxCalculationMethod($id_cart)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 1168
- $id_cart 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 1363
- $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 2107
- $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 2647
- $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 353
- $refresh mixed
- $id_product mixed
- $id_country mixed
array CartCore::getSummaryDetails($id_lang)
Return useful informations for cart
- Visibility: public
- Source: classes/Cart.php line 2456
- $id_lang mixed
mixed CartCore::getTaxesAverageUsed($id_cart)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 232
- $id_cart mixed
mixed CartCore::getTotalCart($id_cart, $use_tax_display)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 1157
- $id_cart mixed
- $use_tax_display 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 2023
- $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 2398
- $products mixed
mixed ObjectModelCore::getTranslationsFields($fieldsArray)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 589
- $fieldsArray mixed
array ObjectModelCore::getValidationRules(string $className)
Returns object validation rules (fields validity)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 130
- $className 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 929
- $sql_join mixed
- $sql_filter mixed
- $sql_sort mixed
- $sql_limit mixed
mixed ObjectModelCore::getWebserviceParameters($wsParamsAttributeName)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 799
- $wsParamsAttributeName mixed
mixed CartCore::getWsCartRows()
- Visibility: public
- Source: classes/Cart.php line 2760
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 1148
- $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 1167
- $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 1885
- $string mixed
- $delimiter mixed
boolean CartCore::isAllProductsInStock()
- Visibility: public
- Source: classes/Cart.php line 3109
boolean ObjectModelCore::isAssociatedToGroupShop(integer $id_group_shop)
Check if current object is associated to a group shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1035
- $id_group_shop integer
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 990
- $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 3072
- $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 1131
- $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 3053
- $id_cart integer
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1069
boolean CartCore::isMultiAddressDelivery()
Does the cart use multiple address
- Visibility: public
- Source: classes/Cart.php line 1907
boolean CartCore::isVirtualCart($strict)
Check if cart contains only virtual products
- Visibility: public
- Source: classes/Cart.php line 2533
- $strict mixed
mixed CartCore::lastNoneOrderedCart($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2512
- $id_customer mixed
mixed ObjectModelCore::makeTranslationFields($fields, $fieldsArray, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 605
- $fields mixed
- $fieldsArray mixed
- $id_language mixed
mixed CartCore::nbProducts()
Return cart products quantity
- Visibility: public
- Source: classes/Cart.php line 659
boolean CartCore::orderExists()
Check if order has already been placed
- Visibility: public
- Source: classes/Cart.php line 999
mixed CartCore::removeCartRule($id_cart_rule)
- Visibility: public
- Source: classes/Cart.php line 1013
- $id_cart_rule mixed
mixed CartCore::replaceZeroByShopName($echo, $tr)
- Visibility: public
- This method is static.
- Source: classes/Cart.php line 2675
- $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 360
- $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 1224
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 1941
- $delivery_option mixed
mixed CartCore::setNoMultishipping()
Update products cart address delivery with the address delivery of the cart
- Visibility: public
- Source: classes/Cart.php line 2950
mixed CartCore::setProductAddressDelivery($id_product, $id_product_attribute, $old_id_address_delivery, $new_id_address_delivery)
- Visibility: public
- Source: classes/Cart.php line 2787
- $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 2771
- $values mixed
mixed CartCore::simulateCarrierSelectedOutput()
- Visibility: public
- Source: classes/Cart.php line 1866
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 1818
- $default_country Country
- $flush boolean - Force flushing cache
boolean ObjectModelCore::toggleStatus()
Toggle object status in database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 569
mixed CartCore::update($null_values)
- Visibility: public
- Source: classes/Cart.php line 178
- $null_values mixed
mixed CartCore::updateQty(integer $quantity, integer $id_product, integer $id_product_attribute, $id_customization, $id_address_delivery, string $operator, \Shop $shop)
Update product quantity
- Visibility: public
- Source: classes/Cart.php line 734
- $quantity integer - Quantity to add (or substract)
- $id_product integer - Product ID
- $id_product_attribute integer - Attribute ID if needed
- $id_customization mixed
- $id_address_delivery mixed
- $operator string - Indicate if quantity must be increased or decreased
- $shop Shop
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 753
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 759
- $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 704
- $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 643
- $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 669
- $die boolean
- $error_return boolean