Skip to content

Latest commit

 

History

History
3563 lines (1752 loc) · 81.6 KB

class.OrderCore.md

File metadata and controls

3563 lines (1752 loc) · 81.6 KB

Class OrderCore

Contents

Properties

Methods

Properties

$_historyCache

protected mixed $_historyCache = array()

$_taxCalculationMethod

protected mixed $_taxCalculationMethod = PS_TAX_EXC

$carrier_tax_rate

public float $carrier_tax_rate

$conversion_rate

public float $conversion_rate

$current_state

public integer $current_state

$date_add

public string $date_add

$date_upd

public string $date_upd

$definition

public mixed $definition = array('table' => 'orders', 'primary' => 'id_order', 'fields' => array('id_address_delivery' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_address_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_cart' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'current_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5'), 'payment' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), 'module' => array('type' => self::TYPE_STRING), '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'), 'total_discounts' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_discounts_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_discounts_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_paid' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), 'total_paid_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_paid_real' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), 'total_products' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), 'total_products_wt' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), 'total_shipping' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_shipping_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_shipping_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'carrier_tax_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'total_wrapping' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_wrapping_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'total_wrapping_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), 'shipping_number' => array('type' => self::TYPE_STRING, 'validate' => 'isTrackingNumber'), 'conversion_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), 'invoice_number' => array('type' => self::TYPE_INT), 'delivery_number' => array('type' => self::TYPE_INT), 'invoice_date' => array('type' => self::TYPE_DATE), 'delivery_date' => array('type' => self::TYPE_DATE), 'valid' => array('type' => self::TYPE_BOOL), 'reference' => array('type' => self::TYPE_STRING), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate')))

$delivery_date

public string $delivery_date

$delivery_number

public integer $delivery_number

$gift

public boolean $gift

$gift_message

public string $gift_message

$id_address_delivery

public integer $id_address_delivery

$id_address_invoice

public integer $id_address_invoice

$id_carrier

public integer $id_carrier

$id_cart

public integer $id_cart

$id_currency

public integer $id_currency

$id_customer

public integer $id_customer

$id_lang

public integer $id_lang

$id_shop

public mixed $id_shop

$id_shop_group

public mixed $id_shop_group

$invoice_date

public string $invoice_date

$invoice_number

public integer $invoice_number

$module

public string $module

$payment

public string $payment

$recyclable

public boolean $recyclable = 1

$reference

public string $reference

$secure_key

public string $secure_key

$shipping_number

public string $shipping_number

$total_discounts

public float $total_discounts

$total_discounts_tax_excl

public mixed $total_discounts_tax_excl

$total_discounts_tax_incl

public mixed $total_discounts_tax_incl

$total_paid

public float $total_paid

$total_paid_real

public float $total_paid_real

$total_paid_tax_excl

public float $total_paid_tax_excl

$total_paid_tax_incl

public float $total_paid_tax_incl

$total_products

public float $total_products

$total_products_wt

public float $total_products_wt

$total_shipping

public float $total_shipping

$total_shipping_tax_excl

public float $total_shipping_tax_excl

$total_shipping_tax_incl

public float $total_shipping_tax_incl

$total_wrapping

public float $total_wrapping

$total_wrapping_tax_excl

public float $total_wrapping_tax_excl

$total_wrapping_tax_incl

public float $total_wrapping_tax_incl

$valid

public boolean $valid

$webserviceParameters

protected mixed $webserviceParameters = array('objectMethods' => array('add' => 'addWs'), 'objectNodeName' => 'order', 'objectsNodeName' => 'orders', 'fields' => array('id_address_delivery' => array('xlink_resource' => 'addresses'), 'id_address_invoice' => array('xlink_resource' => 'addresses'), 'id_cart' => array('xlink_resource' => 'carts'), 'id_currency' => array('xlink_resource' => 'currencies'), 'id_lang' => array('xlink_resource' => 'languages'), 'id_customer' => array('xlink_resource' => 'customers'), 'id_carrier' => array('xlink_resource' => 'carriers'), 'current_state' => array('xlink_resource' => 'order_states'), 'module' => array('required' => true), 'invoice_number' => array(), 'invoice_date' => array(), 'delivery_number' => array(), 'delivery_date' => array(), 'valid' => array(), 'date_add' => array(), 'date_upd' => array()), 'associations' => array('order_rows' => array('resource' => 'order_row', 'setter' => false, 'virtual_entity' => true, 'fields' => array('id' => array(), 'product_id' => array('required' => true), 'product_attribute_id' => array('required' => true), 'product_quantity' => array('required' => true), 'product_name' => array('setter' => false), 'product_price' => array('setter' => false)))))

$db

protected \Db $db = false

$def

protected array $def

$fieldsRequired

protected mixed $fieldsRequired = array()

$fieldsRequiredDatabase

protected mixed $fieldsRequiredDatabase = null

$fieldsRequiredLang

protected mixed $fieldsRequiredLang = array()

$fieldsSize

protected mixed $fieldsSize = array()

$fieldsSizeLang

protected mixed $fieldsSizeLang = array()

$fieldsValidate

protected mixed $fieldsValidate = array()

$fieldsValidateLang

protected mixed $fieldsValidateLang = array()

$get_shop_from_context

protected mixed $get_shop_from_context = true

$id

public integer $id

$id_shop_list

public mixed $id_shop_list = null

$identifier

protected mixed $identifier

$image_dir

protected string $image_dir = null

$image_format

protected string $image_format = 'jpg'

$table

protected mixed $table

$tables

protected mixed $tables = array()

$update_fields

protected array $update_fields = null

Methods

__construct

mixed OrderCore::__construct($id, $id_lang)

Arguments

  • $id mixed
  • $id_lang mixed

_deleteProduct

mixed OrderCore::_deleteProduct($orderDetail, $quantity)

Arguments

  • $orderDetail mixed
  • $quantity mixed

add

mixed OrderCore::add($autodate, $null_values)

Arguments

  • $autodate mixed
  • $null_values mixed

addCartRule

boolean OrderCore::addCartRule(integer $id_cart_rule, string $name, array $values, integer $id_order_invoice)

Arguments

  • $id_cart_rule integer
  • $name string
  • $values array
  • $id_order_invoice integer

addDiscount

boolean OrderCore::addDiscount(integer $id_cart_rule, string $name, float $value)

Arguments

  • $id_cart_rule integer
  • $name string
  • $value float

addFieldsRequiredDatabase

mixed ObjectModelCore::addFieldsRequiredDatabase($fields)

Arguments

  • $fields mixed

addOrderPayment

boolean OrderCore::addOrderPayment(float $amount_paid, string $payment_method, string $payment_transaction_id, \Currency $currency, string $date, \OrderInvoice $order_invoice)

This method allows to add a payment to the current order

Arguments

  • $amount_paid float
  • $payment_method string
  • $payment_transaction_id string
  • $currency Currency
  • $date string
  • $order_invoice OrderInvoice

addWs

mixed OrderCore::addWs($autodate, $nullValues)

Arguments

  • $autodate mixed
  • $nullValues mixed

associateTo

boolean ObjectModelCore::associateTo(integer|array $id_shops)

This function associate an item to its context

Arguments

  • $id_shops integer|array

clearCache

mixed ObjectModelCore::clearCache($all)

Arguments

  • $all mixed

delete

boolean ObjectModelCore::delete()

Delete current object from database

deleteAssociations

mixed OrderCore::deleteAssociations()

deleteCustomization

mixed OrderCore::deleteCustomization($id_customization, $quantity, $orderDetail)

Arguments

  • $id_customization mixed
  • $quantity mixed
  • $orderDetail mixed

deleteImage

boolean ObjectModelCore::deleteImage($force_delete)

Delete images associated with the object

Arguments

  • $force_delete mixed

deleteProduct

mixed OrderCore::deleteProduct($order, $orderDetail, $quantity)

Arguments

  • $order mixed
  • $orderDetail mixed
  • $quantity mixed

deleteSelection

boolean ObjectModelCore::deleteSelection(array $selection)

Delete several objects from database

Arguments

  • $selection array

displayFieldName

mixed ObjectModelCore::displayFieldName($field, $class, $htmlentities, \Context $context)

Arguments

  • $field mixed
  • $class mixed
  • $htmlentities mixed
  • $context Context

duplicateObject

\new ObjectModelCore::duplicateObject()

Duplicate current object to database

duplicateShops

mixed ObjectModelCore::duplicateShops($id)

Arguments

  • $id mixed

existsInDatabase

boolean ObjectModelCore::existsInDatabase(integer $id_entity, string $table)

Specify if an ObjectModel is already in database

Arguments

  • $id_entity integer
  • $table string

formatFields

array ObjectModelCore::formatFields(integer $type, integer $id_lang)

Arguments

  • $type integer - FORMAT_COMMON or FORMAT_LANG or FORMAT_SHOP
  • $id_lang integer - If this parameter is given, only take lang fields

formatValue

mixed ObjectModelCore::formatValue(mixed $value, integer $type, $with_quotes)

Format a data

Arguments

  • $value mixed
  • $type integer
  • $with_quotes mixed

generateReference

String OrderCore::generateReference()

Gennerate a unique reference for orders generated with the same cart id This references, is usefull for check payment

getAssociatedShops

array ObjectModelCore::getAssociatedShops()

Get the list of associated id_shop

getBrother

mixed OrderCore::getBrother()

Get all other orders with the same reference

getByDelivery

mixed OrderCore::getByDelivery($id_delivery)

Arguments

  • $id_delivery mixed

getByReference

\Collection OrderCore::getByReference(string $reference)

Get a collection of orders using reference

Arguments

  • $reference string

getCartIdStatic

integer OrderCore::getCartIdStatic(integer $id_order, integer $id_customer)

Arguments

  • $id_order integer
  • $id_customer integer - optionnal

getCartProducts

array OrderCore::getCartProducts()

This function return products of the orders It's similar to Order::getProducts but witrh similar outputs of Cart::getProducts

getCartRules

mixed OrderCore::getCartRules()

getCurrentOrderState

\OrderState OrderCore::getCurrentOrderState()

getCurrentState

integer OrderCore::getCurrentState()

Get current order state (eg. Awaiting payment, Delivered.

..)

getCurrentStateFull

array OrderCore::getCurrentStateFull($id_lang)

Get current order state name (eg. Awaiting payment, Delivered.

..)

Arguments

  • $id_lang mixed

getCustomer

\Customer OrderCore::getCustomer()

Get order customer

getCustomerNbOrders

array OrderCore::getCustomerNbOrders(integer $id_customer)

Get customer orders number

Arguments

  • $id_customer integer - Customer id

getCustomerOrders

array OrderCore::getCustomerOrders(integer $id_customer, boolean $showHiddenStatus, \Context $context)

Get customer orders

Arguments

  • $id_customer integer - Customer id
  • $showHiddenStatus boolean - Display or not hidden order statuses
  • $context Context

getDefinition

array ObjectModelCore::getDefinition(string $class, string $field)

Get object definition

Arguments

  • $class string - Name of object
  • $field string - Name of field if we want the definition of one field only

getDeliverySlipsCollection

\Collection OrderCore::getDeliverySlipsCollection()

Get all delivery slips for the current order

getDiscounts

mixed OrderCore::getDiscounts($details)

Arguments

  • $details mixed

getDiscountsCustomer

mixed OrderCore::getDiscountsCustomer($id_customer, $id_cart_rule)

Arguments

  • $id_customer mixed
  • $id_cart_rule mixed

getDocuments

array OrderCore::getDocuments()

Returns the correct product taxes breakdown.

Get all documents linked to the current order

getEcoTaxTaxesBreakdown

array OrderCore::getEcoTaxTaxesBreakdown()

Returns the ecotax taxes breakdown

getFieldByLang

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.

Arguments

  • $field_name mixed
  • $id_lang null

getFields

array OrderCore::getFields()

getFieldsLang

array ObjectModelCore::getFieldsLang()

Prepare multilang fields

getFieldsRequiredDatabase

mixed ObjectModelCore::getFieldsRequiredDatabase($all)

Arguments

  • $all mixed

getFieldsShop

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.

getFirstMessage

mixed OrderCore::getFirstMessage()

getHistory

array OrderCore::getHistory(integer $id_lang, integer $id_order_state, integer $no_hidden, integer $filters)

Get order history

Arguments

  • $id_lang integer - Language id
  • $id_order_state integer - Filter a specific order state
  • $no_hidden integer - Filter no hidden status
  • $filters integer - Flag to use specific field filter

getIdOrderProduct

mixed OrderCore::getIdOrderProduct($id_customer, $id_product)

Arguments

  • $id_customer mixed
  • $id_product mixed

getInvoice

mixed OrderCore::getInvoice(integer $id_invoice)

Arguments

  • $id_invoice integer

getInvoicesCollection

\Collection OrderCore::getInvoicesCollection()

Get all invoices for the current order

getLastInvoiceNumber

mixed OrderCore::getLastInvoiceNumber()

getNextOrderId

integer OrderCore::getNextOrderId()

This method return the ID of the next order

getNotPaidInvoicesCollection

\Collection OrderCore::getNotPaidInvoicesCollection()

Get all not paid invoices for the current order

getNumberOfDays

mixed OrderCore::getNumberOfDays()

getOrderByCartId

array OrderCore::getOrderByCartId(integer $id_cart)

Get an order by its cart id

Arguments

  • $id_cart integer - Cart id

getOrderDetailList

array OrderCore::getOrderDetailList()

Get the an order detail list of the current order

getOrderIdsByStatus

array OrderCore::getOrderIdsByStatus($id_order_state)

Arguments

  • $id_order_state mixed

getOrderPaymentCollection

\Collection OrderCore::getOrderPaymentCollection()

This method allows to get all Order Payment for the current order

getOrderPayments

mixed OrderCore::getOrderPayments()

Get a collection of order payments

getOrderSlipsCollection

\Collection OrderCore::getOrderSlipsCollection()

Get all order_slips for the current order

getOrdersIdByDate

mixed OrderCore::getOrdersIdByDate($date_from, $date_to, $id_customer, $type)

Arguments

  • $date_from mixed
  • $date_to mixed
  • $id_customer mixed
  • $type mixed

getOrdersIdInvoiceByDate

array OrderCore::getOrdersIdInvoiceByDate($date_from, $date_to, $id_customer, $type)

Arguments

  • $date_from mixed
  • $date_to mixed
  • $id_customer mixed
  • $type mixed

getOrdersTotalPaid

float OrderCore::getOrdersTotalPaid()

Get the sum of total_paid_tax_incl of the orders with similar reference

getOrdersWithInformations

mixed OrderCore::getOrdersWithInformations($limit, \Context $context)

Arguments

getPreviousOrderId

integer OrderCore::getPreviousOrderId()

This method return the ID of the previous order

getProductTaxesBreakdown

array OrderCore::getProductTaxesBreakdown()

Returns the correct product taxes breakdown.

getProducts

array OrderCore::getProducts($products, $selectedProducts, $selectedQty)

Get order products

Arguments

  • $products mixed
  • $selectedProducts mixed
  • $selectedQty mixed

getProductsDetail

mixed OrderCore::getProductsDetail()

getReturn

mixed OrderCore::getReturn()

getShipping

array OrderCore::getShipping()

getShippingTaxesBreakdown

array OrderCore::getShippingTaxesBreakdown()

Returns the shipping taxes breakdown

getTaxCalculationMethod

mixed OrderCore::getTaxCalculationMethod()

getTaxesAverageUsed

mixed OrderCore::getTaxesAverageUsed()

getTotalPaid

float OrderCore::getTotalPaid(\Currency $currency)

Get total paid

Arguments

  • $currency Currency - currency used for the total paid of the current order

getTotalProductsWithTaxes

\Product OrderCore::getTotalProductsWithTaxes($products)

Get product total with taxes

Arguments

  • $products mixed

getTotalProductsWithoutTaxes

\Product OrderCore::getTotalProductsWithoutTaxes($products)

Get product total without taxes

Arguments

  • $products mixed

getTotalWeight

mixed OrderCore::getTotalWeight()

getTranslationsFields

mixed ObjectModelCore::getTranslationsFields($fields_array)

Arguments

  • $fields_array mixed

getUniqReference

mixed OrderCore::getUniqReference()

Return a unique reference like : GWJTHMZUN#2

With multishipping, order reference are the same for all orders made with the same cart in this case this method suffix the order reference by a # and the order number

getUniqReferenceOf

mixed OrderCore::getUniqReferenceOf($id_order)

Return a unique reference like : GWJTHMZUN#2

With multishipping, order reference are the same for all orders made with the same cart in this case this method suffix the order reference by a # and the order number

Arguments

  • $id_order mixed

getValidationRules

array ObjectModelCore::getValidationRules(string $class)

Returns object validation rules (fields validity)

Arguments

  • $class string - Child class name for static use (optional)

getVirtualProducts

integer OrderCore::getVirtualProducts()

Count virtual products in order

getWarehouseList

mixed OrderCore::getWarehouseList()

Get warehouse associated to the order

return array List of warehouse

getWebserviceObjectList

mixed OrderCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)

Arguments

  • $sql_join mixed
  • $sql_filter mixed
  • $sql_sort mixed
  • $sql_limit mixed

getWebserviceParameters

mixed ObjectModelCore::getWebserviceParameters($ws_params_attribute_name)

Arguments

  • $ws_params_attribute_name mixed

getWrappingTaxesBreakdown

array OrderCore::getWrappingTaxesBreakdown()

Returns the wrapping taxes breakdown

getWsOrderRows

mixed OrderCore::getWsOrderRows()

hasBeenDelivered

mixed OrderCore::hasBeenDelivered()

hasBeenPaid

mixed OrderCore::hasBeenPaid()

hasBeenShipped

mixed OrderCore::hasBeenShipped()

hasInvoice

boolean OrderCore::hasInvoice()

Has invoice return true if this order has already an invoice

hasMultishopEntries

boolean ObjectModelCore::hasMultishopEntries()

Check if there is more than one entries in associated shop table for current entity

hasProductReturned

mixed OrderCore::hasProductReturned()

Has products returned by the merchant or by the customer?

hydrate

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.)

Arguments

  • $data array
  • $id_lang integer

hydrateCollection

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

Arguments

  • $class string - Class of objects to hydrate
  • $datas array - List of data (multi-dimensional array)
  • $id_lang integer

isAssociatedAtGuest

mixed OrderCore::isAssociatedAtGuest($email)

Arguments

  • $email mixed

isAssociatedToShop

boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)

Check if current object is associated to a shop

Arguments

  • $id_shop integer

isCurrentlyUsed

boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)

This method is allow to know if a entity is currently used

Arguments

  • $table string - name of table linked to entity
  • $has_active_column boolean - true if the table has an active column

isInPreparation

mixed OrderCore::isInPreparation()

isLangMultishop

mixed ObjectModelCore::isLangMultishop()

isMultishop

mixed ObjectModelCore::isMultishop()

isPaidAndShipped

boolean OrderCore::isPaidAndShipped()

Checks if the current order state is paid and shipped

isReturnable

boolean OrderCore::isReturnable()

Can this order be returned by the client?

isVirtual

boolean OrderCore::isVirtual(boolean $strict)

Check if order contains (only) virtual products

Arguments

  • $strict boolean - If false return true if there are at least one product virtual

makeTranslationFields

mixed ObjectModelCore::makeTranslationFields($fields, $fields_array, $id_language)

Arguments

  • $fields mixed
  • $fields_array mixed
  • $id_language mixed

orderContainProduct

mixed OrderCore::orderContainProduct($id_product)

Arguments

  • $id_product mixed

save

boolean ObjectModelCore::save(boolean $null_values, boolean $autodate)

Save current object to database (add or update)

Arguments

  • $null_values boolean
  • $autodate boolean

setCurrentState

mixed OrderCore::setCurrentState(integer $id_order_state, integer $id_employee)

Set current order state

Arguments

  • $id_order_state integer
  • $id_employee integer - (/!\ not optional except for Webservice.

setDefinitionRetrocompatibility

mixed ObjectModelCore::setDefinitionRetrocompatibility()

Retrocompatibility for classes without $definition static Remove this in 1.6 !

setDelivery

mixed OrderCore::setDelivery()

setFieldsToUpdate

mixed ObjectModelCore::setFieldsToUpdate(array $fields)

Set a list of specific fields to update array(field1 => true, field2 => false, langfield1 => array(1 => true, 2 => false))

Arguments

  • $fields array

setInvoice

mixed OrderCore::setInvoice($use_existing_payment)

This method allows to generate first invoice of the current order

Arguments

  • $use_existing_payment mixed

setProductCurrentStock

mixed OrderCore::setProductCurrentStock($product)

This method allow to add stock information on a product detail

If advanced stock management is active, get physical stock of this product in the warehouse associated to the ptoduct for the current order Else get the available quantity of the product in fucntion of the shop associated to the order

Arguments

  • $product mixed

setProductCustomizedDatas

mixed OrderCore::setProductCustomizedDatas($product, $customized_datas)

Arguments

  • $product mixed
  • $customized_datas mixed

setProductImageInformations

mixed OrderCore::setProductImageInformations($product)

This method allow to add image information on a product detail

Arguments

  • $product mixed

setProductPrices

mixed OrderCore::setProductPrices($row)

Marked as deprecated but should not throw any "deprecated" message This function is used in order to keep front office backward compatibility 14 -> 1.5 (Order History)

Arguments

  • $row mixed

toggleStatus

boolean ObjectModelCore::toggleStatus()

Toggle object status in database

update

boolean ObjectModelCore::update(boolean $null_values)

Update current object to database

Arguments

  • $null_values boolean

updateMultishopTable

boolean ObjectModelCore::updateMultishopTable(string $classname, array $data, string $where, string $specific_where)

Update a table and splits the common datas and the shop datas

Arguments

  • $classname string
  • $data array
  • $where string
  • $specific_where string - Only executed for common table

updateShippingCost

boolean OrderCore::updateShippingCost(float $amount)

This method allows to change the shipping cost of the current order

Arguments

  • $amount float

useOneAfterAnotherTaxComputationMethod

boolean OrderCore::useOneAfterAnotherTaxComputationMethod()

This method returns true if at least one order details uses the One After Another tax computation method.

validateControler

mixed ObjectModelCore::validateControler($htmlentities)

TODO: refactor rename all calls to this to validateController

Arguments

  • $htmlentities mixed

validateController

mixed ObjectModelCore::validateController($htmlentities)

Arguments

  • $htmlentities mixed

validateField

boolean|string ObjectModelCore::validateField(string $field, mixed $value, integer $id_lang)

Validate a single field

Arguments

  • $field string - Field name
  • $value mixed - Field value
  • $id_lang integer

validateFields

boolean|string ObjectModelCore::validateFields(boolean $die, boolean $error_return)

Check for fields validity before database interaction

Arguments

  • $die boolean
  • $error_return boolean

validateFieldsLang

boolean|string ObjectModelCore::validateFieldsLang(boolean $die, boolean $error_return)

Check for multilingual fields validity before database interaction

Arguments

  • $die boolean
  • $error_return boolean

validateFieldsRequiredDatabase

mixed ObjectModelCore::validateFieldsRequiredDatabase($htmlentities)

Arguments

  • $htmlentities mixed