Indice de Classes y métodos de Prestashop

Una de las grandes herramientas y opciones que tenemos es el uso de Classes incluidas en nuestra tienda Prestashop.

Debemos tener un listado para saber que classes podemos usar para aprovechar este codigo ya añadido y por lo tanto no tener que escribir mas codigo del necesario.

 

class AddressCore extends ObjectModel

./classes/Address.php

  • public function __construct($id_address = null, $id_lang = null)
    /**
    Build an address *
    @param integer $id_address Existing address id in order to load object (optional) */
  • public function add($autodate = true, $null_values = false)
    /**
    @see ObjectModel::add() */
  • public function update($null_values = false)
  • public function delete()
    /**
    @see ObjectModel::delete() */
  • public static function getFieldsValidate()
    /**
    Returns fields required for an address in an array hash
    @return array hash values */
  • public function validateController($htmlentities = true)
    /**
    @see ObjectModel::validateController() */
  • public static function getZoneById($id_address)
    /**
    Get zone id for a given address *
    @param integer $id_address Address id for which we want to get zone id
    @return integer Zone id */
  • public static function isCountryActiveById($id_address)
    /**
    Check if country is active for a given address *
    @param integer $id_address Address id for which we want to get country status
    @return integer Country status */
  • public function isUsed()
    /**
    Check if address is used (at least one order placed) *
    @return integer Order count for this address */
  • public static function getCountryAndState($id_address)
  • public static function addressExists($id_address)
    /**
    Specify if an address is already in base *
    @param $id_address Address id
    @return boolean */
  • public static function getFirstCustomerAddressId($id_customer, $active = true)
  • public static function initialize($id_address = null)
    /**
    Initiliaze an address corresponding to the specified id address or if empty to the
    default shop configuration *
    @param int $id_address
    @return Address address */
  • public static function getAddressIdBySupplierId($id_supplier)
    /**
    Returns id_address for a given id_supplier
    @since 1.5.0
    @param int $id_supplier
    @return int $id_address */

class AddressFormatCore extends ObjectModel

./classes/AddressFormat.php

  • public function checkFormatFields()
    /*
    Check if the set fields are valide */
  • public function getErrorList()
    /*
    Returns the error list */
  • public static function cleanOrderedAddress(&$orderedAddressField)
    /* *
    Cleaned the layout set by the user */
  • public static function getFormattedAddressFieldsValues($address, $addressFormat, $id_lang = null)
    /*
    Returns the formatted fields with associated values *
    @address is an instancied Address object
    @addressFormat is the format
    @return double Array */
  • public static function generateAddress(Address $address, $patternRules = array(), $newLine = « \r\n », $separator = ‘ ‘, $style = array())
    /**
    Generates the full address text
    @param address is an instanciate object of Address class
    @param patternrules is a defined rules array to avoid some pattern
    @param newLine is a string containing the newLine format
    @param separator is a string containing the separator format
    @return string */
  • public static function generateAddressSmarty($params, &$smarty)
  • public static function getValidateFields($className)
    /**
    Returns selected fields required for an address in an array according to a selection hash
    @return array String values */
  • public static function getLiableClass($className)
    /*
    Return a list of liable class of the className */
  • public static function getOrderedAddressFields($id_country = 0, $split_all = false, $cleaned = false)
    /**
    Returns address format fields in array by country *
    @param Integer PS_COUNTRY.id if null using default country
    @return Array String field address format */
  • public static function getFormattedLayoutData($address)
    /* *
    Return a data array containing ordered, formatedValue and object fields */
  • public static function getAddressCountryFormat($id_country = 0)
    /**
    Returns address format by country if not defined using default country *
    @param Integer PS_COUNTRY.id
    @return String field address format */
  • public function getFormat($id_country)
    /**
    Returns address format by country *
    @param Integer PS_COUNTRY.id
    @return String field address format */

class AliasCore extends ObjectModel

./classes/Alias.php

  • public function __construct($id = null, $alias = null, $search = null, $id_lang = null)
  • public function add($autodate = true, $nullValues = false)
  • public function delete()
  • public function getAliases()
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */

class AttachmentCore extends ObjectModel

./classes/Attachment.php

  • public function delete()
  • public function deleteSelection($attachments)
  • public static function getAttachments($id_lang, $id_product, $include = true)
  • public static function deleteProductAttachments($id_product)
    /**
    deassociate $id_product from the current object *
    @static
    @param $id_product int
    @return bool */
  • public function attachProduct($id_product)
    /**
    associate $id_product to the current object.
    @param int $id_product id of the product to associate
    @return boolean true if succed */
  • public static function attachToProduct($id_product, $array)
    /**
    associate an array of id_attachment $array to the product $id_product
    and remove eventual previous association *
    @static
    @param $id_product
    @param $array
    @return bool */
  • public static function getProductAttached($id_lang, $list)

class AttributeCore extends ObjectModel

./classes/Attribute.php

  • public function __construct($id = null, $id_lang = null, $id_shop = null)
  • public function delete()
  • public function update($null_values = false)
  • public function add($autodate = true, $null_values = false)
  • public static function getAttributes($id_lang, $not_null = false)
    /**
    Get all attributes for a given language *
    @param integer $id_lang Language id
    @param boolean $notNull Get only not null fields if true
    @return array Attributes */
  • public static function checkAttributeQty($id_product_attribute, $qty, Shop $shop = null)
    /**
    Get quantity for a given attribute combination
    Check if quantity is enough to deserve customer *
    @param integer $id_product_attribute Product attribute combination id
    @param integer $qty Quantity needed
    @return boolean Quantity is available or not */
  • public static function getAttributeQty($id_product)
    /**
    @deprecated 1.5.0, use StockAvailable::getQuantityAvailableByProduct() */
  • public static function updateQtyProduct(&$arr)
    /**
    Update array with veritable quantity *
    @deprecated since 1.5.0
    @param array &$arr
    @return bool */
  • public function isColorAttribute()
    /**
    Return true if attribute is color type *
    @acces public
    @return bool */
  • public static function getAttributeMinimalQty($id_product_attribute)
    /**
    Get minimal quantity for product with attributes quantity *
    @acces public static
    @param integer $id_product_attribute
    @return mixed Minimal Quantity or false */
  • public function updatePosition($way, $position)
    /**
    Move an attribute inside its group
    @param boolean $way Up (1) or Down (0)
    @param integer $position
    @return boolean Update result */
  • public function cleanPositions($id_attribute_group, $use_last_attribute = true)
    /**
    Reorder attribute position in group $id_attribute_group.
    Call it after deleting an attribute from a group. *
    @param int $id_attribute_group
    @param bool $use_last_attribute
    @return bool $return */
  • public static function getHigherPosition($id_attribute_group)
    /**
    getHigherPosition *
    Get the higher attribute position from a group attribute *
    @param integer $id_attribute_group
    @return integer $position */

class AttributeGroupCore extends ObjectModel

./classes/AttributeGroup.php

  • public function add($autodate = true, $nullValues = false)
  • public function update($nullValues = false)
  • public static function cleanDeadCombinations()
  • public function delete()
  • public static function getAttributes($id_lang, $id_attribute_group)
    /**
    Get all attributes for a given language / group *
    @param integer $id_lang Language id
    @param boolean $id_attribute_group Attribute group id
    @return array Attributes */
  • public static function getAttributesGroups($id_lang)
    /**
    Get all attributes groups for a given language *
    @param integer $id_lang Language id
    @return array Attributes groups */
  • public function deleteSelection($selection)
    /**
    Delete several objects from database *
    return boolean Deletion result */
  • public function setWsProductOptionValues($values)
  • public function getWsProductOptionValues()
  • public function updatePosition($way, $position)
    /**
    Move a group attribute
    @param boolean $way Up (1) or Down (0)
    @param integer $position
    @return boolean Update result */
  • public static function cleanPositions()
    /**
    Reorder group attribute position
    Call it after deleting a group attribute. *
    @return bool $return */
  • public static function getHigherPosition()
    /**
    getHigherPosition *
    Get the higher group attribute position *
    @return integer $position */

class Autoload

./classes/Autoload.php

  • public static function getInstance()
    /**
    Get instance of autoload (singleton) *
    @return Autoload */
  • public function load($classname)
    /**
    Retrieve informations about a class in classes index and load it *
    @param string $classname */
  • public function generateIndex()
    /**
    Generate classes index */
  • public function getClassPath($classname)

class BackupCore

./classes/Backup.php

  • public function __construct($filename = null)
    /**
    Creates a new backup object *
    @param string $filename Filename of the backup file */
  • public function setCustomBackupPath($dir)
    /**
    you can set a different path with that function
    @TODO include the prefix name
    @param string $dir
    @return boolean bo */
  • public function getRealBackupPath($filename = null)
    /**
    get the path to use for backup (customBackupDir if specified, or default)
    @param string $filename filename to use
    @return string full path */
  • public static function getBackupPath($filename)
    /**
    Get the full path of the backup file *
    @param string $filename prefix of the backup file (datetime will be the second part)
    @return The full path of the backup file, or false if the backup file does not exists */
  • public function getBackupURL()
    /**
    Get the URL used to retreive this backup file *
    @return The url used to request the backup file */
  • public function delete()
    /**
    Delete the current backup file *
    @return boolean Deletion result, true on success */
  • public function deleteSelection($list)
    /**
    Deletes a range of backup files *
    @return boolean True on success */
  • public function add()
    /**
    Creates a new backup file *
    @return boolean true on successful backup */

class Crypt_Blowfish

./classes/Blowfish.php

class CarrierCore extends ObjectModel

./classes/Carrier.php

  • public function __construct($id = null, $id_lang = null)
  • public function add($autodate = true, $null_values = false)
  • public function delete()
    /**
    @since 1.5.0
    @see ObjectModel::delete() */
  • public function setConfiguration($id_old)
    /**
    Change carrier id in delivery prices when updating a carrier *
    @param integer $id_old Old id carrier */
  • public function getDeliveryPriceByWeight($total_weight, $id_zone)
    /**
    Get delivery prices for a given order *
    @param floatval $totalWeight Order total weight
    @param integer $id_zone Zone id (for customer delivery address)
    @return float Delivery price */
  • public static function checkDeliveryPriceByWeight($id_carrier, $total_weight, $id_zone)
  • public function getMaxDeliveryPriceByWeight($id_zone)
  • public function getDeliveryPriceByPrice($order_total, $id_zone, $id_currency = null)
    /**
    Get delivery prices for a given order *
    @param floatval $orderTotal Order total to pay
    @param integer $id_zone Zone id (for customer delivery address)
    @return float Delivery price */
  • public static function checkDeliveryPriceByPrice($id_carrier, $order_total, $id_zone, $id_currency = null)
    /**
    Check delivery prices for a given order *
    @param id_carrier
    @param floatval $orderTotal Order total to pay
    @param integer $id_zone Zone id (for customer delivery address)
    @param integer $id_currency
    @return float Delivery price */
  • public function getMaxDeliveryPriceByPrice($id_zone)
  • public static function getDeliveryPriceByRanges($range_table, $id_carrier)
    /**
    Get delivery prices for a given shipping method (price/weight) *
    @param string $rangeTable Table name (price or weight)
    @return array Delivery prices */
  • public static function getCarriers($id_lang, $active = false, $delete = false, $id_zone = false, $ids_group = null, $modules_filters = self::PS_CARRIERS_ONLY)
    /**
    Get all carriers in a given language *
    @param integer $id_lang Language id
    @param $modules_filters, possible values: PS_CARRIERS_ONLY CARRIERS_MODULE CARRIERS_MODULE_NEED_RANGE PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE ALL_CARRIERS
    @param boolean $active Returns only active carriers when true
    @return array Carriers */
  • public static function getDeliveredCountries($id_lang, $active_countries = false, $active_carriers = false, $contain_states = null)
  • public static function getDefaultCarrierSelection($carriers, $default_carrier = 0)
    /**
    Return the default carrier to use *
    @param array $carriers
    @param array $defaultCarrier the last carrier selected
    @return number the id of the default carrier */
  • public static function getCarriersForOrder($id_zone, $groups = null, $cart = null)
    /** *
    @param int $id_zone
    @param Array $groups group of the customer
    @return Array */
  • public static function checkCarrierZone($id_carrier, $id_zone)
  • public function getZones()
    /**
    Get all zones *
    @return array Zones */
  • public function getZone($id_zone)
    /**
    Get a specific zones *
    @return array Zone */
  • public function addZone($id_zone)
    /**
    Add zone */
  • public function deleteZone($id_zone)
    /**
    Delete zone */
  • public function getGroups()
    /**
    Gets a specific group *
    @since 1.5.0
    @return array Group */
  • public function deleteDeliveryPrice($range_table)
    /**
    Clean delivery prices (weight/price) *
    @param string $rangeTable Table name to clean (weight or price according to shipping method)
    @return boolean Deletion result */
  • public function addDeliveryPrice($price_list)
    /**
    Add new delivery prices *
    @param array $priceList Prices list in multiple arrays (changed to array since 1.5.0)
    @return boolean Insertion result */
  • public function copyCarrierData($old_id)
    /**
    Copy old carrier informations when update carrier *
    @param integer $oldId Old id carrier (copy from that id) */
  • public static function getCarrierByReference($id_reference)
    /**
    Get carrier using the reference id */
  • public function isUsed()
    /**
    Check if carrier is used (at least one order placed) *
    @return integer Order count for this carrier */
  • public function getShippingMethod()
  • public function getRangeTable()
  • public function getRangeObject()
  • public function getRangeSuffix($currency = null)
  • public function getIdTaxRulesGroup(Context $context = null)
  • public static function getIdTaxRulesGroupByIdCarrier($id_carrier, Context $context = null)
  • public function deleteTaxRulesGroup(array $shops = null)
  • public function setTaxRulesGroup($id_tax_rules_group, $all_shops = false)
  • public function getTaxesRate(Address $address)
    /**
    Returns the taxes rate associated to the carrier *
    @since 1.5
    @param Address $address
    @return */
  • public function getTaxCalculator(Address $address)
    /**
    Returns the taxes calculator associated to the carrier *
    @since 1.5
    @param Address $address
    @return */
  • public static function sqlDeliveryRangeShop($range_table, $alias = ‘d’)
    /**
    This tricky method generates a sql clause to check if ranged data are overloaded by multishop *
    @since 1.5.0
    @param string $rangeTable
    @return string */
  • public function updatePosition($way, $position)
    /**
    Moves a carrier *
    @since 1.5.0
    @param boolean $way Up (1) or Down (0)
    @param integer $position
    @return boolean Update result */
  • public static function cleanPositions()
    /**
    Reorders carrier positions.
    Called after deleting a carrier. *
    @since 1.5.0
    @return bool $return */
  • public static function getHigherPosition()
    /**
    Gets the highest carrier position *
    @since 1.5.0
    @return int $position */
  • public static function getAvailableCarrierList(Product $product, $id_warehouse, $id_address_delivery = null, $id_shop = null, $cart = null)
    /**
    For a given {product, warehouse}, gets the carrier available *
    @since 1.5.0
    @param Product $product The id of the product, or an array with at least the package size and weight
    @return array */
  • public static function assignGroupToAllCarriers($id_group_list, $exception = null)
    /**
    Assign one (ore more) group to all carriers
    @since 1.5.0
    @param int|array $id_group_list group id or list of group ids
    @param array $exception list of id carriers to ignore */

class CartCore extends ObjectModel

./classes/Cart.php

  • public function __construct($id = null, $id_lang = null)
  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
  • public function updateAddressId($id_address, $id_address_new)
    /**
    Update the address id of the cart
    @param int $id_address Current address id to change
    @param int $id_address_new New address id */
  • public function delete()
  • public static function getTaxesAverageUsed($id_cart)
  • public function getDiscounts($lite = false, $refresh = false)
    /**
    @deprecated 1.5.0, use Cart->getCartRules() */
  • public function getCartRules($filter = CartRule::FILTER_ACTION_ALL)
  • public function getDiscountsCustomer($id_cart_rule)
  • public function getLastProduct()
  • public function getProducts($refresh = false, $id_product = false, $id_country = null)
    /**
    Return cart products *
    @result array Products */
  • public static function cacheSomeAttributesLists($ipa_list, $id_lang)
  • public function nbProducts()
    /**
    Return cart products quantity *
    @result integer Products quantity */
  • public static function getNbProducts($id)
  • public function addDiscount($id_cart_rule)
    /**
    @deprecated 1.5.0, use Cart->addCartRule() */
  • public function addCartRule($id_cart_rule)
  • public function containsProduct($id_product, $id_product_attribute = 0, $id_customization = false, $id_address_delivery = 0)
  • public function updateQty($quantity, $id_product, $id_product_attribute = null, $id_customization = false,
    /**
    Update product quantity *
    @param integer $quantity Quantity to add (or substract)
    @param integer $id_product Product ID
    @param integer $id_product_attribute Attribute ID if needed
    @param string $operator Indicate if quantity must be increased or decreased */
  • public function _addCustomization($id_product, $id_product_attribute, $index, $type, $field, $quantity)
    /**
    Add customization item to database *
    @param int $id_product
    @param int $id_product_attribute
    @param int $index
    @param int $type
    @param string $field
    @param int $quantity
    @return boolean success */
  • public function orderExists()
    /**
    Check if order has already been placed *
    @return boolean result */
  • public function deleteDiscount($id_cart_rule)
    /**
    @deprecated 1.5.0, use Cart->removeCartRule() */
  • public function removeCartRule($id_cart_rule)
  • public function deleteProduct($id_product, $id_product_attribute = null, $id_customization = null, $id_address_delivery = 0)
    /**
    Delete a product from the cart *
    @param integer $id_product Product ID
    @param integer $id_product_attribute Attribute ID if needed
    @param integer $id_customization Customization id
    @return boolean result */
  • public static function getTotalCart($id_cart, $use_tax_display = false, $type = CART::BOTH)
  • public static function getOrderTotalUsingTaxCalculationMethod($id_cart)
  • public function getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null, $use_cache = true)
    /**
    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 *
    @param boolean $withTaxes With or without taxes
    @param integer $type Total type
    @param boolean $use_cache Allow using cache of the method CartRule::getContextualValue
    @return float Order total */
  • public function getGiftWrappingPrice($with_taxes = true, $id_address = null)
    /**
    Get the gift wrapping price
    @param boolean $with_taxes With or without taxes
    @return gift wrapping price */
  • public function getNbOfPackages()
    /**
    Get the number of packages
    @return int number of packages */
  • public function getPackageList($flush = false)
    /**
    Get products grouped by package and by addresses to be sent individualy (one package = one shipping cost). *
    @return array array(
    0 => array( // First address
    0 => array( // First package
    ‘product_list’ => array(…),
    ‘carrier_list’ => array(…),
    ‘id_warehouse’ => array(…),
    ),
    ),
    );
    @todo Add avaibility check */
  • public function getPackageIdWarehouse($package, $id_carrier = null)
  • public function getDeliveryOptionList(Country $default_country = null, $flush = false)
    /**
    Get all deliveries options available for the current cart
    @param Country $default_country
    @param boolean $flush Force flushing cache *
    @return array array(
    0 => array( // First address
    ’12,’ => array( // First delivery option available for this address
    carrier_list => array(
    12 => array( // First carrier for this option
    ‘instance’ => Carrier Object,
    ‘logo’ => ,
    ‘price_with_tax’ => 12.4,
    ‘price_without_tax’ => 12.4,
    ‘package_list’ => array(
    1,
    3,
    ),
    ),
    ),
    is_best_grade => true, // Does this option have the biggest grade (quick shipping) for this shipping address
    is_best_price => true, // Does this option have the lower price for this shipping address
    unique_carrier => true, // Does this option use a unique carrier
    total_price_with_tax => 12.5,
    total_price_without_tax => 12.5,
    position => 5, // Average of the carrier position
    ),
    ),
    );
    If there are no carriers available for an address, return an empty array */
  • public static function sortDeliveryOptionList($option1, $option2)
    /**Sort list of option delivery by parameters define in the BO
    @param $option1
    @param $option2
    @return int -1 if $option 1 must be placed before and 1 if the $option1 must be placed after the $option2 */
  • public function carrierIsSelected($id_carrier, $id_address)
  • public function simulateCarriersOutput(Country $default_country = null, $flush = false)
    /**
    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 *
    @since 1.5.0 *
    @param Country $default_country
    @param boolean $flush Force flushing cache * */
  • public function simulateCarrierSelectedOutput()
  • public static function 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 *
    @return int */
  • public static function desintifier($int, $delimiter = ‘,’)
    /**
    Translate a int option_delivery identifier (3240002000) in a string (‘24,3,’) */
  • public function isMultiAddressDelivery()
    /**
    Does the cart use multiple address
    @return boolean */
  • public function getAddressCollection()
    /**
    Get all delivery addresses object for the current cart */
  • public function setDeliveryOption($delivery_option = null)
    /**
    Set the delivery option and id_carrier, if there is only one carrier */
  • public function getDeliveryOption($default_country = null, $dontAutoSelectOptions = false, $use_cache = true)
    /**
    Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
    @return array delivery option */
  • public function getTotalShippingCost($delivery_option = null, $use_tax = true, Country $default_country = null)
    /**
    Return shipping total for the cart *
    @param array $delivery_option Array of the delivery option for each address
    @param booleal $use_tax
    @param Country $default_country
    @return float Shipping total */
  • public function getCarrierCost($id_carrier, $useTax = true, Country $default_country = null, $delivery_option = null)
    /**
    Return shipping total of a specific carriers for the cart *
    @param int $id_carrier
    @param array $delivery_option Array of the delivery option for each address
    @param booleal $useTax
    @param Country $default_country
    @return float Shipping total */
  • public function getOrderShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null)
    /**
    @deprecated 1.5.0, use Cart->getPackageShippingCost() */
  • public function getPackageShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null, $id_zone = null)
    /**
    Return package shipping cost *
    @param integer $id_carrier Carrier ID (default : current carrier)
    @param booleal $use_tax
    @param Country $default_country
    @param Array $product_list
    @param array $product_list List of product concerned by the shipping. If null, all the product of the cart are used to calculate the shipping cost *
    @return float Shipping total */
  • public function getTotalWeight($products = null)
    /**
    Return cart weight
    @return float Cart weight */
  • public function checkDiscountValidity($obj, $discounts, $order_total, $products, $check_cart_discount = false)
    /**
    @deprecated 1.5.0 */
  • public function getSummaryDetails($id_lang = null, $refresh = false)
    /**
    Return useful informations for cart *
    @return array Cart details */
  • public function checkQuantities()
  • public static function lastNoneOrderedCart($id_customer)
  • public function isVirtualCart($strict = false)
    /**
    Check if cart contains only virtual products *
    @return boolean true if is a virtual cart or false */
  • public static function getCartByOrderId($id_order)
    /**
    Build cart object from provided id_order *
    @param int $id_order
    @return Cart|bool */
  • public static function getCartIdByOrderId($id_order)
  • public function addTextFieldToProduct($id_product, $index, $type, $text_value)
    /**
    Add customer’s text *
    @params int $id_product
    @params int $index
    @params int $type
    @params string $textValue *
    @return bool Always true */
  • public function addPictureToProduct($id_product, $index, $type, $file)
    /**
    Add customer’s pictures *
    @return bool Always true */
  • public function deletePictureToProduct($id_product, $index)
  • public function deleteCustomizationToProduct($id_product, $index)
    /**
    Remove a customer’s customization *
    @param int $id_product
    @param int $index
    @return bool */
  • public function getProductCustomization($id_product, $type = null, $not_in_cart = false)
    /**
    Return custom pictures in this cart for a specified product *
    @param int $id_product
    @param int $type only return customization of this type
    @param bool $not_in_cart only return customizations that are not in cart already
    @return array result rows */
  • public static function getCustomerCarts($id_customer, $with_order = true)
  • public static function replaceZeroByShopName($echo, $tr)
  • public function duplicate()
  • public function getWsCartRows()
  • public function setWsCartRows($values)
  • public function setProductAddressDelivery($id_product, $id_product_attribute, $old_id_address_delivery, $new_id_address_delivery)
  • public function duplicateProduct($id_product, $id_product_attribute, $id_address_delivery,
  • public function setNoMultishipping()
    /**
    Update products cart address delivery with the address delivery of the cart */
  • public function autosetProductAddress()
    /**
    Set an address to all products on the cart without address delivery */
  • public function deleteAssociations()
  • public static function isGuestCartByCartId($id_cart)
    /**
    isGuestCartByCartId *
    @param int $id_cart
    @return bool true if cart has been made by a guest customer */
  • public function isCarrierInRange($id_carrier, $id_zone)
    /**
    isCarrierInRange *
    Check if the specified carrier is in range *
    @id_carrier int
    @id_zone int */
  • public function isAllProductsInStock($ignore_virtual = false, $exclusive = false)
    /**
    @param bool $ignore_virtual Ignore virtual product
    @param bool $exclusive If true, the validation is exclusive : it must be present product in stock and out of stock
    @since 1.5.0
    @return bool false is some products from the cart are out of stock */
  • public static function addExtraCarriers(&$array)
    /**Execute hook displayCarrierList (extraCarrier) and merge theme to the $array
    @param array $array */
  • public function getDeliveryAddressesWithoutCarriers($return_collection = false)
    /**
    Get all the ids of the delivery addresses without carriers
    @param bool $return_collection Return a collection@return array Array of address id or of address object */

class CartRuleCore extends ObjectModel

./classes/CartRule.php

  • public function add($autodate = true, $null_values = false)
    /**
    @see ObjectModel::add() */
  • public function update($null_values = false)
  • public function delete()
    /**
    @see ObjectModel::delete() */
  • public static function copyConditions($id_cart_rule_source, $id_cart_rule_destination)
    /**
    Copy conditions from one cart rule to an other *
    @static
    @param int $id_cart_rule_source
    @param int $id_cart_rule_destination */
  • public static function getIdByCode($code)
    /**
    Retrieves the id associated to the given code *
    @static
    @param string $code
    @return int|bool */
  • public static function getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null)
    /**
    @static
    @param $id_lang
    @param $id_customer
    @param bool $active
    @param bool $includeGeneric
    @param bool $inStock
    @param Cart|null $cart
    @return array */
  • public function usedByCustomer($id_customer)
    /**
    @param $id_customer
    @return bool */
  • public static function cartRuleExists($name)
    /**
    @static
    @param $name
    @return bool */
  • public static function deleteByIdCustomer($id_customer)
    /**
    @static
    @param $id_customer
    @return bool */
  • public function getProductRuleGroups()
    /**
    @return array */
  • public function getProductRules($id_product_rule_group)
    /**
    @param $id_product_rule_group
    @return array (‘type’ => ? , ‘values’ => ?) */
  • public function checkValidity(Context $context, $alreadyInCart = false, $display_error = true)
    /**
    Check if this cart rule can be applied *
    @param Context $context
    @param bool $alreadyInCart Check if the voucher is already on the cart
    @param bool $display_error Display error
    @return bool|mixed|string */
  • public function getContextualValue($use_tax, Context $context = null, $filter = null, $package = null, $use_cache = true)
    /**
    The reduction value is POSITIVE *
    @param bool $use_tax
    @param Context $context
    @param boolean $use_cache Allow using cache to avoid multiple free gift using multishipping
    @return float|int|string */
  • public static function cleanCache()
    /**
    Make sure caches are empty
    Must be called before calling multiple time getContextualValue() */
  • public function getAssociatedRestrictions($type, $active_only, $i18n)
  • public static function autoRemoveFromCart($context = null)
  • public static function autoAddToCart(Context $context = null)
    /**
    @static
    @param Context|null $context
    @return mixed */
  • public static function isFeatureActive()
    /**
    @static
    @return bool */
  • public static function cleanProductRuleIntegrity($type, $list)
    /
    When an entity associated to a product rule (product, category, attribute, supplier, manufacturer…) is deleted, the product rules must be updated */
  • public static function getCartsRuleByCode($name, $id_lang)
    /**
    @static
    @param $name
    @param $id_lang
    @return array */

class CategoryCore extends ObjectModel

./classes/Category.php

  • public function __construct($id_category = null, $id_lang = null, $id_shop = null)
  • public static function getDescriptionClean($description)
    /**
    Allows to display the category description without HTML tags and slashes *
    @return string */
  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
    /**
    update category positions in parent *
    @param mixed $null_values
    @return void */
  • public function toggleStatus()
    /**
    @see ObjectModel::toggleStatus() */
  • public function recurseLiteCategTree($max_depth = 3, $current_depth = 0, $id_lang = null, $excluded_ids_array = null)
    /**
    Recursive scan of subcategories *
    @param integer $max_depth Maximum depth of the tree (i.e. 2 => 3 levels depth)
    @param integer $current_depth specify the current depth in the tree (don’t use it, only for rucursivity!)
    @param integer $id_lang Specify the id of the language used
    @param array $excluded_ids_array specify a list of ids to exclude of results *
    @return array Subcategories lite tree */
  • public static function recurseCategory($categories, $current, $id_category = 1, $id_selected = 1)
  • public function deleteLite()
  • public function delete()
  • public function deleteSelection($categories)
    /**
    Delete several categories from database *
    return boolean Deletion result */
  • public function calcLevelDepth()
    /**
    Get the depth level for the category *
    @return integer Depth level */
  • public static function regenerateEntireNtree()
    /**
    Re-calculate the values of all branches of the nested tree */
  • public function recalculateLevelDepth($id_category)
    /**
    Updates level_depth for all children of the given id_category *
    @param integer $id_category parent category */
  • public static function getCategories($id_lang = false, $active = true, $order = true, $sql_filter = », $sql_sort = », $sql_limit = »)
    /**
    Return available categories *
    @param integer $id_lang Language ID
    @param boolean $active return only active categories
    @return array Categories */
  • public static function getSimpleCategories($id_lang)
  • public function getShopID()
  • public function getSubCategories($id_lang, $active = true)
    /**
    Return current category childs *
    @param integer $id_lang Language ID
    @param boolean $active return only active categories
    @return array Categories */
  • public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null)
    /**
    Return current category products *
    @param integer $id_lang Language ID
    @param integer $p Page number
    @param integer $n Number of products per page
    @param boolean $get_total return the number of results instead of the results themself
    @param boolean $active return only active products
    @param boolean $random active a random filter for returned products
    @param int $random_number_products number of products to return if random is activated
    @param boolean $check_access set to false to return all products (even if customer hasn’t access)
    @return mixed Products or number of products */
  • public static function getHomeCategories($id_lang, $active = true)
    /**
    Return main categories *
    @param integer $id_lang Language ID
    @param boolean $active return only active categories
    @return array categories */
  • public static function getRootCategory($id_lang = null, Shop $shop = null)
  • public static function getChildren($id_parent, $id_lang, $active = true, $id_shop = false)
    /** *
    @param int $id_parent
    @param int $id_lang
    @param bool $active
    @return array */
  • public function getAllChildren($id_lang = null)
    /**
    Return an array of all children of the current category *
    @param int $id_lang
    @return Collection */
  • public static function getChildrenWithNbSelectedSubCat($id_parent, $selected_cat, $id_lang, Shop $shop = null, $use_shop_context = true)
    /**
    This method allow to return children categories with the number of sub children selected for a product *
    @param int $id_parent
    @param int $id_product
    @param int $id_lang
    @return array */
  • public static function duplicateProductCategories($id_old, $id_new)
    /**
    Copy products from a category to another *
    @param integer $id_old Source category ID
    @param boolean $id_new Destination category ID
    @return boolean Duplication result */
  • public static function checkBeforeMove($id_category, $id_parent)
    /**
    Check if category can be moved in another one.
    The category cannot be moved in a child category. *
    @param integer $id_category current category
    @param integer $id_parent Parent candidate
    @return boolean Parent validity */
  • public static function getLinkRewrite($id_category, $id_lang)
  • public function getLink(Link $link = null)
  • public function getName($id_lang = null)
  • public static function searchByName($id_lang, $query, $unrestricted = false)
    /**
    Light back office search for categories *
    @param integer $id_lang Language ID
    @param string $query Searched string
    @param boolean $unrestricted allows search without lang and includes first category and exact match
    @return array Corresponding categories */
  • public static function searchByNameAndParentCategoryId($id_lang, $category_name, $id_parent_category)
    /**
    Retrieve category by name and parent category id *
    @param integer $id_lang Language ID
    @param string $category_name Searched category name
    @param integer $id_parent_category parent category ID
    @return array Corresponding category */
  • public function getParentsCategories($id_lang = null)
    /**
    Get Each parent category of this category until the root category *
    @param integer $id_lang Language ID
    @return array Corresponding categories */
  • public static function categoryExists($id_category)
    /**
    Specify if a category already in base *
    @param $id_category Category id
    @return boolean */
  • public function cleanGroups()
  • public function cleanAssoProducts()
  • public function addGroups($groups)
  • public function getGroups()
  • public function addGroupsIfNoExist($id_group)
  • public function checkAccess($id_customer)
    /**
    checkAccess return true if id_customer is in a group allowed to see this category. *
    @param mixed $id_customer
    @access public
    @return boolean true if access allowed for customer $id_customer */
  • public function updateGroup($list)
    /**
    Update customer groups associated to the object *
    @param array $list groups */
  • public static function setNewGroupForHome($id_group)
  • public function updatePosition($way, $position)
  • public static function cleanPositions($id_category_parent = null)
    /**
    cleanPositions keep order of category in $id_category_parent,
    but remove duplicate position. Should not be used if positions
    are clean at the beginning ! *
    @param mixed $id_category_parent
    @return boolean true if succeed */
  • public static function getLastPosition($id_category_parent, $id_shop)
    /*
    this function return the number of category + 1 having $id_category_parent as parent. *
    @todo rename that function to make it understandable (getNewLastPosition for example)
    @param int $id_category_parent the parent category
    @param int $id_shop
    @return int */
  • public static function getUrlRewriteInformations($id_category)
  • public static function getInterval($id)
    /**
    Return nleft and nright fields for a given category *
    @since 1.5.0
    @param int $id
    @return array */
  • public function inShop(Shop $shop = null)
    /**
    Check if current category is a child of shop root category *
    @since 1.5.0
    @param Shop $shop
    @return bool */
  • public static function inShopStatic($id_category, Shop $shop = null)
  • public function getChildrenWs()
  • public function getProductsWs()
  • public function getDuplicatePosition()
    /**
    Search for another category with the same parent and the same position *
    @return array first category found */
  • public function getWsNbProductsRecursive()
  • public static function getCategoryInformations($ids_category, $id_lang = null)
    /** *
    @param Array $ids_category
    @param int $id_lang
    @return Array */
  • public function isParentCategoryAvailable($id_shop)
    /**
    @param $id_shop
    @return bool */
  • public function addShop($id_shop)
    /**
    Add association between shop and cateogries
    @param int $id_shop
    @return bool */
  • public static function getRootCategories($id_lang = null, $active = true)
  • public static function getCategoriesWithoutParent()
  • public function isRootCategoryForAShop()
  • public static function getTopCategory($id_lang = null)
    /**
    @static
    @param null $id_lang
    @return Category */
  • public function addPosition($position, $id_shop = null)
  • public static function getShopsByCategory($id_category)
  • public static function updateFromShop($categories, $id_shop)
    /**
    Update categories for a shop *
    @param string $categories Categories list to associate a shop
    @param string $id_shop Categories list to associate a shop
    @return array Update/insertion result */
  • public function deleteFromShop($id_shop)
    /**
    Delete category from shop $id_shop
    @param int $id_shop
    @return bool */
  • public static function deleteCategoriesFromShop($id_shop)
    /**
    Delete every categories
    @return bool */
  • public static function addToShop(array $categories, $id_shop)
    /**
    Add some categories to a shop
    @param array $categories
    @return bool */
  • public function existsInShop($id_shop)

class Curve

./classes/Chart.php

  • /** @prototype void public static function init(void) */
  • public static function init()
    /*
    @prototype void public static function init(void) */
  • /** @prototype void public function __construct() */
  • public function __construct()
    /*
    @prototype void public function __construct() */
  • /** @prototype void public function setSize(int $width, int $height) */
  • public function setSize($width, $height)
    /*
    @prototype void public function setSize(int $width, int $height) */
  • /** @prototype void public function setTimeMode($from, $to, $granularity) */
  • public function setTimeMode($from, $to, $granularity)
    /*
    @prototype void public function setTimeMode($from, $to, $granularity) */
  • public function getCurve($i)
  • /** @prototype void public function display() */
  • public function display()
    /*
    @prototype void public function display() */
  • public function fetch()
  • /** @prototype void public function setValues($values) */
  • public function setValues($values)
    /*
    @prototype void public function setValues($values) */
  • public function getValues($time_mode = false)
  • /** @prototype void public function setPoint(float $x, float $y) */
  • public function setPoint($x, $y)
    /*
    @prototype void public function setPoint(float $x, float $y) */
  • public function setLabel($label)
  • public function setType($type)
  • public function getPoint($x)

class CMSCore extends ObjectModel

./classes/CMS.php

  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
  • public function delete()
  • public static function getLinks($id_lang, $selection = null, $active = true, Link $link = null)
  • public static function listCms($id_lang = null, $id_block = false, $active = true)
  • public function updatePosition($way, $position)
  • public static function cleanPositions($id_category)
  • public static function getLastPosition($id_category)
  • public static function getCMSPages($id_lang = null, $id_cms_category = null, $active = true)
  • public static function getUrlRewriteInformations($id_cms)

class CMSCategoryCore extends ObjectModel

./classes/CMSCategory.php

  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
  • public function recurseLiteCategTree($max_depth = 3, $currentDepth = 0, $id_lang = null, $excluded_ids_array = null, Link $link = null)
    /**
    Recursive scan of subcategories *
    @param integer $max_depth Maximum depth of the tree (i.e. 2 => 3 levels depth)
    @param integer $currentDepth specify the current depth in the tree (don’t use it, only for rucursivity!)
    @param array $excluded_ids_array specify a list of ids to exclude of results
    @param integer $idLang Specify the id of the language used
    @return array Subcategories lite tree */
  • public static function getRecurseCategory($id_lang = null, $current = 1, $active = 1, $links = 0, Link $link = null)
  • public static function recurseCMSCategory($categories, $current, $id_cms_category = 1, $id_selected = 1, $is_html = 0)
  • public function delete()
  • public function deleteSelection($categories)
    /**
    Delete several categories from database *
    return boolean Deletion result */
  • public function calcLevelDepth()
    /**
    Get the number of parent categories *
    @return integer Level depth */
  • public static function getCategories($id_lang, $active = true, $order = true)
    /**
    Return available categories *
    @param integer $id_lang Language ID
    @param boolean $active return only active categories
    @return array Categories */
  • public static function getSimpleCategories($id_lang)
  • public function getSubCategories($id_lang, $active = true)
    /**
    Return current CMSCategory childs *
    @param integer $id_lang Language ID
    @param boolean $active return only active categories
    @return array Categories */
  • public static function hideCMSCategoryPosition($name)
    /**
    Hide CMSCategory prefix used for position *
    @param string $name CMSCategory name
    @return string Name without position */
  • public static function getHomeCategories($id_lang, $active = true)
    /**
    Return main categories *
    @param integer $id_lang Language ID
    @param boolean $active return only active categories
    @return array categories */
  • public static function getChildren($id_parent, $id_lang, $active = true)
  • public static function checkBeforeMove($id_cms_category, $id_parent)
    /**
    Check if CMSCategory can be moved in another one *
    @param integer $id_parent Parent candidate
    @return boolean Parent validity */
  • public static function getLinkRewrite($id_cms_category, $id_lang)
  • public function getLink(Link $link = null)
  • public function getName($id_lang = null)
  • public static function searchByName($id_lang, $query, $unrestricted = false)
    /**
    Light back office search for categories *
    @param integer $id_lang Language ID
    @param string $query Searched string
    @param boolean $unrestricted allows search without lang and includes first CMSCategory and exact match
    @return array Corresponding categories */
  • public static function searchByNameAndParentCMSCategoryId($id_lang, $CMSCategory_name, $id_parent_CMSCategory)
    /**
    Retrieve CMSCategory by name and parent CMSCategory id *
    @param integer $id_lang Language ID
    @param string $CMSCategory_name Searched CMSCategory name
    @param integer $id_parent_CMSCategory parent CMSCategory ID
    @return array Corresponding CMSCategory * @deprecated */
  • public function getParentsCategories($id_lang = null)
    /**
    Get Each parent CMSCategory of this CMSCategory until the root CMSCategory *
    @param integer $id_lang Language ID
    @return array Corresponding categories */
  • public function updatePosition($way, $position)
  • public static function cleanPositions($id_category_parent)
  • public static function getLastPosition($id_category_parent)
  • public static function getUrlRewriteInformations($id_category)

class CollectionCore implements Iterator, ArrayAccess, Countable

./classes/Collection.php

  • public function __construct($classname, $id_lang = null)
    /**
    @param string $classname
    @param int $id_lang */
  • public function join($association, $on = », $type = null)
    /**
    Join current entity to an associated entity *
    @param $association Association name
    @param string $on
    @param int $type
    @return Collection */
  • public function where($field, $operator, $value, $method = ‘where’)
    /**
    Add WHERE restriction on query *
    @param string $field Field name
    @param string $operator List of operators : =, !=, <>, <, <=, >, >=, like, notlike, regexp, notregexp
    @param mixed $value
    @param string $type where|having
    @return Collection */
  • public function sqlWhere($sql)
    /**
    Add WHERE restriction on query using real SQL syntax *
    @param string $sql
    @return Collection */
  • public function having($field, $operator, $value)
    /**
    Add HAVING restriction on query *
    @param string $field Field name
    @param string $operator List of operators : =, !=, <>, <, <=, >, >=, like, notlike, regexp, notregexp
    @param mixed $value
    @return Collection */
  • public function sqlHaving($sql)
    /**
    Add HAVING restriction on query using real SQL syntax *
    @param string $sql
    @return Collection */
  • public function orderBy($field, $order = ‘asc’)
    /**
    Add ORDER BY restriction on query *
    @param string $field Field name
    @param string $order asc|desc
    @return Collection */
  • public function sqlOrderBy($sql)
    /**
    Add ORDER BY restriction on query using real SQL syntax *
    @param string $sql
    @return Collection */
  • public function groupBy($field)
    /**
    Add GROUP BY restriction on query *
    @param string $field Field name
    @return Collection */
  • public function sqlGroupBy($sql)
    /**
    Add GROUP BY restriction on query using real SQL syntax *
    @param string $sql
    @return Collection */
  • public function getAll($display_query = false)
    /**
    Launch sql query to create collection of objects *
    @param bool $display_query If true, query will be displayed (for debug purpose)
    @return Collection */
  • public function getFirst()
    /**
    Retrieve the first result *
    @return ObjectModel */
  • public function getResults()
    /**
    Get results array *
    @return array */
  • public function rewind()
    /**
    This method is called when a foreach begin *
    @see Iterator::rewind() */
  • public function current()
    /**
    Get current result *
    @see Iterator::current()
    @return ObjectModel */
  • public function valid()
    /**
    Check if there is a current result *
    @see Iterator::valid()
    @return bool */
  • public function key()
    /**
    Get current result index *
    @see Iterator::key()
    @return int */
  • public function next()
    /**
    Go to next result *
    @see Iterator::next() */
  • public function count()
    /**
    Get total of results *
    @see Countable::count()
    @return int */
  • public function offsetExists($offset)
    /**
    Check if a result exist *
    @see ArrayAccess::offsetExists()
    @param $offset
    @return bool */
  • public function offsetGet($offset)
    /**
    Get a result by offset *
    @see ArrayAccess::offsetGet()
    @param $offset
    @return ObjectModel */
  • public function offsetSet($offset, $value)
    /**
    Add an element in the collection *
    @see ArrayAccess::offsetSet()
    @param $offset
    @param $value */
  • public function offsetUnset($offset)
    /**
    Delete an element from the collection *
    @see ArrayAccess::offsetUnset()
    @param $offset */

class CombinationCore extends ObjectModel

./classes/Combination.php

  • public function delete()
  • public function add($autodate = true, $null_values = false)
  • public function deleteAssociations()
  • public function setAttributes($ids_attribute)
  • public function setWsProductOptionValues($values)
  • public function getWsProductOptionValues()
  • public function getWsImages()
  • public function setImages($ids_image)
  • public function setWsImages($values)
  • public function getAttributesName($id_lang)
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is active
    @since 1.5.0.1
    @return bool */
  • public static function isCurrentlyUsed($table = null, $has_active_column = false)
    /**
    This method is allow to know if a Combination entity is currently used
    @since 1.5.0.1
    @param $table
    @param $has_active_column
    @return bool */
  • public static function getIdByReference($id_product, $reference)
    /**
    For a given product_attribute reference, returns the corresponding id *
    @param int $id_product
    @param string $reference
    @return int id */
  • public static function getPrice($id_product_attribute)
    /**
    Retrive the price of combination *
    @since 1.5.0
    @param int $id_product_attribute
    @return float mixed */

class CompareProductCore extends ObjectModel

./classes/CompareProduct.php

  • public static function getCompareProducts($id_compare)
    /**
    Get all compare products of the customer
    @param int $id_customer
    @return array */
  • public static function addCompareProduct($id_compare, $id_product)
    /**
    Add a compare product for the customer
    @param int $id_customer, int $id_product
    @return boolean */
  • public static function removeCompareProduct($id_compare, $id_product)
    /**
    Remove a compare product for the customer
    @param int $id_compare
    @param int $id_product
    @return boolean */
  • public static function getNumberProducts($id_compare)
    /**
    Get the number of compare products of the customer
    @param int $id_compare
    @return int */
  • public static function cleanCompareProducts($period = ‘week’)
    /**
    Clean entries which are older than the period
    @param string $period
    @return void */
  • public static function getIdCompareByIdCustomer($id_customer)
    /**
    Get the id_compare by id_customer
    @param integer $id_customer
    @return integer $id_compare */

class ConfigurationCore extends ObjectModel

./classes/Configuration.php

  • public function getFieldsLang()
    /**
    @see ObjectModel::getFieldsLang()
    @return array Multilingual fields */
  • public static function getIdByName($key, $id_shop_group = null, $id_shop = null)
    /**
    Return ID a configuration key *
    @param string $key
    @param int $id_shop_group
    @param int $id_shop */
  • public static function loadConfiguration()
    /**
    Load all configuration data */
  • public static function get($key, $id_lang = null, $id_shop_group = null, $id_shop = null)
    /**
    Get a single configuration value (in one language only) *
    @param string $key Key wanted
    @param integer $id_lang Language ID
    @return string Value */
  • public static function getGlobalValue($key, $id_lang = null)
  • public static function getInt($key, $id_shop_group = null, $id_shop = null)
    /**
    Get a single configuration value (in multiple languages) *
    @param string $key Key wanted
    @param int $id_shop_group
    @param int $id_shop
    @return array Values in multiple languages */
  • public static function getMultiple($keys, $id_lang = null, $id_shop_group = null, $id_shop = null)
    /**
    Get several configuration values (in one language only) *
    @param array $keys Keys wanted
    @param integer $id_lang Language ID
    @return array Values */
  • public static function hasKey($key, $id_lang = null, $id_shop_group = null, $id_shop = null)
    /**
    Check if key exists in configuration *
    @param string $key
    @param int $id_lang
    @param int $id_shop_group
    @param int $id_shop
    @return bool */
  • public static function set($key, $values, $id_shop_group = null, $id_shop = null)
    /**
    Set TEMPORARY a single configuration value (in one language only) *
    @param string $key Key wanted
    @param mixed $values $values is an array if the configuration is multilingual, a single string else.
    @param int $id_shop_group
    @param int $id_shop */
  • public static function updateGlobalValue($key, $values, $html = false)
    /**
    Update configuration key for global context only *
    @param string $key
    @param mixed $values
    @param bool $html
    @return bool */
  • public static function updateValue($key, $values, $html = false, $id_shop_group = null, $id_shop = null)
    /**
    Update configuration key and value into database (automatically insert if key does not exist) *
    @param string $key Key
    @param mixed $values $values is an array if the configuration is multilingual, a single string else.
    @param boolean $html Specify if html is authorized in value
    @param int $id_shop_group
    @param int $id_shop
    @return boolean Update result */
  • public static function deleteByName($key)
    /**
    Delete a configuration key in database (with or without language management) *
    @param string $key Key to delete
    @return boolean Deletion result */
  • public static function deleteFromContext($key)
    /**
    Delete configuration key from current context. *
    @param string $key */
  • public static function hasContext($key, $id_lang, $context)
    /**
    Check if configuration var is defined in given context *
    @param string $key
    @param int $id_lang
    @param int $context */
  • public static function isOverridenByCurrentContext($key)
  • public static function isLangKey($key)
    /**
    Check if a key was loaded as multi lang *
    @param string $key
    @return bool */
  • public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
    /**
    This method is override to allow TranslatedConfiguration entity *
    @param $sql_join
    @param $sql_filter
    @param $sql_sort
    @param $sql_limit
    @return array */

class ConfigurationTestCore

./classes/ConfigurationTest.php

  • public static function getDefaultTests()
    /**
    getDefaultTests return an array of tests to executes.
    key are method name, value are parameters (false for no parameter)
    all path are _PS_ROOT_DIR_ related *
    @return array */
  • public static function getDefaultTestsOp()
    /**
    getDefaultTestsOp return an array of tests to executes.
    key are method name, value are parameters (false for no parameter) *
    @return array */
  • public static function check($tests)
    /**
    run all test defined in $tests *
    @param array $tests
    @return array results of tests */
  • public static function run($ptr, $arg = 0)
  • public static function test_phpversion()
  • public static function test_mysql_support()
  • public static function test_pdo_mysql()
  • public static function test_magicquotes()
  • public static function test_upload()
  • public static function test_fopen()
  • public static function test_system($funcs)
  • public static function test_gd()
  • public static function test_register_globals()
  • public static function test_gz()
  • public static function test_dir($relative_dir, $recursive = false, &$full_report = null)
  • public static function test_file($file_relative)
  • public static function test_config_dir($dir)
  • public static function test_sitemap($dir)
  • public static function test_root_dir($dir)
  • public static function test_log_dir($dir)
  • public static function test_admin_dir($dir)
  • public static function test_img_dir($dir)
  • public static function test_module_dir($dir)
  • public static function test_cache_dir($dir)
  • public static function test_tools_v2_dir($dir)
  • public static function test_cache_v2_dir($dir)
  • public static function test_download_dir($dir)
  • public static function test_mails_dir($dir)
  • public static function test_translations_dir($dir)
  • public static function test_theme_lang_dir($dir)
  • public static function test_theme_pdf_lang_dir($dir)
  • public static function test_theme_cache_dir($dir)
  • public static function test_customizable_products_dir($dir)
  • public static function test_virtual_products_dir($dir)
  • public static function test_mbstring()
  • public static function test_mcrypt()
  • public static function test_sessions()
  • public static function test_dom()

class ConnectionCore extends ObjectModel

./classes/Connection.php

  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public static function setPageConnection($cookie, $full = true)
  • public static function setNewConnection($cookie)
  • public static function setPageTime($id_connections, $id_page, $time_start, $time)
  • public static function cleanConnectionsPages()

class ConnectionsSourceCore extends ObjectModel

./classes/ConnectionsSource.php

  • public function add($autodate = true, $nullValues = false)
  • public static function logHttpReferer(Cookie $cookie = null)
  • public static function getOrderSources($id_order)

class ContactCore extends ObjectModel

./classes/Contact.php

  • public static function getContacts($id_lang)
    /**
    Return available contacts *
    @param integer $id_lang Language ID
    @param Context
    @return array Contacts */
  • public static function getCategoriesContacts()
    /**
    Return available categories contacts
    @return array Contacts */

class ContextCore

./classes/Context.php

  • public function getMobileDevice()
  • public static function getContext()
    /**
    Get a singleton context *
    @return Context */
  • public function cloneContext()
    /**
    Clone current context
    @return Context */

class ControllerFactoryCore

./classes/ControllerFactory.php

  • public static function includeController($className)
    /**
    @deprecated since 1.5.0 */
  • public static function getController($className, $auth = false, $ssl = false)
    /**
    @deprecated since 1.5.0 */

class CookieCore

./classes/Cookie.php

  • public function __construct($name, $path = », $expire = null, $shared_urls = null)
    /**
    Get data if the cookie exists and else initialize an new one *
    @param $name Cookie name before encrypting
    @param $path */
  • public function disallowWriting()
  • public function setExpire($expire)
    /**
    Set expiration date *
    @param integer $expire Expiration time from now */
  • public function __get($key)
    /**
    Magic method wich return cookie data from _content array *
    @param $key key wanted
    @return string value corresponding to the key */
  • public function __isset($key)
    /**
    Magic method which check if key exists in the cookie *
    @param $key key wanted
    @return boolean key existence */
  • public function __set($key, $value)
    /**
    Magic method wich add data into _content array *
    @param $key key desired
    @param $value value corresponding to the key */
  • public function __unset($key)
    /**
    Magic method wich delete data into _content array *
    @param $key key wanted */
  • public function isLogged($withGuest = false)
    /**
    Check customer informations saved into cookie and return customer validity *
    @deprecated as of version 1.5 use Customer::isLogged() instead
    @return boolean customer validity */
  • public function isLoggedBack()
    /**
    Check employee informations saved into cookie and return employee validity *
    @deprecated as of version 1.5 use Employee::isLoggedBack() instead
    @return boolean employee validity */
  • public function logout()
    /**
    Delete cookie
    As of version 1.5 don’t call this function, use Customer::logout() or Employee::logout() instead; */
  • public function mylogout()
    /**
    Soft logout, delete everything links to the customer
    but leave there affiliate’s informations.
    As of version 1.5 don’t call this function, use Customer::mylogout() instead; */
  • public function makeNewLog()
  • public function update($nullValues = false)
    /**
    Get cookie content */
  • public function __destruct()
  • public function write()
    /**
    Save cookie with setcookie() */
  • public function getFamily($origin)
    /**
    Get a family of variables (e.g. « filter_ ») */
  • public function unsetFamily($origin)
    /** * */
  • public function getName()
    /**
    @return String name of cookie */
  • public function exists()
    /**
    Check if the cookie exists *
    @since 1.5.0
    @return bool */

class CountryCore extends ObjectModel

./classes/Country.php

  • public function delete()
  • public static function getCountries($id_lang, $active = false, $contain_states = false, $list_states = true)
    /**
    @brief Return available countries *
    @param integer $id_lang Language ID
    @param boolean $active return only active coutries
    @param boolean $contain_states return only country with states
    @param boolean $list_states Include the states list with the returned list *
    @return Array Countries and corresponding zones */
  • public static function getCountriesByIdShop($id_shop, $id_lang)
  • public static function getByIso($iso_code)
    /**
    Get a country ID with its iso code *
    @param string $iso_code Country iso code
    @return integer Country ID */
  • public static function getIdZone($id_country)
  • public static function getNameById($id_lang, $id_country)
    /**
    Get a country name with its ID *
    @param integer $id_lang Language ID
    @param integer $id_country Country ID
    @return string Country name */
  • public static function getIsoById($id_country)
    /**
    Get a country iso with its ID *
    @param integer $id_country Country ID
    @return string Country iso */
  • public static function getIdByName($id_lang = null, $country)
    /**
    Get a country id with its name *
    @param integer $id_lang Language ID
    @param string $country Country Name
    @return intval Country id */
  • public static function getNeedZipCode($id_country)
  • public static function getZipCodeFormat($id_country)
  • public static function getDefaultCountryId()
    /**
    Returns the default country Id *
    @deprecated as of 1.5 use $context->country->id instead
    @return integer default country id */
  • public static function getCountriesByZoneId($id_zone, $id_lang)
  • public function isNeedDni()
  • public static function isNeedDniByCountryId($id_country)
  • public static function containsStates($id_country)
  • public function affectZoneToSelection($ids_countries, $id_zone)
    /**
    @param $ids_countries
    @param $id_zone
    @return bool */
  • public function checkZipCode($zip_code)
    /**
    Replace letters of zip code format And check this format on the zip code
    @param $zip_code
    @return (bool) */
  • public static function addModuleRestrictions(array $shops = array(), array $countries = array(), array $modules = array())

class CountyCore extends ObjectModel

./classes/County.php

  • public function delete()
  • public static function getCounties($id_state)
    /**
    @deprecated since 1.5 */
  • public function getZipCodes()
    /**
    @deprecated since 1.5 */
  • public function addZipCodes($zip_codes)
    /**
    @deprecated since 1.5 */
  • public function removeZipCodes($zip_codes)
    /**
    @deprecated since 1.5 */
  • public function breakDownZipCode($zip_codes)
    /**
    @deprecated since 1.5 */
  • public static function getIdCountyByZipCode($id_state, $zip_code)
    /**
    @deprecated since 1.5 */
  • public function isZipCodeRangePresent($zip_codes)
    /**
    @deprecated since 1.5 */
  • public function isZipCodePresent($zip_code)
    /**
    @deprecated since 1.5 */
  • public static function deleteZipCodeByIdCounty($id_county)
    /**
    @deprecated since 1.5 */
  • public static function getIdCountyByNameAndIdState($name, $id_state)
    /**
    @deprecated since 1.5 */

class CSVCore

./classes/CSV.php

  • public function __construct($collection, $filename, $delimiter = ‘;’)
    /*

Loads objects, filename and optionnaly a delimiter.
@param Collection $collection collection of objects / array (of non-objects)
@param string $filename : used later to save the file
@param string $delimiter Optional : delimiter used */

  • public function export()
    /**
    Main function
    Adds headers
    Outputs */
  • public function output($data)
    /**
    Wraps data and echoes
    Uses defined delimiter */
  • public static function wrap($data)
    /**
    Escapes data
    @param string $data
    @return string $data */
  • public function headers()
    /*Adds headers */

 

class CurrencyCore extends ObjectModel

./classes/Currency.php

  • public function __construct($id = null, $id_lang = null, $id_shop = null)
  • public function add($autodate = true, $nullValues = false)
    /**
    Overriding check if currency with the same iso code already exists.
    If it’s true, currency is doesn’t added. *
    @see ObjectModelCore::add() */
  • public static function exists($iso_code, $iso_code_num, $id_shop = 0)
    /**
    Check if a curency already exists. *
    @param int|string $iso_code int for iso code number string for iso code
    @return boolean */
  • public function deleteSelection($selection)
  • public function delete()
  • public function getSign($side = null)
    /**
    Return formated sign *
    @param string $side left or right
    @return string formated sign */
  • public static function getCurrencies($object = false, $active = 1)
    /**
    Return available currencies *
    @return array Currencies */
  • public static function getCurrenciesByIdShop($id_shop = 0)
  • public static function getPaymentCurrenciesSpecial($id_module, $id_shop = null)
  • public static function getPaymentCurrencies($id_module, $id_shop = null)
  • public static function checkPaymentCurrencies($id_module, $id_shop = null)
  • public static function getCurrency($id_currency)
  • public static function getIdByIsoCode($iso_code, $id_shop = 0)
    /**
    @static
    @param $iso_code
    @param int $id_shop
    @return int */
  • public static function getIdByIsoCodeNum($iso_code_num, $id_shop = 0)
    /*@static
    @param $iso_code
    @param int $id_shop
    @return int */
  • public static function getIdByQuery($id_shop = 0)
    /**
    @static
    @param int $id_shop
    @return DbQuery */
  • public function refreshCurrency($data, $isoCodeSource, $defaultCurrency)
    /**
    Refresh the currency conversion rate
    The XML file define conversion rate for each from a default currency ($isoCodeSource). *
    @param $data XML content which contains all the conversion rates
    @param $isoCodeSource The default currency used in the XML file
    @param $defaultCurrency The default currency object */
  • public static function getDefaultCurrency()
  • public static function refreshCurrencies()
  • public static function getCurrent()
    /**
    Get current currency *
    @deprecated as of 1.5 use $context->currency instead
    @return Currency */
  • public static function getCurrencyInstance($id)

class CustomerCore extends ObjectModel

./classes/Customer.php

  • public function __construct($id = null)
  • public function add($autodate = true, $null_values = true)
  • public function update($nullValues = false)
  • public function delete()
  • public static function getCustomers()
    /**
    Return customers list *
    @return array Customers */
  • public function getByEmail($email, $passwd = null, $ignore_guest = true)
    /**
    Return customer instance from its e-mail (optionnaly check password) *
    @param string $email e-mail
    @param string $passwd Password is also checked if specified
    @return Customer instance */
  • public static function getCustomersByEmail($email)
    /**
    Retrieve customers by email address *
    @static
    @param $email
    @return array */
  • public static function isBanned($id_customer)
    /**
    Check id the customer is active or not *
    @return boolean customer validity */
  • public static function customerExists($email, $return_id = false, $ignore_guest = true)
    /**
    Check if e-mail is already registered in database *
    @param string $email e-mail
    @param $return_id boolean
    @param $ignore_guest boolean, to exclude guest customer
    @return Customer ID if found, false otherwise */
  • public static function customerHasAddress($id_customer, $id_address)
    /**
    Check if an address is owned by a customer *
    @param integer $id_customer Customer ID
    @param integer $id_address Address ID
    @return boolean result */
  • public static function resetAddressCache($id_customer)
  • public function getAddresses($id_lang)
    /**
    Return customer addresses *
    @param integer $id_lang Language ID
    @return array Addresses */
  • public static function getAddressesTotalById($id_customer)
    /**
    Count the number of addresses for a customer *
    @param integer $id_customer Customer ID
    @return integer Number of addresses */
  • public static function checkPassword($id_customer, $passwd)
    /**
    Check if customer password is the right one *
    @param string $passwd Password
    @return boolean result */
  • public static function searchByName($query)
    /**
    Light back office search for customers *
    @param string $query Searched string
    @return array Corresponding customers */
  • public static function searchByIp($ip)
    /**
    Search for customers by ip address *
    @param string $ip Searched string */
  • public function getStats()
    /**
    Return several useful statistics about customer *
    @return array Stats */
  • public function getLastConnections()
  • public function customerIdExists($id_customer)
  • public static function customerIdExistsStatic($id_customer)
  • public function updateGroup($list)
    /**
    Update customer groups associated to the object *
    @param array $list groups */
  • public function cleanGroups()
  • public function addGroups($groups)
  • public static function getGroupsStatic($id_customer)
  • public function getGroups()
  • public function isUsed()
    /**
    @deprecated since 1.5 */
  • public function getBoughtProducts()
  • public static function getDefaultGroupId($id_customer)
  • public static function getCurrentCountry($id_customer, Cart $cart = null)
  • public function toggleStatus()
  • public function isGuest()
  • public function transformToCustomer($id_lang, $password = null)
  • public function setWsPasswd($passwd)
  • public function isLogged($with_guest = false)
    /**
    Check customer informations and return customer validity *
    @since 1.5.0
    @param boolean $with_guest
    @return boolean customer validity */
  • public function logout()
    /**
    Logout *
    @since 1.5.0 */
  • public function mylogout()
    /**
    Soft logout, delete everything links to the customer
    but leave there affiliate’s informations *
    @since 1.5.0 */
  • public function getLastCart($with_order = true)
  • public function getOutstanding()
  • public function getWsGroups()
  • public function setWsGroups($result)
  • public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
    /**
    @see ObjectModel::getWebserviceObjectList() */

class CustomerMessageCore extends ObjectModel

./classes/CustomerMessage.php

  • public static function getMessagesByOrderId($id_order, $private = true)
  • public static function getTotalCustomerMessages($where = null)

class CustomerThreadCore extends ObjectModel

./classes/CustomerThread.php

  • public function getWsCustomerMessages()
  • public function delete()
  • public static function getCustomerMessages($id_customer, $read = null)
  • public static function getIdCustomerThreadByEmailAndIdOrder($email, $id_order)
  • public static function getContacts()
  • public static function getTotalCustomerThreads($where = null)
  • public static function getMessageCustomerThreads($id_customer_thread)
  • public static function getNextThread($id_customer_thread)

class CustomizationCore

./classes/Customization.php

  • public static function getReturnedCustomizations($id_order)
  • public static function getOrderedCustomizations($id_cart)
  • public static function countCustomizationQuantityByProduct($customizations)
  • public static function getLabel($id_customization, $id_lang)
  • public static function retrieveQuantitiesFromIds($ids_customizations)
  • public static function countQuantityByCart($id_cart)
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */
  • public static function isCurrentlyUsed($table = null, $has_active_column = false)
    /**
    This method is allow to know if a Customization entity is currently used
    @since 1.5.0.1
    @param $table
    @param $has_active_column
    @return bool */

class DateRangeCore extends ObjectModel

./classes/DateRange.php

  • public static function getCurrentRange()

class DeliveryCore extends ObjectModel

./classes/Delivery.php

  • public function getFields()

class DiscountCore extends CartRule

./classes/Discount.php

  • public function __get($key)
  • public function __set($key, $value)
  • public function __call($method, $args)
  • public function add($autodate = true, $nullValues = false, $categories = null)
    /**
    @deprecated 1.5.0.1 */
  • public function update($autodate = true, $nullValues = false, $categories = null)
    /**
    @deprecated 1.5.0.1 */
  • public static function getIdByName($code)
    /**
    @deprecated 1.5.0.1 */
  • public static function getCustomerDiscounts($id_lang, $id_customer, $active = false, $includeGenericOnes = true, $hasStock = false, Cart $cart = null)
    /**
    @deprecated 1.5.0.1 */
  • public static function getVouchersToCartDisplay($id_lang, $id_customer)
    /**
    @deprecated 1.5.0.1 */
  • public function getValue($nb_discounts = 0, $order_total_products = 0, $shipping_fees = 0, $id_cart = false, $useTax = true, Currency $currency = null, Shop $shop = null)
    /**
    @deprecated 1.5.0.1 */
  • public static function discountExists($discountName, $id_discount = 0)
    /**
    @deprecated 1.5.0.1 */
  • public static function createOrderDiscount($order, $productList, $qtyList, $name, $shipping_cost = false, $id_category = 0, $subcategory = 0)
    /**
    @deprecated 1.5.0.1 */
  • public static function display($value, $type, $currency = null)
    /**
    @deprecated 1.5.0.1 */

class DispatcherCore

./classes/Dispatcher.php

  • public static function getInstance()
    /**
    Get current instance of dispatcher (singleton) *
    @return Dispatcher */
  • public function dispatch()
    /**
    Find the controller and instantiate it */
  • public function addRoute($route_id, $rule, $controller, $id_lang = null, array $keywords = array(), array $params = array())
    /** *
    @param string $route_id Name of the route (need to be uniq, a second route with same name will override the first)
    @param string $rule Url rule
    @param string $controller Controller to call if request uri match the rule
    @param int $id_lang */
  • public function hasRoute($route_id, $id_lang = null)
    /**
    Check if a route exists *
    @param string $route_id
    @param int $id_lang
    @return bool */
  • public function hasKeyword($route_id, $id_lang, $keyword)
    /**
    Check if a keyword is written in a route rule *
    @param string $route_id
    @param int $id_lang
    @param string $keyword
    @return bool */
  • public function validateRoute($route_id, $rule, &$errors = array())
    /**
    Check if a route rule contain all required keywords of default route definition *
    @param string $route_id
    @param string $rule Rule to verify
    @param array $errors List of missing keywords */
  • public function createUrl($route_id, $id_lang = null, array $params = array(), $force_routes = false, $anchor = »)
    /**
    Create an url from *
    @param string $route_id Name the route
    @param int $id_lang
    @param array $params
    @param bool $use_routes If false, don’t use to create this url
    @param string $anchor Optional anchor to add at the end of this url */
  • public function getController()
    /**
    Retrieve the controller from url or request uri if routes are activated *
    @return string */
  • public static function getControllers($dirs)
    /**
    Get list of all available FO controllers *
    @var mixed $dirs
    @return array */
  • public static function getControllersInDirectory($dir)
    /**
    Get list of available controllers from the specified dir *
    @param string dir directory to scan (recursively)
    @return array */

class EmployeeCore extends ObjectModel

./classes/Employee.php

  • public function __construct($id = null, $id_lang = null, $id_shop = null)
  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public function add($autodate = true, $null_values = true)
  • public static function getEmployees()
    /**
    Return list of employees */
  • public function getByEmail($email, $passwd = null)
    /**
    Return employee instance from its e-mail (optionnaly check password) *
    @param string $email e-mail
    @param string $passwd Password is also checked if specified
    @return Employee instance */
  • public static function employeeExists($email)
  • public static function checkPassword($id_employee, $passwd)
    /**
    Check if employee password is the right one *
    @param string $passwd Password
    @return boolean result */
  • public static function countProfile($id_profile, $active_only = false)
  • public function isLastAdmin()
  • public function setWsPasswd($passwd)
  • public function isLoggedBack()
    /**
    Check employee informations saved into cookie and return employee validity *
    @return boolean employee validity */
  • public function logout()
    /**
    Logout */
  • public function hasAuthOnShop($id_shop)
    /**
    Check if the employee is associated to a specific shop *
    @since 1.5.0
    @param int $id_shop
    @return bool */
  • public function hasAuthOnShopGroup($id_shop_group)
    /**
    Check if the employee is associated to a specific shop group *
    @since 1.5.0
    @param int $id_shop_shop
    @return bool */
  • public function getDefaultShopID()
    /**
    Get default id_shop with auth for current employee *
    @since 1.5.0
    @return int */
  • public static function getEmployeesByProfile($id_profile, $active_only = false)
  • public function isSuperAdmin()
    /**
    Check if current employee is super administrator *
    @return bool */

class FeatureCore extends ObjectModel

./classes/Feature.php

  • public static function getFeature($id_lang, $id_feature)
    /**
    Get a feature data for a given id_feature and id_lang *
    @param integer $id_lang Language id
    @param integer $id_feature Feature id
    @return array Array with feature’s data
    @static */
  • public static function getFeatures($id_lang, $with_shop = true)
    /**
    Get all features for a given language *
    @param integer $id_lang Language id
    @return array Multiple arrays with feature’s data
    @static */
  • public function deleteSelection($selection)
    /**
    Delete several objects from database *
    @param array $selection Array with items to delete
    @return boolean Deletion result */
  • public function add($autodate = true, $nullValues = false)
  • public function delete()
  • public function update($nullValues = false)
  • public static function nbFeatures($id_lang)
    /**
    Count number of features for a given language *
    @param integer $id_lang Language id
    @return int Number of feature
    @static */
  • public static function addFeatureImport($name, $position = false)
    /**
    Create a feature from import *
    @param integer $id_feature Feature id
    @param integer $id_product Product id
    @param array $value Feature Value */
  • public static function getFeaturesForComparison($list_ids_product, $id_lang)
  • public static function isFeatureActive()
    /**
    This metohd is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */
  • public function updatePosition($way, $position, $id_feature = null)
    /**
    Move a feature
    @param boolean $way Up (1) or Down (0)
    @param integer $position
    @return boolean Update result */
  • public static function cleanPositions()
    /**
    Reorder feature position
    Call it after deleting a feature. *
    @return bool $return */
  • public static function getHigherPosition()
    /**
    getHigherPosition *
    Get the higher feature position *
    @return integer $position */

class FeatureValueCore extends ObjectModel

./classes/FeatureValue.php

  • public static function getFeatureValues($id_feature)
    /**
    Get all values for a given feature *
    @param boolean $id_feature Feature id
    @return array Array with feature’s values
    @static */
  • public static function getFeatureValuesWithLang($id_lang, $id_feature, $custom = false)
    /**
    Get all values for a given feature and language *
    @param integer $id_lang Language id
    @param boolean $id_feature Feature id
    @return array Array with feature’s values
    @static */
  • public static function getFeatureValueLang($id_feature_value)
    /**
    Get all language for a given value *
    @param boolean $id_feature_value Feature value id
    @return array Array with value’s languages
    @static */
  • public static function selectLang($lang, $id_lang)
    /**
    Select the good lang in tab *
    @param array $lang Array with all language
    @param integer $id_lang Language id
    @return string String value name selected
    @static */
  • public static function addFeatureValueImport($id_feature, $name)
  • public function add($autodate = true, $nullValues = false)
  • public function delete()
  • public function update($nullValues = false)

class QqUploadedFileXhr

./classes/FileUploader.php

  • public function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760)
  • public function handleUpload()
    /**
    Returns array(‘success’=>true) or array(‘error’=>’error message’) */
  • public function save()
    /*Save the file to the specified path
    @return boolean TRUE on success */
  • public function copyImage($id_product, $id_image, $method = ‘auto’)
  • public function getName()
  • public function getSize()
  • public function upload($path)
    /**
    Save the file to the specified path
    @return boolean TRUE on success */
  • public function save()
  • public function copyImage($id_product, $id_image, $method = ‘auto’)
  • public function getName()
  • public function getSize()

class GenderCore extends ObjectModel

./classes/Gender.php

  • public function __construct($id = null, $id_lang = null, $id_shop = null)
  • public static function getGenders($id_lang = null)
  • public function getImage($use_unknown = false)

class GroupCore extends ObjectModel

./classes/Group.php

  • public static function getGroups($id_lang, $id_shop = false)
  • public function getCustomers($count = false, $start = 0, $limit = 0, $shop_filtering = false)
  • public static function getReduction($id_customer = null)
  • public static function getReductionByIdGroup($id_group)
  • public static function getPriceDisplayMethod($id_group)
  • public static function getDefaultPriceDisplayMethod()
  • public function add($autodate = true, $null_values = false)
  • public function delete()
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */
  • public static function isCurrentlyUsed($table = null, $has_active_column = false)
    /**
    This method is allow to know if a Discount entity is currently used
    @since 1.5.0.1
    @param $table
    @param $has_active_column
    @return bool */
  • public static function truncateModulesRestrictions($id_group)
    /**
    Truncate all modules restrictions for the group
    @param integer id_group
    @return boolean result */
  • public static function truncateRestrictionsByModule($id_module)
    /**
    Truncate all restrictions by module
    @param integer id_module
    @return boolean result */
  • public static function addModulesRestrictions($id_group, $modules, $shops = array(1))
    /**
    Adding restrictions modules to the group with id $id_group
    @param $id_group
    @param $modules
    @param array $shops
    @return bool */
  • public static function addRestrictionsForModule($id_module, $shops = array(1))
    /**
    Add restrictions for a new module
    We authorize every groups to the new module
    @param integer id_module
    @param array $shops */
  • public static function getCurrent()
    /**
    Return current group object
    Use context
    @static
    @return Group Group object */

class GroupReductionCore extends ObjectModel

./classes/GroupReduction.php

  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
  • public function delete()
  • public static function getGroupReductions($id_group, $id_lang)
  • public static function getValueForProduct($id_product, $id_group)
  • public static function doesExist($id_group, $id_category)
  • public static function getGroupsByCategoryId($id_category)
  • public static function getGroupByCategoryId($id_category)
  • public static function getGroupsReductionByCategoryId($id_category)
  • public static function getGroupReductionByCategoryId($id_category)
  • public static function setProductReduction($id_product, $id_group = null, $id_category, $reduction = null)
  • public static function deleteProductReduction($id_product)
  • public static function duplicateReduction($id_product_old, $id_product)
  • public static function deleteCategory($id_category)

class GuestCore extends ObjectModel

./classes/Guest.php

  • public function userAgent()
  • public static function getFromCustomer($id_customer)
  • public function mergeWithCustomer($id_guest, $id_customer)
  • public static function setNewGuest($cookie)

class HelpAccessCore

./classes/HelpAccess.php

  • public static function trackClick($label, $version)
    /*

Store in the local database that the user has seen a specific help page

@static
@param $label
@param $version */

  • public static function getVersion($label)
    /*Returns the last version seen of a help page seen by the user@static
    @param $label
    @return mixed */
  • public static function retrieveInfos($label, $iso_lang, $country, $version)
    /*Fetch information from the help website in order to know:
    – if the help page exists
    – his version
    – the associated tooltip@static
    @param $label
    @param $iso_lang
    @param $country
    @param $version@return array */

 

class HookCore extends ObjectModel

./classes/Hook.php

  • public function add($autodate = true, $null_values = false)
  • public static function getHooks($position = false)
    /**
    Return Hooks List *
    @param bool $position
    @return array Hooks List */
  • public static function getIdByName($hook_name)
    /**
    Return hook ID from name *
    @param string $hook_name Hook name
    @return int Hook ID */
  • public static function getHookAliasList()
    /**
    Get list of hook alias *
    @since 1.5.0
    @return array */
  • public static function getRetroHookName($hook_name)
    /**
    Return retrocompatible hook name *
    @since 1.5.0
    @param string $hook_name Hook name
    @return int Hook ID */
  • public static function getHookModuleList()
    /**
    Get list of all registered hooks with modules *
    @since 1.5.0
    @return array */
  • public static function getModulesFromHook($id_hook, $id_module = null)
    /**
    Return Hooks List *
    @since 1.5.0
    @param int $id_hook
    @param int $id_module
    @return array Modules List */
  • public static function getHookModuleExecList($hook_name = null)
    /**
    Get list of modules we can execute per hook *
    @since 1.5.0
    @param string $hook_name Get list of modules for this hook if given
    @return array */
  • public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true)
    /**
    Execute modules for specified hook *
    @param string $hook_name Hook Name
    @param array $hook_args Parameters for the functions
    @param int $id_module Execute hook for this module only
    @return string modules output */
  • public static function wrapLiveEdit($display, $moduleInstance, $id_hook)
  • public static function updateOrderStatus($newOrderStatusId, $id_order)
    /**
    @deprecated 1.5.0 */
  • public static function postUpdateOrderStatus($newOrderStatusId, $id_order)
    /**
    @deprecated 1.5.0 */
  • public static function orderConfirmation($id_order)
    /**
    @deprecated 1.5.0 */
  • public static function paymentReturn($id_order, $id_module)
    /**
    @deprecated 1.5.0 */
  • public static function PDFInvoice($pdf, $id_order)
    /**
    @deprecated 1.5.0 */
  • public static function backBeforePayment($module)
    /**
    @deprecated 1.5.0 */
  • public static function updateCarrier($id_carrier, $carrier)
    /**
    @deprecated 1.5.0 */
  • public static function preloadHookModulesCache()
    /**
    Preload hook modules cache *
    @deprecated 1.5.0 use Hook::getHookModuleList() instead
    @return boolean preload_needed */
  • public static function get($hookName)
    /**
    Return hook ID from name *
    @param string $hookName Hook name
    @return integer Hook ID *
    @deprecated since 1.5.0 use Hook::getIdByName() instead */
  • public static function newOrder($cart, $order, $customer, $currency, $orderStatus)
    /**
    Called when quantity of a product is updated. *
    @param Product
    @param Order */
  • public static function updateQuantity($product, $order = null)
    /**
    @deprecated 1.5.0 */
  • public static function productFooter($product, $category)
    /**
    @deprecated 1.5.0 */
  • public static function productOutOfStock($product)
    /**
    @deprecated 1.5.0 */
  • public static function addProduct($product)
    /**
    @deprecated 1.5.0 */
  • public static function updateProduct($product)
    /**
    @deprecated 1.5.0 */
  • public static function deleteProduct($product)
    /**
    @deprecated 1.5.0 */
  • public static function updateProductAttribute($id_product_attribute)
    /**
    @deprecated 1.5.0 */

class ImageCore extends ObjectModel

./classes/Image.php

  • public function __construct($id = null, $id_lang = null)
  • public function add($autodate = true, $null_values = false)
  • public function delete()
  • public static function getImages($id_lang, $id_product)
    /**
    Return available images for a product *
    @param integer $id_lang Language ID
    @param integer $id_product Product ID
    @return array Images */
  • public static function getAllImages()
    /**
    Return Images *
    @return array Images */
  • public static function getImagesTotal($id_product)
    /**
    Return number of images for a product *
    @param integer $id_product Product ID
    @return integer number of images */
  • public static function getHighestPosition($id_product)
    /**
    Return highest position of images for a product *
    @param integer $id_product Product ID
    @return integer highest position of images */
  • public static function deleteCover($id_product)
    /**
    Delete product cover *
    @param integer $id_product Product ID
    @return boolean result */
  • public static function getCover($id_product)
    /** *Get product cover *
    @param integer $id_product Product ID
    @return boolean result */
  • public static function duplicateProductImages($id_product_old, $id_product_new, $combination_images)
    /**
    Copy images from a product to another *
    @param integer $id_product_old Source product ID
    @param boolean $id_product_new Destination product ID */
  • public static function duplicateAttributeImageAssociations($combination_images)
    /**
    Duplicate product attribute image associations
    @param integer $id_product_attribute_old
    @return boolean */
  • public function positionImage($position, $direction)
    /**
    Reposition image *
    @param integer $position Position
    @param boolean $direction Direction
    @deprecated since version 1.5.0.1 use Image::updatePosition() instead */
  • public function updatePosition($way, $position)
    /**
    Change an image position and update relative positions *
    @param int $way position is moved up if 0, moved down if 1
    @param int $position new position of the moved image
    @return int success */
  • public static function getSize($type)
  • public static function getWidth($params, &$smarty)
  • public static function getHeight($params, &$smarty)
  • public static function clearTmpDir()
    /**
    Clear all images in tmp dir */
  • public function deleteProductAttributeImage()
    /**
    Delete Image – Product attribute associations for this image */
  • public function deleteImage($force_delete = false)
    /**
    Delete the product image from disk and remove the containing folder if empty
    Handles both legacy and new image filesystems */
  • public static function deleteAllImages($path, $format = ‘jpg’)
    /**
    Recursively deletes all product images in the given folder tree and removes empty folders. *
    @param string $path folder containing the product images to delete
    @param string $format image format
    @return bool success */
  • public function getExistingImgPath()
    /**
    Returns image path in the old or in the new filesystem *
    @ returns string image path */
  • public function getImgFolder()
    /**
    Returns the path to the folder containing the image in the new filesystem *
    @return string path to folder */
  • public function createImgFolder()
    /**
    Create parent folders for the image in the new filesystem *
    @return bool success */
  • public function getImgPath()
    /**
    Returns the path to the image without file extension *
    @return string path */
  • public static function getImgFolderStatic($id_image)
    /**
    Returns the path to the folder containing the image in the new filesystem *
    @param mixed $id_image
    @return string path to folder */
  • public static function moveToNewFileSystem($max_execution_time = 0)
    /**
    Move all legacy product image files from the image folder root to their subfolder in the new filesystem.
    If max_execution_time is provided, stops before timeout and returns string « timeout ».
    If any image cannot be moved, stops and returns « false » *
    @param int max_execution_time
    @return mixed success or timeout */
  • public static function testFileSystem()
    /**
    Try to create and delete some folders to check if moving images to new file system will be possible *
    @return boolean success */
  • public function getPathForCreation()
    /**
    Returns the path where a product image should be created (without file format) *
    @return string path */

class ImageManagerCore

./classes/ImageManager.php

  • public static function thumbnail($image, $cache_image, $size, $image_type = ‘jpg’, $disable_cache = false)
    /**
    Generate a cached thumbnail for object lists (eg. carrier, order states…etc) *
    @param string $image Real image filename
    @param string $cache_image Cached filename
    @param int $size Desired size
    @param string $image_type Image type
    @param bool $disable_cache When turned on a timestamp will be added to the image URI to disable the HTTP cache
    @return string */
  • public static function checkImageMemoryLimit($image)
    /**
    Check if memory limit is too long or not *
    @static
    @param $image
    @return bool */
  • public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = ‘jpg’, $force_type = false)
    /**
    Resize, cut and optimize image *
    @param string $src_file Image object from $_FILE
    @param string $dst_file Destination filename
    @param integer $dst_width Desired width (optional)
    @param integer $dst_height Desired height (optional)
    @param string $file_type
    @return boolean Operation result */
  • public static function isRealImage($filename, $file_mime_type = null, $mime_type_list = null)
    /**
    Check if file is a real image *
    @param string $filename File path to check
    @param string $file_mime_type File known mime type (generally from $_FILES)
    @param array $mime_type_list Allowed MIME types
    @return bool */
  • public static function isCorrectImageFileExt($filename)
    /**
    Check if image file extension is correct *
    @static
    @param $filename real filename
    @return bool true if it’s correct */
  • public static function validateUpload($file, $max_file_size = 0)
    /**
    Validate image upload (check image type and weight) *
    @param array $file Upload $_FILE value
    @param integer $max_file_size Maximum upload size
    @return bool|string Return false if no error encountered */
  • public static function validateIconUpload($file, $max_file_size = 0)
    /**
    Validate icon upload *
    @param array $file Upload $_FILE value
    @param int $max_file_size Maximum upload size
    @return bool|string Return false if no error encountered */
  • public static function cut($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = ‘jpg’, $dst_x = 0, $dst_y = 0)
    /**
    Cut image *
    @param array $src_file Origin filename
    @param string $dst_file Destination filename
    @param integer $dst_width Desired width
    @param integer $dst_height Desired height
    @param string $file_type
    @param int $dst_x
    @param int $dst_y *
    @return bool Operation result */
  • public static function create($type, $filename)
    /**
    Create an image with GD extension from a given type *
    @param string $type
    @param string $filename
    @return resource */
  • public static function createWhiteImage($width, $height)
    /**
    Create an empty image with white background *
    @param int $width
    @param int $height
    @return resource */
  • public static function write($type, $resource, $filename)
    /**
    Generate and write image *
    @param string $type
    @param resource $resource
    @param string $filename
    @return bool */
  • public static function getMimeTypeByExtension($file_name)
    /**
    Return the mime type by the file extension *
    @param string $file_name
    @return string */

class ImageTypeCore extends ObjectModel

./classes/ImageType.php

  • public static function getImagesTypes($type = null)
    /**
    Returns image type definitions *
    @param string|null Image type
    @return array Image type definitions */
  • public static function typeAlreadyExists($typeName)
    /**
    Check if type already is already registered in database *
    @param string $typeName Name
    @return integer Number of results found */
  • public static function getByNameNType($name, $type = null)
    /**
    Finds image type definition by name and type
    @param string $name
    @param string $type */
  • public static function getFormatedName($name)

class LanguageCore extends ObjectModel

./classes/Language.php

  • public function __construct($id = null, $id_lang = null)
  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public function moveToIso($newIso)
    /**
    Move translations files after editiing language iso code */
  • public function add($autodate = true, $nullValues = false, $only_add = false)
  • public function toggleStatus()
  • public function checkFiles()
  • public static function checkFilesWithIsoCode($iso_code)
    /**
    This functions checks if every files exists for the language $iso_code.
    Concerned files are those located in translations/$iso_code/
    and translations/mails/$iso_code . *
    @param mixed $iso_code
    @returntrue if all files exists */
  • public static function getFilesList($iso_from, $theme_from, $iso_to = false, $theme_to = false, $select = false, $check = false, $modules = false)
  • public function loadUpdateSQL()
    /**
    loadUpdateSQL will create default lang values when you create a new lang, based on default id lang *
    @return boolean true if succeed */
  • public static function recurseDeleteDir($dir)
  • public function delete()
  • public function deleteSelection($selection)
  • public static function getLanguages($active = true, $id_shop = false)
    /**
    Return available languages *
    @param boolean $active Select only active languages
    @return array Languages */
  • public static function getLanguage($id_lang)
  • public static function getIsoById($id_lang)
    /**
    Return iso code from id *
    @param integer $id_lang Language ID
    @return string Iso code */
  • public static function getIdByIso($iso_code)
    /**
    Return id from iso code *
    @param string $iso_code Iso code
    @return integer Language ID */
  • public static function getLanguageCodeByIso($iso_code)
  • public static function getIsoIds($active = true)
    /**
    Return array (id_lang, iso_code) *
    @param string $iso_code Iso code
    @return array Language (id_lang, iso_code) */
  • public static function copyLanguageData($from, $to)
  • public static function loadLanguages()
    /**
    Load all languages in memory for caching */
  • public function update($nullValues = false)
  • public static function checkAndAddLanguage($iso_code, $lang_pack = false, $only_add = false, $params_lang = null)
  • public static function isInstalled($iso_code)
  • public static function countActiveLanguages()
  • public static function downloadAndInstallLanguagePack($iso, $version = null, $params = null)
  • public static function isMultiLanguageActivated()
    /**
    Check if more on than one language is activated *
    @since 1.5.0
    @return bool */

class LinkCore

./classes/Link.php

  • public function __construct($protocol_link = null, $protocol_content = null)
    /**
    Constructor (initialization only) */
  • public function getProductDeletePictureLink($product, $id_picture)
    /**
    Create a link to delete a product *
    @param mixed $product ID of the product OR a Product object
    @param int $id_picture ID of the picture to delete
    @return string */
  • public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false)
    /**
    Create a link to a product *
    @param mixed $product Product object (can be an ID product, but deprecated)
    @param string $alias
    @param string $category
    @param string $ean13
    @param int $id_lang
    @param int $id_shop (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart
    @param int $ipa ID product attribute
    @return string */
  • public function getCategoryLink($category, $alias = null, $id_lang = null, $selected_filters = null)
    /**
    Create a link to a category *
    @param mixed $category Category object (can be an ID category, but deprecated)
    @param string $alias
    @param int $id_lang
    @param string $selected_filters Url parameter to autocheck filters of the module blocklayered
    @return string */
  • public function getCMSCategoryLink($category, $alias = null, $id_lang = null)
    /**
    Create a link to a CMS category *
    @param mixed $category CMSCategory object (can be an ID category, but deprecated)
    @param string $alias
    @param int $id_lang
    @return string */
  • public function getCMSLink($cms, $alias = null, $ssl = false, $id_lang = null)
    /**
    Create a link to a CMS page *
    @param mixed $cms CMS object (can be an ID CMS, but deprecated)
    @param string $alias
    @param bool $ssl
    @param int $id_lang
    @return string */
  • public function getSupplierLink($supplier, $alias = null, $id_lang = null)
    /**
    Create a link to a supplier *
    @param mixed $supplier Supplier object (can be an ID supplier, but deprecated)
    @param string $alias
    @param int $id_lang
    @return string */
  • public function getManufacturerLink($manufacturer, $alias = null, $id_lang = null)
    /**
    Create a link to a manufacturer *
    @param mixed $manufacturer Manufacturer object (can be an ID supplier, but deprecated)
    @param string $alias
    @param int $id_lang
    @return string */
  • public function getModuleLink($module, $controller = ‘default’, array $params = array(), $ssl = false, $id_lang = null)
    /**
    Create a link to a module *
    @since 1.5.0
    @param string $module Module name
    @param string $process Action name
    @param int $id_lang
    @return string */
  • public function getAdminLink($controller, $with_token = true)
    /**
    Use controller name to create a link *
    @param string $controller
    @param boolean $with_token include or not the token in the url
    @return controller url */
  • public function getImageLink($name, $ids, $type = null)
    /**
    Returns a link to a product image for display
    Note: the new image filesystem stores product images in subdirectories of img/p/ *
    @param string $name rewrite link of the image
    @param string $ids id part of the image filename – can be « id_product-id_image » (legacy support, recommended) or « id_image » (new)
    @param string $type */
  • public function getMediaLink($filepath)
  • public function getPageLink($controller, $ssl = false, $id_lang = null, $request = null, $request_url_encode = false)
    /**
    Create a simple link *
    @param string $controller
    @param bool $ssl
    @param int $id_lang
    @param string|array $request
    @param bool $request_url_encode Use URL encode *
    @return string Page link */
  • public function getCatImageLink($name, $id_category, $type = null)
  • public function getLanguageLink($id_lang, Context $context = null)
    /**
    Create link after language change, for the change language block *
    @param integer $id_lang Language ID
    @return string link */
  • public function goPage($url, $p)
  • public function getPaginationLink($type, $id_object, $nb = false, $sort = false, $pagination = false, $array = false)
    /**
    Get pagination link *
    @param string $type Controller name
    @param int $id_object
    @param boolean $nb Show nb element per page attribute
    @param boolean $sort Show sort attribute
    @param boolean $pagination Show page number attribute
    @param boolean $array If false return an url, if true return an array */
  • public function addSortDetails($url, $orderby, $orderway)

class LocalizationPackCore

./classes/LocalizationPack.php

  • public function loadLocalisationPack($file, $selection, $install_mode = false)
  • public function getErrors()

class LoggerCore extends ObjectModel

./classes/Logger.php

  • public static function sendByMail($log)
    /**
    Send e-mail to the shop owner only if the minimal severity level has been reached *
    @param Logger
    @param unknown_type $log */
  • public static function addLog($message, $severity = 1, $error_code = null, $object_type = null, $object_id = null, $allow_duplicate = false)
    /**
    add a log item to the database and send a mail if configured for this $severity *
    @param string $message the log message
    @param int $severity
    @param int $error_code
    @param string $object_type
    @param int $object_id
    @param boolean $allow_duplicate if set to true, can log several time the same information (not recommended)
    @return boolean true if succeed */
  • public function getHash()
    /**
    this function md5($this->message.$this->severity.$this->error_code.$this->object_type.$this->object_id) *
    @return string hash */

class MailCore

./classes/Mail.php

  • public static function Send($id_lang, $template, $subject, $template_vars, $to,
    /**
    Send Email

@param int $id_lang Language of the email (to translate the template)
@param string $template Template: the name of template not be a var but a string !
@param string $subject
@param string $template_vars
@param string $to
@param string $to_name
@param string $from
@param string $from_name
@param array $file_attachment Array with three parameters (content, mime and name). You can use an array of array to attach multiple files
@param bool $modeSMTP
@param string $template_path
@param bool $die */

  • public static function sendMailTest($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort = 25, $smtpEncryption)
  • public static function l($string, $id_lang = null, Context $context = null)
    /**
    This method is used to get the translation for email Object.
    For an object is forbidden to use htmlentities,
    we have to return a sentence with accents.
    @param string $string raw sentence (write directly in file) */

 

class ManufacturerCore extends ObjectModel

./classes/Manufacturer.php

  • public function __construct($id = null, $id_lang = null)
  • public function delete()
  • public function deleteSelection($selection)
    /**
    Delete several objects from database *
    return boolean Deletion result */
  • public static function getManufacturers($get_nb_products = false, $id_lang = 0, $active = true, $p = false,
    /**
    Return manufacturers *
    @param boolean $get_nb_products [optional] return products numbers for each
    @return array Manufacturers */
  • public static function getNameById($id_manufacturer)
  • public static function getIdByName($name)
  • public function getLink()
  • public static function getProducts($id_manufacturer, $id_lang, $p, $n, $order_by = null, $order_way = null,
  • public function getProductsLite($id_lang)
  • public static function manufacturerExists($id_manufacturer)
    /*
    Specify if a manufacturer already in base *
    @param $id_manufacturer Manufacturer id
    @return boolean */
  • public function getAddresses($id_lang)
  • public function getWsAddresses()
  • public function setWsAddresses($id_addresses)

class MediaCore

./classes/Media.php

  • public static function minifyHTML($html_content)
  • public static function minifyHTMLpregCallback($preg_matches)
  • public static function packJSinHTML($html_content)
  • public static function packJSinHTMLpregCallback($preg_matches)
  • public static function packJS($js_content)
  • public static function minifyCSS($css_content, $fileuri = false, &$import_url = array())
  • public static function getJSPath($js_uri)
    /**
    addJS return javascript path *
    @param mixed $js_uri
    @return string */
  • public static function getCSSPath($css_uri, $css_media_type = ‘all’)
    /**
    addCSS return stylesheet path. *
    @param mixed $css_uri
    @param string $css_media_type
    @return string */
  • public static function getJqueryPath($version = null, $folder = null, $minifier = true)
    /**
    return jquery path. *
    @param mixed $version
    @return string */
  • public static function getJqueryUIPath($component, $theme, $check_dependencies)
    /**
    return jqueryUI component path. *
    @param mixed $component
    @return string */
  • public static function getJqueryPluginPath($name, $folder = null)
    /**
    return jquery plugin path. *
    @param mixed $name
    @return void */
  • public static function getJqueryPluginCSSPath($name, $folder = null)
    /**
    return jquery plugin css path if exist. *
    @param mixed $name
    @return void */
  • public static function cccCss($css_files)
    /**
    Combine Compress and Cache CSS (ccc) calls *
    @param array css_files
    @return array processed css_files */
  • public static function getBackTrackLimit()
  • public static function cccJS($js_files)
    /**
    Combine Compress and Cache (ccc) JS calls *
    @param array js_files
    @return array processed js_files */

class MessageCore extends ObjectModel

./classes/Message.php

  • public static function getMessageByCartId($id_cart)
    /**
    Return the last message from cart *
    @param integer $id_cart Cart ID
    @return array Message */
  • public static function getMessagesByOrderId($id_order, $private = false, Context $context = null)
    /**
    Return messages from Order ID *
    @param integer $id_order Order ID
    @param boolean $private return WITH private messages
    @return array Messages */
  • public static function getMessagesByCartId($id_cart, $private = false, Context $context = null)
    /**
    Return messages from Cart ID *
    @param integer $id_order Order ID
    @param boolean $private return WITH private messages
    @return array Messages */
  • public static function markAsReaded($id_message, $id_employee)
    /**
    Registered a message ‘readed’ *
    @param integer $id_message Message ID
    @param integer $id_emplyee Employee ID */

class MetaCore extends ObjectModel

./classes/Meta.php

  • public static function getPages($exclude_filled = false, $add_page = false)
  • public static function getMetas()
  • public static function getMetasByIdLang($id_lang)
  • public static function getMetaByPage($page, $id_lang)
  • public function update($null_values = false)
  • public function delete()
  • public function deleteSelection($selection)
  • public static function getEquivalentUrlRewrite($new_id_lang, $id_lang, $url_rewrite)
  • public static function getMetaTags($id_lang, $page_name, $title = »)
    /**
    @since 1.5.0 */
  • public static function getHomeMetas($id_lang, $page_name)
    /**
    Get meta tags for a given page *
    @since 1.5.0
    @param int $id_lang
    @param string $page_name
    @return array Meta tags */
  • public static function getProductMetas($id_product, $id_lang, $page_name)
    /**
    Get product meta tags *
    @since 1.5.0
    @param int $id_product
    @param int $id_lang
    @param string $page_name
    @return array */
  • public static function getCategoryMetas($id_category, $id_lang, $page_name, $title = »)
    /**
    Get category meta tags *
    @since 1.5.0
    @param int $id_category
    @param int $id_lang
    @param string $page_name
    @return array */
  • public static function getManufacturerMetas($id_manufacturer, $id_lang, $page_name)
    /**
    Get manufacturer meta tags *
    @since 1.5.0
    @param int $id_manufacturer
    @param int $id_lang
    @param string $page_name
    @return array */
  • public static function getSupplierMetas($id_supplier, $id_lang, $page_name)
    /**
    Get supplier meta tags *
    @since 1.5.0
    @param int $id_supplier
    @param int $id_lang
    @param string $page_name
    @return array */
  • public static function getCmsMetas($id_cms, $id_lang, $page_name)
    /**
    Get CMS meta tags *
    @since 1.5.0
    @param int $id_cms
    @param int $id_lang
    @param string $page_name
    @return array */
  • public static function getCmsCategoryMetas($id_cms_category, $id_lang, $page_name)
    /**
    Get CMS category meta tags *
    @since 1.5.0
    @param int $id_cms_category
    @param int $id_lang
    @param string $page_name
    @return array */
  • public static function completeMetaTags($meta_tags, $default_value, Context $context = null)
    /**
    @since 1.5.0 */

class NotificationCore

./classes/Notification.php

  • public function __construct()
  • public function getLastElements()
    /**
    getLastElements return all the notifications (new order, new customer registration, and new customer message)
    Get all the notifications *
    @return array containing the notifications */
  • public function installDb()
  • public static function getLastElementsIdsByType($type, $id_last_element)
    /**
    getLastElementsIdsByType return all the element ids to show (order, customer registration, and customer message)
    Get all the element ids *
    @param string $type contains the field name of the Employee table
    @param integer $id_last_element contains the id of the last seen element
    @return array containing the notifications */
  • public function updateEmployeeLastElement($type)
    /**
    updateEmployeeLastElement return 0 if the field doesn’t exists in Employee table.
    Updates the last seen element by the employee *
    @param string $type contains the field name of the Employee table
    @return boolean if type exists or not */

class PackCore extends Product

./classes/Pack.php

  • public static function isPack($id_product)
    /**
    Is product a pack? *
    @static
    @param $id_product
    @return bool */
  • public static function isPacked($id_product)
    /**
    Is product in a pack? *
    @static
    @param $id_product
    @return bool */
  • public static function noPackPrice($id_product)
  • public static function getItems($id_product, $id_lang)
  • public static function isInStock($id_product)
  • public static function getItemTable($id_product, $id_lang, $full = false)
  • public static function getPacksTable($id_product, $id_lang, $full = false, $limit = null)
  • public static function deleteItems($id_product)
  • public static function addItem($id_product, $id_item, $qty)
    /**
    Add an item to the pack *
    @param integer $id_product
    @param integer $id_item
    @param integer $qty
    @return boolean true if everything was fine */
  • public static function duplicate($id_product_old, $id_product_new)
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */
  • public static function isCurrentlyUsed($table = null, $has_active_column = false)
    /**
    This method is allow to know if a Pack entity is currently used
    @since 1.5.0
    @param $table
    @param $has_active_column
    @return bool */
  • public static function usesAdvancedStockManagement($id_product)
    /**
    For a given pack, tells if it has at least one product using the advanced stock management *
    @param int $id_product id_pack
    @return bool */

class PageCore extends ObjectModel

./classes/Page.php

  • public static function getCurrentId()
    /**
    @return int Current page ID */
  • public static function getPageTypeByName($name)
    /**
    Return page type ID from page name *
    @param string $name Page name (E.g. product.php) */
  • public static function setPageViewed($id_page)

class PaymentCCCore extends OrderPayment

./classes/PaymentCC.php

  • public function add($autodate = true, $nullValues = false)
    /**
    @deprecated 1.5.0.2
    @see OrderPaymentCore */
  • public static function getByOrderId($id_order)
    /**
    Get the detailed payment of an order
    @param int $id_order
    @return array
    @deprecated 1.5.0.1
    @see OrderPaymentCore */

class ProductCore extends ObjectModel

./classes/Product.php

  • public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null)
  • public function getFieldsShop()
    /**
    @see ObjectModel::getFieldsShop()
    @return array */
  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
  • public static function initPricesComputation($id_customer = null)
  • public static function getTaxCalculationMethod($id_customer = null)
  • public function updatePosition($way, $position)
    /**
    Move a product inside its category
    @param boolean $way Up (1) or Down (0)
    @param integer $position
    return boolean Update result */
  • public static function cleanPositions($id_category)
    /*
    Reorder product position in category $id_category.
    Call it after deleting a product from a category. *
    @param int $id_category */
  • public static function getDefaultAttribute($id_product, $minimum_quantity = 0)
    /**
    Get the default attribute for a product *
    @return int Attributes list */
  • public function setAvailableDate($available_date = ‘0000-00-00’)
  • public static function updateIsVirtual($id_product)
  • public function validateFieldsLang($die = true, $error_return = false)
    /**
    @see ObjectModel::validateFieldsLang() */
  • public function validateField($field, $value, $id_lang = null)
    /**
    @see ObjectModel::validateField() */
  • public function toggleStatus()
  • public function delete()
  • public function deleteSelection($products)
  • public function deleteFromCartRules()
  • public function deleteFromSupplier()
  • public function addToCategories($categories = array())
    /**
    addToCategories add this product to the category/ies if not exists. *
    @param mixed $categories id_category or array of id_category
    @return boolean true if succeed */
  • public function updateCategories($categories, $keeping_current_pos = false)
    /**
    Update categories to index product into *
    @param string $productCategories Categories list to index product into
    @param boolean $keeping_current_pos (deprecated, no more used)
    @return array Update/insertion result */
  • public function deleteCategory($id_category, $clean_positions = true)
    /**
    deleteCategory delete this product from the category $id_category *
    @param mixed $id_category
    @param mixed $clean_positions
    @return boolean */
  • public function deleteCategories($clean_positions = false)
    /**
    Delete all association to category where product is indexed *
    @param boolean $clean_positions clean category positions after deletion
    @return array Deletion result */
  • public function deleteTags()
    /**
    Delete products tags entries *
    @return array Deletion result */
  • public function deleteCartProducts()
    /**
    Delete product from cart *
    @return array Deletion result */
  • public function deleteImages()
    /**
    Delete product images from database *
    @return bool success */
  • public static function getProductAttributePrice($id_product_attribute)
    /**
    @deprecated 1.5.0 Use Combination::getPrice() */
  • public static function getProducts($id_lang, $start, $limit, $order_by, $order_way, $id_category = false,
    /**
    Get all available products *
    @param integer $id_lang Language id
    @param integer $start Start number
    @param integer $limit Number of products to return
    @param string $order_by Field for ordering
    @param string $order_way Way for ordering (ASC or DESC)
    @return array Products details */
  • public static function getSimpleProducts($id_lang, Context $context = null)
  • public function isNew()
  • public function productAttributeExists($attributes_list, $current_product_attribute = false, Context $context = null, $all_shops = false, $return_id = false)
  • public function addProductAttribute($price, $weight, $unit_impact, $ecotax, $quantity, $id_images, $reference,
    /**
    addProductAttribute is deprecated *
    The quantity params now set StockAvailable for the current shop with the specified quantity
    The supplier_reference params now set the supplier reference of the default supplier of the product if possible *
    @see StockManager if you want to manage real stock
    @see StockAvailable if you want to manage available quantities for sale on your shop(s)
    @see ProductSupplier for manage supplier reference(s) *
    @deprecated since 1.5.0 */
  • public function generateMultipleCombinations($combinations, $attributes)
  • public function addCombinationEntity($wholesale_price, $price, $weight, $unit_impact, $ecotax, $quantity,
    /**
    @param integer $quantity DEPRECATED
    @param string $supplier_reference DEPRECATED */
  • public function addProductAttributeMultiple($attributes, $set_default = true)
  • public function deleteDefaultAttributes()
    /**
    Del all default attributes for product */
  • public function setDefaultAttribute($id_product_attribute)
  • public static function updateDefaultAttribute($id_product)
  • public function updateProductAttribute($id_product_attribute, $wholesale_price, $price, $weight, $unit, $ecotax,
    /**
    Update a product attribute *
    @deprecated since 1.5
    @see updateAttribute() to use instead
    @see ProductSupplier for manage supplier reference(s) * */
  • public function addSupplierReference($id_supplier, $id_product_attribute, $supplier_reference = null, $price = null, $id_currency = null)
    /**
    Sets Supplier Reference *
    @param int $id_supplier
    @param int $id_product_attribute
    @param string $supplier_reference
    @param float $price
    @param int $id_currency */
  • public function updateAttribute($id_product_attribute, $wholesale_price, $price, $weight, $unit, $ecotax,
    /**
    Update a product attribute *
    @param integer $id_product_attribute Product attribute id
    @param float $wholesale_price Wholesale price
    @param float $price Additional price
    @param float $weight Additional weight
    @param float $unit
    @param float $ecotax Additional ecotax
    @param integer $id_image Image id
    @param string $reference Reference
    @param string $ean13 Ean-13 barcode
    @param int $default Default On
    @param string $upc Upc barcode
    @param string $minimal_quantity Minimal quantity
    @return array Update result */
  • public function addAttribute($price, $weight, $unit_impact, $ecotax, $id_images, $reference, $ean13,
    /**
    Add a product attribute
    @since 1.5.0.1 *
    @param float $price Additional price
    @param float $weight Additional weight
    @param float $ecotax Additional ecotax
    @param integer $id_images Image ids
    @param string $reference Reference
    @param string $location Location
    @param string $ean13 Ean-13 barcode
    @param boolean $default Is default attribute for product
    @param integer $minimal_quantity Minimal quantity to add to cart
    @return mixed $id_product_attribute or false */
  • public function updateQuantityProductWithAttributeQuantity()
    /**
    @deprecated since 1.5.0 */
  • public function deleteProductAttributes()
    /**
    Delete product attributes *
    @return array Deletion result */
  • public function deleteAttributesImpacts()
    /**
    Delete product attributes impacts *
    @return Deletion result */
  • public function deleteProductFeatures()
    /**
    Delete product features *
    @return array Deletion result */
  • public static function updateCacheAttachment($id_product)
  • public function deleteAttachments()
    /**
    Delete product attachments *
    @return array Deletion result */
  • public function deleteCustomization()
    /**
    Delete product customizations *
    @return array Deletion result */
  • public function deletePack()
    /**
    Delete product pack details *
    @return array Deletion result */
  • public function deleteProductSale()
    /**
    Delete product sales *
    @return array Deletion result */
  • public function deleteSceneProducts()
    /**
    Delete product in its scenes *
    @return array Deletion result */
  • public function deleteSearchIndexes()
    /**
    Delete product indexed words *
    @return array Deletion result */
  • public function addAttributeCombinaison($id_product_attribute, $attributes)
    /**
    Add a product attributes combinaison *
    @param integer $id_product_attribute Product attribute id
    @param array $attributes Attributes to forge combinaison
    @return array Insertion result
    @deprecated since 1.5.0.7 */
  • public function addAttributeCombinationMultiple($id_attributes, $combinations)
  • public function deleteAttributeCombination($id_product_attribute)
    /**
    Delete a product attributes combination *
    @param integer $id_product_attribute Product attribute id
    @return array Deletion result */
  • public function deleteFeatures()
    /**
    Delete features * */
  • public function getAttributesResume($id_lang, $attribute_value_separator = ‘ – ‘, $attribute_separator = ‘, ‘)
    /**
    Get all available product attributes resume *
    @param integer $id_lang Language id
    @return array Product attributes combinations */
  • public function getAttributeCombinations($id_lang)
    /**
    Get all available product attributes combinations *
    @param integer $id_lang Language id
    @return array Product attributes combinations */
  • public function getAttributeCombinationsById($id_product_attribute, $id_lang)
    /**
    Get product attribute combination by id_product_attribute *
    @param integer $id_product_attribute
    @param integer $id_lang Language id
    @return array Product attribute combination by id_product_attribute */
  • public function getCombinationImages($id_lang)
  • public function hasAttributes()
    /**
    Check if product has attributes combinations *
    @return integer Attributes combinations number */
  • public static function getNewProducts($id_lang, $page_number = 0, $nb_products = 10,
    /**
    Get new products *
    @param integer $id_lang Language id
    @param integer $pageNumber Start from (optional)
    @param integer $nbProducts Number of products to return (optional)
    @return array New products */
  • public static function getRandomSpecial($id_lang, $beginning = false, $ending = false, Context $context = null)
    /**
    Get a random special *
    @param integer $id_lang Language id
    @return array Special */
  • public static function getPricesDrop($id_lang, $page_number = 0, $nb_products = 10, $count = false,
    /**
    Get prices drop *
    @param integer $id_lang Language id
    @param integer $pageNumber Start from (optional)
    @param integer $nbProducts Number of products to return (optional)
    @param boolean $count Only in order to get total number (optional)
    @return array Prices drop */
  • public static function getProductCategories($id_product = »)
    /**
    getProductCategories return an array of categories which this product belongs to *
    @return array of categories */
  • public static function getProductCategoriesFull($id_product = », $id_lang = null)
  • public function getCategories()
    /**
    getCategories return an array of categories which this product belongs to *
    @return array of categories */
  • public function getCarriers()
    /**
    Gets carriers assigned to the product */
  • public function setCarriers($carrier_list)
    /**
    Sets carriers assigned to the product */
  • public function getImages($id_lang, Context $context = null)
    /**
    Get product images and legends *
    @param integer $id_lang Language id for multilingual legends
    @return array Product images and legends */
  • public static function getCover($id_product, Context $context = null)
    /**
    Get product cover image *
    @return array Product cover image */
  • public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
    /**
    Get product price *
    @param integer $id_product Product id
    @param boolean $usetax With taxes or not (optional)
    @param integer $id_product_attribute Product attribute id (optional).
    If set to false, do not apply the combination price impact. NULL does apply the default combination price impact.
    @param integer $decimals Number of decimals (optional)
    @param integer $divisor Useful when paying many time without fees (optional)
    @param boolean $only_reduc Returns only the reduction amount
    @param boolean $usereduc Set if the returned amount will include reduction
    @param integer $quantity Required for quantity discount application (default value: 1)
    @param boolean $forceAssociatedTax DEPRECATED – NOT USED Force to apply the associated tax. Only works when the parameter $usetax is true
    @param integer $id_customer Customer ID (for customer group reduction)
    @param integer $id_cart Cart ID. Required when the cookie is not accessible (e.g., inside a payment module, a cron task…)
    @param integer $id_address Customer address ID. Required for price (tax included) calculation regarding the guest localization
    @param variable_reference $specificPriceOutput.
    If a specific price applies regarding the previous parameters, this variable is filled with the corresponding SpecificPrice object
    @param boolean $with_ecotax insert ecotax in price output.
    @return float Product price */
  • public static function priceCalculation($id_shop, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency,
    /**
    Price calculation / Get product price *
    @param integer $id_shop Shop id
    @param integer $id_product Product id
    @param integer $id_product_attribute Product attribute id
    @param integer $id_country Country id
    @param integer $id_state State id
    @param integer $id_currency Currency id
    @param integer $id_group Group id
    @param integer $quantity Quantity Required for Specific prices : quantity discount application
    @param boolean $use_tax with (1) or without (0) tax
    @param integer $decimals Number of decimals returned
    @param boolean $only_reduc Returns only the reduction amount
    @param boolean $use_reduc Set if the returned amount will include reduction
    @param boolean $with_ecotax insert ecotax in price output.
    @param variable_reference $specific_price_output
    If a specific price applies regarding the previous parameters, this variable is filled with the corresponding SpecificPrice object
    @return float Product price **/
  • public static function convertAndFormatPrice($price, $currency = false, Context $context = null)
  • public static function isDiscounted($id_product, $quantity = 1, Context $context = null)
  • public function getPrice($tax = true, $id_product_attribute = null, $decimals = 6,
    /**
    Get product price
    Same as static function getPriceStatic, no need to specify product id *
    @param boolean $tax With taxes or not (optional)
    @param integer $id_product_attribute Product attribute id (optional)
    @param integer $decimals Number of decimals (optional)
    @param integer $divisor Util when paying many time without fees (optional)
    @return float Product price in euros */
  • public function getPublicPrice($tax = true, $id_product_attribute = null, $decimals = 6,
  • public function getIdProductAttributeMostExpensive()
  • public function getDefaultIdProductAttribute()
  • public function getPriceWithoutReduct($notax = false, $id_product_attribute = false)
  • public static function convertPrice($params, &$smarty)
    /**
    Display price with right format and currency *
    @param array $params Params
    @param $smarty Smarty object
    @return string Price with right format and currency */
  • public static function convertPriceWithCurrency($params, &$smarty)
    /**
    Convert price with currency *
    @param array $params
    @param object $smarty DEPRECATED
    @return Ambigous <string, mixed, Ambigous <number, string>> */
  • public static function displayWtPrice($params, &$smarty)
  • public static function displayWtPriceWithCurrency($params, &$smarty)
    /**
    Display WT price with currency *
    @param array $params
    @param object DEPRECATED $smarty
    @return Ambigous <string, mixed, Ambigous <number, string>> */
  • public static function getQuantity($id_product, $id_product_attribute = null, $cache_is_pack = null)
    /**
    Get available product quantities *
    @param integer $id_product Product id
    @param integer $id_product_attribute Product attribute id (optional)
    @return integer Available quantities */
  • public static function sqlStock($product_alias, $product_attribute = 0, $inner_join = false, Shop $shop = null)
    /**
    Create JOIN query with ‘stock_available’ table *
    @param string $productAlias Alias of product table
    @param string|int $productAttribute If string : alias of PA table ; if int : value of PA ; if null : nothing about PA
    @param bool $innerJoin LEFT JOIN or INNER JOIN
    @param Shop $shop
    @return string */
  • public static function updateQuantity()
    /**
    @deprecated since 1.5.0 *
    It’s not possible to use this method with new stockManager and stockAvailable features
    Now this method do nothing *
    @see StockManager if you want to manage real stock
    @see StockAvailable if you want to manage available quantities for sale on your shop(s) *
    @param array $product Array with ordered product (quantity, id_product_attribute if applicable)
    @return mixed Query result */
  • public static function reinjectQuantities()
    /**
    @deprecated since 1.5.0 *
    It’s not possible to use this method with new stockManager and stockAvailable features
    Now this method do nothing *
    @see StockManager if you want to manage real stock
    @see StockAvailable if you want to manage available quantities for sale on your shop(s) * */
  • public static function isAvailableWhenOutOfStock($out_of_stock)
  • public function checkQty($qty)
    /**
    Check product availability *
    @param integer $qty Quantity desired
    @return boolean True if product is available with this quantity */
  • public function checkDefaultAttributes()
    /**
    Check if there is no default attribute and create it if not */
  • public function getAttributesGroups($id_lang)
    /**
    Get all available attribute groups *
    @param integer $id_lang Language id
    @return array Attribute groups */
  • public function deleteAccessories()
    /**
    Delete product accessories *
    @return mixed Deletion result */
  • public function deleteFromAccessories()
    /**
    Delete product from other products accessories *
    @return mixed Deletion result */
  • public static function getAccessoriesLight($id_lang, $id_product, Context $context = null)
    /**
    Get product accessories (only names) *
    @param integer $id_lang Language id
    @param integer $id_product Product id
    @return array Product accessories */
  • public function getAccessories($id_lang, $active = true, Context $context = null)
    /**
    Get product accessories *
    @param integer $id_lang Language id
    @return array Product accessories */
  • public static function getAccessoryById($accessory_id)
  • public function changeAccessories($accessories_id)
    /**
    Link accessories with product *
    @param array $accessories_id Accessories ids */
  • public function addFeaturesCustomToDB($id_value, $lang, $cust)
    /**
    Add new feature to product */
  • public function addFeaturesToDB($id_feature, $id_value, $cust = 0)
  • public static function addFeatureProductImport($id_product, $id_feature, $id_feature_value)
  • public function getFeatures()
    /**
    Select all features for the object *
    @return array Array with feature product’s data */
  • public static function getFeaturesStatic($id_product)
  • public static function cacheProductsFeatures($product_ids)
  • public static function cacheFrontFeatures($product_ids, $id_lang)
  • public static function searchByName($id_lang, $query, Context $context = null)
    /**
    Admin panel product search *
    @param integer $id_lang Language id
    @param string $query Search query
    @return array Matching products */
  • public static function duplicateAttributes($id_product_old, $id_product_new)
    /**
    Duplicate attributes when duplicating a product *
    @param integer $id_product_old Old product id
    @param integer $id_product_new New product id */
  • public static function _getAttributeImageAssociations($id_product_attribute)
    /**
    Get product attribute image associations
    @param integer $id_product_attribute
    @return array */
  • public static function duplicateAccessories($id_product_old, $id_product_new)
  • public static function duplicateTags($id_product_old, $id_product_new)
  • public static function duplicateDownload($id_product_old, $id_product_new)
  • public static function duplicateAttachments($id_product_old, $id_product_new)
  • public static function duplicateFeatures($id_product_old, $id_product_new)
    /**
    Duplicate features when duplicating a product *
    @param integer $id_product_old Old product id
    @param integer $id_product_old New product id */
  • public static function duplicateSpecificPrices($old_product_id, $product_id)
  • public static function duplicateCustomizationFields($old_product_id, $product_id)
  • public function getLink(Context $context = null)
    /**
    Get the link of the product page of this product */
  • public function getTags($id_lang)
  • public static function defineProductImage($row, $id_lang)
  • public static function getProductProperties($id_lang, $row, Context $context = null)
  • public static function getTaxesInformations($row, Context $context = null)
  • public static function getProductsProperties($id_lang, $query_result)
  • public static function getFrontFeaturesStatic($id_lang, $id_product)
    /*
    Select all features for a given language *
    @param $id_lang Language id
    @return array Array with feature’s data */
  • public function getFrontFeatures($id_lang)
  • public static function getAttachmentsStatic($id_lang, $id_product)
  • public function getAttachments($id_lang)
  • public static function getAllCustomizedDatas($id_cart, $id_lang = null, $only_in_cart = true)
    /* *
    Customization management */
  • public static function addCustomizationPrice(&$products, &$customized_datas)
  • public function createLabels($uploadable_files, $text_fields)
  • public function updateLabels()
  • public function getCustomizationFields($id_lang = false)
  • public function getCustomizationFieldIds()
  • public function getRequiredCustomizableFields()
  • public function hasAllRequiredCustomizableFields(Context $context = null)
  • public static function idIsOnCategoryId($id_product, $categories)
    /**
    Checks if the product is in at least one of the submited categories *
    @param int $id_product
    @param array $categories array of category arrays
    @return boolean is the product in at least one category */
  • public function getNoPackPrice()
  • public function checkAccess($id_customer)
  • public function addStockMvt($quantity, $id_reason, $id_product_attribute = null, $id_order = null, $id_employee = null)
    /**
    Add a stock movement for current product *
    Since 1.5, this method only permit to add/remove available quantities of the current product in the current shop *
    @see StockManager if you want to manage real stock
    @see StockAvailable if you want to manage available quantities for sale on your shop(s) *
    @deprecated since 1.5.0 *
    @param int $quantity
    @param int $id_reason – useless
    @param int $id_product_attribute
    @param int $id_order – useless
    @param int $id_employee – useless
    @return bool */
  • public function getStockMvts($id_lang)
    /**
    @deprecated since 1.5.0 */
  • public static function getUrlRewriteInformations($id_product)
  • public function getIdTaxRulesGroup()
  • public static function getIdTaxRulesGroupByIdProduct($id_product, Context $context = null)
  • public function getTaxesRate(Address $address = null)
    /**
    @return the total taxes rate applied to the product */
  • public function getWsProductFeatures()
    /**
    Webservice getter : get product features association *
    @return array */
  • public function setWsProductFeatures($product_features)
    /**
    Webservice setter : set product features association *
    @param $productFeatures Product Feature ids
    @return boolean */
  • public function getWsDefaultCombination()
    /**
    Webservice getter : get virtual field default combination *
    @return int */
  • public function setWsDefaultCombination($id_combination)
    /**
    Webservice setter : set virtual field default combination *
    @param $id_combination id default combination */
  • public function getWsCategories()
    /**
    Webservice getter : get category ids of current product for association *
    @return array */
  • public function setWsCategories($category_ids)
    /**
    Webservice setter : set category ids of current product for association *
    @param $category_ids category ids */
  • public function getWsAccessories()
    /**
    Webservice getter : get product accessories ids of current product for association *
    @return array */
  • public function setWsAccessories($accessories)
    /**
    Webservice setter : set product accessories ids of current product for association *
    @param $accessories product ids */
  • public function getWsCombinations()
    /**
    Webservice getter : get combination ids of current product for association *
    @return array */
  • public function setWsCombinations($combinations)
    /**
    Webservice setter : set combination ids of current product for association *
    @param $combinations combination ids */
  • public function getWsProductOptionValues()
    /**
    Webservice getter : get product option ids of current product for association *
    @return array */
  • public function getWsPositionInCategory()
    /**
    Webservice getter : get virtual field position in category *
    @return int */
  • public function getCoverWs()
    /**
    Webservice getter : get virtual field id_default_image in category *
    @return int */
  • public function setCoverWs($id_image)
    /**
    Webservice setter : set virtual field id_default_image in category *
    @return bool */
  • public function getWsImages()
    /**
    Webservice getter : get image ids of current product for association *
    @return array */
  • public function getWsStockAvailables()
  • public function getWsTags()
  • public function getWsManufacturerName()
  • public static function resetEcoTax()
  • public function setGroupReduction()
    /**
    Set Group reduction if needed */
  • public function existsRefInDatabase($reference)
    /**
    Checks if reference exists
    @return boolean */
  • public static function getProductAttributesIds($id_product, $shop_only = false)
    /**
    Get all product attributes ids *
    @since 1.5.0
    @param int $id_product the id of the product
    @return array product attribute id list */
  • public static function getAttributesParams($id_product, $id_product_attribute)
    /**
    Get label by lang and value by lang too
    @todo Remove existing module condition
    @param int $id_product
    @param int $product_attribute_id
    @return array */
  • public static function getAttributesInformationsByProduct($id_product)
    /**
    @todo Remove existing module condition
    @param int $id_product */
  • public function getAnchor($id_product_attribute)
    /**
    Get the combination url anchor of the product *
    @param integer $id_product_attribute
    @return string */
  • public static function getProductName($id_product, $id_product_attribute = null, $id_lang = null)
    /**
    Gets the name of a given product, in the given lang *
    @since 1.5.0
    @param int $id_product
    @param int $id_product_attribute Optional
    @param int $id_lang Optional
    @return string */
  • public function addWs($autodate = true, $null_values = false)
  • public function updateWs($null_values = false)
  • public static function getRealQuantity($id_product, $id_product_attribute = 0, $id_warehouse = 0, $id_shop = null)
    /**
    For a given product, returns its real quantity *
    @since 1.5.0
    @param int $id_product
    @param int $id_product_attribute
    @param int $id_warehouse
    @param int $id_shop
    @return int real_quantity */
  • public static function usesAdvancedStockManagement($id_product)
    /**
    For a given product, tells if it uses the advanced stock management *
    @since 1.5.0
    @param int $id_product
    @return bool */
  • public static function flushPriceCache()
    /**
    This method allows to flush price cache
    @static
    @since 1.5.0 */
  • public function getParentCategories($id_lang = null)
    /**
    Get list of parent categories *
    @since 1.5.0
    @param int $id_lang
    @return array */
  • public function loadStockData()
    /**
    Fill the variables used for stock management */
  • public function useAdvancedStockManagement()
  • public function setAdvancedStockManagement($value)
  • public function getDefaultCategory()
    /**
    get the default category according to the shop */
  • public static function getShopsByProduct($id_product)
  • public function deleteDownload()
    /**
    Remove all downloadable files for product and its attributes *
    @return bool */
  • public function getAttributeCombinaisons($id_lang)
    /**
    @deprecated 1.5.0.10
    @see Product::getAttributeCombinations()
    @param int $id_lang */
  • public function deleteAttributeCombinaison($id_product_attribute)
    /**
    @deprecated 1.5.0.10
    @see Product::deleteAttributeCombination()
    @param int $id_product_attribute */
  • public function getType()
    /**
    Get the product type (simple, virtual, pack)
    @since in 1.5.0 *
    @return int */
  • public function hasAttributesInOtherShops()
  • public static function getIdTaxRulesGroupMostUsed()
  • public static function getIdByEan13($ean13)
    /**
    For a given ean13 reference, returns the corresponding id *
    @param string $ean13
    @return int id */
  • public function getWsType()
  • public function getWsProductBundle()

class ProductDownloadCore extends ObjectModel

./classes/ProductDownload.php

  • public function __construct($id_product_download = null)
    /**
    Build a virtual product *
    @param integer $id_product_download Existing productDownload id in order to load object (optional) */
  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public function add($autodate = true, $null_values = false)
  • public function update($null_values = false)
  • public function delete($delete = false)
  • public function deleteFile($id_product_download = null)
    /**
    Delete the file
    @param int $id_product_download : if we need to delete a specific product attribute file *
    @return boolean */
  • public function checkFile()
    /**
    Check if file exists *
    @return boolean */
  • public static function checkWritableDir()
    /**
    Check if download repository is writable *
    @return boolean */
  • public static function getIdFromIdProduct($id_product)
    /**
    Return the id_product_download from an id_product *
    @param int $id_product Product the id
    @return integer Product the id for this virtual product */
  • public static function getIdFromFilename($filename)
    /**
    Return the display filename from a physical filename *
    @since 1.5.0.1 *
    @param string $filename Filename physically
    @return integer Product the id for this virtual product * */
  • public static function getFilenameFromIdProduct($id_product)
    /**
    Return the filename from an id_product *
    @param int $id_product Product the id
    @return string Filename the filename for this virtual product */
  • public static function getFilenameFromFilename($filename)
    /**
    Return the display filename from a physical filename *
    @param string $filename Filename physically
    @return string Filename the display filename for this virtual product */
  • public function getTextLink($admin = true, $hash = false)
    /**
    Return html link *
    @param string $class CSS selector (optionnal)
    @param bool $admin specific to backend (optionnal)
    @param string $hash hash code in table order detail (optionnal)
    @return string Html all the code for print a link to the file */
  • public function getHtmlLink($class = false, $admin = true, $hash = false)
    /**
    Return html link *
    @param string $class CSS selector
    @param bool $admin specific to backend
    @param bool $hash hash code in table order detail
    @return string Html all the code for print a link to the file */
  • public function getDeadline()
    /**
    Return a deadline *
    @return string Datetime in SQL format */
  • public function getHash()
    /**
    Return a hash for control download access *
    @return string Hash ready to insert in database */
  • public static function getNewFilename()
    /**
    Return a sha1 filename *
    @return string Sha1 unique filename */
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */

class ProductSaleCore

./classes/ProductSale.php

  • public static function fillProductSales()
    /* *
    Fill the `product_sale` SQL table with data from `order_detail` *
    @return bool True on success */
  • public static function getNbSales()
    /* *
    Get number of actives products sold *
    @return int number of actives products listed in product_sales */
  • public static function getBestSales($id_lang, $page_number = 0, $nb_products = 10, $order_by = null, $order_way = null)
    /* *
    Get required informations on best sales products ** *
    @param integer $id_lang Language id *
    @param integer $page_number Start from (optional) *
    @param integer $nb_products Number of products to return (optional) *
    @return array from Product::getProductProperties */
  • public static function getBestSalesLight($id_lang, $page_number = 0, $nb_products = 10, Context $context = null)
    /* *
    Get required informations on best sales products ** *
    @param integer $id_lang Language id *
    @param integer $page_number Start from (optional) *
    @param integer $nb_products Number of products to return (optional) *
    @return array keys : id_product, link_rewrite, name, id_image, legend, sales, ean13, upc, link */
  • public static function addProductSale($product_id, $qty = 1)
  • public static function getNbrSales($id_product)
  • public static function removeProductSale($id_product, $qty = 1)

class ProductSupplierCore extends ObjectModel

./classes/ProductSupplier.php

  • public function delete()
    /**
    @see ObjectModel::delete() */
  • public static function getProductSupplierReference($id_product, $id_product_attribute, $id_supplier)
    /**
    For a given product and supplier, gets the product supplier reference *
    @param int $id_product
    @param int $id_product_attribute
    @param int $id_supplier
    @return string */
  • public static function getProductSupplierPrice($id_product, $id_product_attribute, $id_supplier, $with_currency = false)
    /**
    For a given product and supplier, gets the product supplier unit price *
    @param int $id_product
    @param int $id_product_attribute
    @param int $id_supplier
    @param bool $with_currency Optional
    @return array */
  • public static function getIdByProductAndSupplier($id_product, $id_product_attribute, $id_supplier)
    /**
    For a given product and supplier, gets corresponding ProductSupplier ID *
    @param int $id_product
    @param int $id_product_attribute
    @param int $id_supplier
    @return array */
  • public static function getSupplierCollection($id_product, $group_by_supplier = true)
    /**
    For a given product, retrieves its suppliers *
    @param int $id_product
    @param int $group_by_supplier
    @return Collection */
  • public static function getProductPrice($id_supplier, $id_product, $id_product_attribute = 0)
    /**
    For a given Supplier, Product, returns the purchased price *
    @param int $id_product
    @param int $id_product_attribute Optional
    @return Array keys: price_te, id_currency */

class ProfileCore extends ObjectModel

./classes/Profile.php

  • public static function getProfiles($id_lang)
    /**
    Get all available profiles *
    @return array Profiles */
  • public static function getProfile($id_profile, $id_lang = null)
    /**
    Get the current profile name *
    @return string Profile */
  • public function add($autodate = true, $null_values = false)
  • public function delete()
  • public static function getProfileAccess($id_profile, $id_tab)
  • public static function getProfileAccesses($id_profile, $type = ‘id_tab’)

class QuickAccessCore extends ObjectModel

./classes/QuickAccess.php

  • public static function getQuickAccesses($id_lang)
    /**
    Get all available quick_accesses *
    @return array QuickAccesses */

class ReferrerCore extends ObjectModel

./classes/Referrer.php

  • public function add($autodate = true, $null_values = false)
  • public static function cacheNewSource($id_connections_source)
  • public static function getReferrers($id_customer)
    /**
    Get list of referrers connections of a customer
    @param int $id_customer */
  • public function getStatsVisits($id_product, $employee)
    /**
    Get some statistics on visitors connection for current referrer
    @param int $id_product
    @param int $employee
    @param Context $context */
  • public function getRegistrations($id_product, $employee)
    /**
    Get some statistics on customers registrations for current referrer
    @param int $id_product
    @param int $employee
    @param Context $context */
  • public function getStatsSales($id_product, $employee)
    /**
    Get some statistics on orders for current referrer
    @param int $id_product
    @param int $employee */
  • public static function refreshCache($referrers = null, $employee = null)
    /**
    Refresh cache data of referrer statistics in referrer_shop table *
    @param array $referrers
    @param int $employee */
  • public static function refreshIndex($referrers = null)
    /**
    Cache liaison between connections_source data and referrers data *
    @param array $referrers */
  • public static function getAjaxProduct($id_referrer, $id_product, $employee = null)

class RequestSqlCore extends ObjectModel

./classes/RequestSql.php

  • public static function getRequestSql()
    /**
    Get list of request SQL *
    @static
    @return array|bool */
  • public static function getRequestSqlById($id)
    /**
    Get list of request SQL by id request *
    @static
    @param $id
    @return array */
  • public function parsingSql($sql)
    /**
    Call the parserSQL() method in Tools class
    Cut the request in table for check it *
    @param $sql
    @return bool */
  • public function validateParser($tab, $in = false, $sql)
    /**
    Check if the parsing of the SQL request is good or not *
    @param $tab
    @param bool $in
    @param $sql
    @return bool */
  • public function validateSql($tab, $in, $sql)
    /**
    Cut the request for check each cutting *
    @param $tab
    @param $in
    @param $sql
    @return bool */
  • public function getTables()
    /**
    Get list of all tables *
    @return array */
  • public function getAttributesByTable($table)
    /**
    Get list of all attributes by an table *
    @param $table
    @return array */
  • public function cutJoin($attrs, $from)
    /**
    Cut an join sentence *
    @param $attrs
    @param $from
    @return array|bool */
  • public function cutAttribute($attr, $from)
    /**
    Cut an attribute with or without the alias *
    @param $attr
    @param $from
    @return array|bool */
  • public function returnNameTable($alias = false, $tables)
    /**
    Get name of table by alias *
    @param bool $alias
    @param $tables
    @return array|bool */
  • public function attributExistInTable($attr, $table)
    /**
    Check if an attributes existe in an table *
    @param $attr
    @param $table
    @return bool */
  • public function testedRequired($tab)
    /**
    Check if all required sentence existing *
    @param $tab
    @return bool */
  • public function testedUnauthorized($tab)
    /**
    Check if an unauthorized existing in an array *
    @param $tab
    @return bool */
  • public function checkedFrom($from)
    /**
    Check a « FROM » sentence *
    @param $from
    @return bool */
  • public function checkedSelect($select, $from, $in = false)
    /**
    Check a « SELECT » sentence *
    @param $select
    @param $from
    @param bool $in
    @return bool */
  • public function checkedWhere($where, $from, $sql)
    /**
    Check a « WHERE » sentence *
    @param $where
    @param $from
    @param $sql
    @return bool */
  • public function checkedHaving($having, $from)
    /**
    Check a « HAVING » sentence *
    @param $having
    @param $from
    @return bool */
  • public function checkedOrder($order, $from)
    /**
    Check a « ORDER » sentence *
    @param $order
    @param $from
    @return bool */
  • public function checkedGroupBy($group, $from)
    /**
    Check a « GROUP BY » sentence *
    @param $group
    @param $from
    @return bool */
  • public function checkedLimit($limit)
    /**
    Check a « LIMIT » sentence *
    @param $limit
    @return bool */

class RijndaelCore

./classes/Rijndael.php

  • public function __construct($key, $iv)
  • public function encrypt($plaintext)
    /**
    Base64 is not required, but it is be more compact than urlencode *
    @param string $plaintext
    @return bool|string */
  • public function decrypt($ciphertext)

class RiskCore extends ObjectModel

./classes/Risk.php

  • public function getFields()
  • public function getTranslationsFieldsChild()
    /**
    Check then return multilingual fields for database interaction *
    @return array Multilingual fields */
  • public static function getRisks($id_lang = null)

class SceneCore extends ObjectModel

./classes/Scene.php

  • public function __construct($id = null, $id_lang = null, $lite_result = true, $hide_scene_position = false)
  • public function update($null_values = false)
  • public function add($autodate = true, $null_values = false)
  • public function delete()
  • public function deleteImage($force_delete = false)
  • public function addCategories($categories)
  • public function deleteCategories()
  • public function updateCategories()
  • public function addZoneProducts($zones)
  • public function deleteZoneProducts()
  • public function updateZoneProducts()
  • public static function getScenes($id_category, $id_lang = null, $only_active = true, $lite_result = true, $hide_scene_position = true, Context $context = null)
    /**
    Get all scenes of a category *
    @return array Products */
  • public function getProducts($only_active = true, $id_lang = null, $lite_result = true, Context $context = null)
    /**
    Get all products of this scene *
    @return array Products */
  • public static function getIndexedCategories($id_scene)
    /**
    Get categories where scene is indexed *
    @param integer $id_scene Scene id
    @return array Categories where scene is indexed */
  • public static function hideScenePosition($name)
    /**
    Hide scene prefix used for position *
    @param string $name Scene name
    @return string Name without position */
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */

class SearchCore

./classes/Search.php

  • public static function sanitize($string, $id_lang, $indexation = false)
  • public static function find($id_lang, $expr, $page_number = 1, $page_size = 1, $order_by = ‘position’,
  • public static function getTags($db, $id_product, $id_lang)
  • public static function getAttributes($db, $id_product, $id_lang)
  • public static function getFeatures($db, $id_product, $id_lang)
  • public static function indexation($full = false, $id_product = false)
  • public static function searchTag($id_lang, $tag, $count = false, $pageNumber = 0, $pageSize = 10, $orderBy = false, $orderWay = false,

class SearchEngineCore extends ObjectModel

./classes/SearchEngine.php

  • public static function getKeywords($url)

class SpecificPriceCore extends ObjectModel

./classes/SpecificPrice.php

  • public function add($autodate = true, $nullValues = false)
  • public function update($null_values = false)
  • public function delete()
  • public static function getByProductId($id_product, $id_product_attribute = false, $id_cart = false)
  • public static function deleteByIdCart($id_cart, $id_product = false, $id_product_attribute = false)
  • public static function getIdsByProductId($id_product, $id_product_attribute = false, $id_cart = 0)
  • public static function getPriority($id_product)
  • public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0)
  • public static function setPriorities($priorities)
  • public static function deletePriorities()
  • public static function setSpecificPriority($id_product, $priorities)
  • public static function getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_product_attribute = null, $all_combinations = false, $id_customer = 0)
  • public static function getQuantityDiscount($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0)
  • public static function getProductIdByDate($id_shop, $id_currency, $id_country, $id_group, $beginning, $ending, $id_customer = 0, $with_combination_id = false)
  • public static function deleteByProductId($id_product)
  • public function duplicate($id_product = false)
  • public static function isFeatureActive()
    /**
    This method is allow to know if a feature is used or active
    @since 1.5.0.1
    @return bool */
  • public static function exists($id_product, $id_product_attribute, $id_shop, $id_group, $id_country, $id_currency, $id_customer, $from_quantity, $from, $to, $rule = false)

class SpecificPriceRuleCore extends ObjectModel

./classes/SpecificPriceRule.php

  • public function delete()
  • public function deleteConditions()
  • public function addConditions($conditions)
  • public function apply($products = false)
  • public function resetApplication($products = false)
  • public static function applyAllRules($products = false)
  • public function getConditions()
  • public function getAffectedProducts($products = false)
  • public static function applyRuleToProduct($id_rule, $id_product, $id_product_attribute = null)

class StateCore extends ObjectModel

./classes/State.php

  • public static function getStates($id_lang = false, $active = false)
  • public static function getNameById($id_state)
    /**
    Get a state name with its ID *
    @param integer $id_state Country ID
    @return string State name */
  • public static function getIdByName($state)
    /**
    Get a state id with its name *
    @param string $id_state Country ID
    @return integer state id */
  • public static function getIdByIso($iso_code, $id_country = null)
    /**
    Get a state id with its iso code *
    @param string $iso_code Iso code
    @return integer state id */
  • public function delete()
    /**
    Delete a state only if is not in use *
    @return boolean */
  • public function isUsed()
    /**
    Check if a state is used *
    @return boolean */
  • public function countUsed()
    /**
    Returns the number of utilisation of a state *
    @return integer count for this state */
  • public static function getStatesByIdCountry($id_country)
  • public static function hasCounties($id_state)
  • public static function getIdZone($id_state)
  • public function affectZoneToSelection($ids_states, $id_zone)
    /**
    @param $ids_states
    @param $id_zone
    @return bool */

class StoreCore extends ObjectModel

./classes/Store.php

  • public function __construct($id_store = null, $id_lang = null)
  • public function getWsHours()
  • public function setWsHours($hours)

class SupplierCore extends ObjectModel

./classes/Supplier.php

  • public function __construct($id = null, $id_lang = null)
  • public function getLink()
  • public static function getSuppliers($get_nb_products = false, $id_lang = 0, $active = true, $p = false, $n = false, $all_groups = false)
    /**
    Return suppliers *
    @return array Suppliers */
  • public static function getNameById($id_supplier)
  • public static function getIdByName($name)
  • public static function getProducts($id_supplier, $id_lang, $p, $n,
  • public function getProductsLite($id_lang)
  • public static function supplierExists($id_supplier)
    /*
    Tells if a supplier exists *
    @param $id_supplier Supplier id
    @return boolean */
  • public function delete()
    /**
    @see ObjectModel::delete() */
  • public static function getProductInformationsBySupplier($id_supplier, $id_product, $id_product_attribute = 0)
    /**
    Gets product informations *
    @since 1.5.0
    @param int $id_supplier
    @param int $id_product
    @param int $id_product_attribute
    @return array */

class TabCore extends ObjectModel

./classes/Tab.php

  • public function add($autodate = true, $null_values = false)
    /**
    additionnal treatments for Tab when creating new one :
    – generate a new position
    – add access for admin profile *
    @param boolean $autodate
    @param boolean $null_values
    @return int id_tab */
  • public static function initAccess($id_tab, Context $context = null)
    /*
    When creating a new tab $id_tab, this add default rights to the table access *
    @todo this should not be public static but protected
    @param int $id_tab
    @param Context $context
    @return boolean true if succeed */
  • public function delete()
  • public static function getCurrentTabId()
    /**
    Get tab id *
    @return integer tab id */
  • public static function getCurrentParentId()
    /**
    Get tab parent id *
    @return integer tab parent id */
  • public static function getTab($id_lang, $id_tab)
    /**
    Get tab *
    @return array tab */
  • public static function getModuleTabList()
    /**
    Return the list of tab used by a module *
    @static
    @return array */
  • public static function getTabs($id_lang, $id_parent = null)
  • public static function getIdFromClassName($class_name)
    /**
    Get tab id from name *
    @param string class_name
    @return int id_tab */
  • public static function getCollectionFromModule($module, $id_lang = null)
    /**
    Get collection from module name
    @static
    @param $module string Module name
    @param null $id_lang integer Language ID
    @return array|Collection Collection of tabs (or empty array) */
  • public static function enablingForModule($module)
    /**
    Enabling tabs for module
    @static
    @param $module string Module Name
    @return bool Status */
  • public static function disablingForModule($module)
    /**
    Disabling tabs for module
    @static
    @param $module string Module name
    @return bool Status */
  • public static function getInstanceFromClassName($class_name)
    /**
    Get Instance from tab class name *
    @param $class_name string Name of tab class
    @return Tab Tab object (empty if bad id or class name) */
  • public static function getNbTabs($id_parent = null)
  • public static function getNewLastPosition($id_parent)
    /**
    return an available position in subtab for parent $id_parent *
    @param mixed $id_parent
    @return int */
  • public function move($direction)
  • public function cleanPositions($id_parent)
  • public function updatePosition($way, $position)
  • public static function checkTabRights($id_tab)
  • public static function recursiveTab($id_tab, $tabs)
  • public function update($null_values = false)
    /**
    Overrides update to set position to last when changing parent tab *
    @see ObjectModel::update
    @param bool $null_values
    @return bool */
  • public static function getTabByIdProfile($id_parent, $id_profile)
  • public static function getClassNameById($id_tab)
    /**
    @since 1.5.0 */
  • public static function getTabModulesList($id_tab)

class TagCore extends ObjectModel

./classes/Tag.php

  • public function __construct($id = null, $name = null, $id_lang = null)
  • public function add($autodate = true, $null_values = false)
  • public static function addTags($id_lang, $id_product, $tag_list, $separator = ‘,’)
    /**
    Add several tags in database and link it to a product *
    @param integer $id_lang Language id
    @param integer $id_product Product id to link tags with
    @param string|array $tag_list List of tags, as array or as a string with comas
    @return boolean Operation success */
  • public static function getMainTags($id_lang, $nb = 10)
  • public static function getProductTags($id_product)
  • public function getProducts($associated = true, Context $context = null)
  • public function setProducts($array)
  • public static function deleteTagsForProduct($id_product)

class ThemeCore extends ObjectModel

./classes/Theme.php

  • public static function getThemes()
  • public static function getAvailable($installed_only = true)
    /**
    return an array of all available theme (installed or not)
    @param boolean $installed_only
    @return array string (directory) */
  • public function isUsed()
    /**
    check if a theme is used by a shop
    @return boolean */
  • public function add($autodate = true, $null_values = false)
    /**
    add only theme if the directory exists
    @param bool $null_values
    @param bool $autodate
    @return boolean Insertion result */

class ToolsCore

./classes/Tools.php

  • public static function passwdGen($length = 8, $flag = ‘ALPHANUMERIC’)
    /**
    Random password generator *
    @param integer $length Desired length (optional)
    @param string $flag Output type (NUMERIC, ALPHANUMERIC, NO_NUMERIC)
    @return string Password */
  • public static function strReplaceFirst($search, $replace, $subject, $cur = 0)
  • public static function redirect($url, $base_uri = __PS_BASE_URI__, Link $link = null, $headers = null)
    /**
    Redirect user to another page *
    @param string $url Desired URL
    @param string $baseUri Base URI (optional)
    @param Link $link
    @param string|array $headers A list of headers to send before redirection */
  • public static function redirectLink($url)
    /**
    Redirect URLs already containing PS_BASE_URI *
    @param string $url Desired URL */
  • public static function redirectAdmin($url)
    /**
    Redirect user to another admin page *
    @param string $url Desired URL */
  • public static function getShopProtocol()
    /**
    getShopProtocol return the available protocol for the current shop in use
    SSL if Configuration is set on and available for the server
    @static
    @return String */
  • public static function getProtocol($use_ssl = null)
    /**
    getProtocol return the set protocol according to configuration (http[s])
    @param bool $use_ssl true if require ssl
    @return String (http|https) */
  • public static function getHttpHost($http = false, $entities = false, $ignore_port = false)
    /**
    getHttpHost return the current host used, with the protocol (http or https) if $http is true
    This function should not be used to choose http or https domain name.
    Use Tools::getShopDomain() or Tools::getShopDomainSsl instead *
    @param boolean $http
    @param boolean $entities
    @return string host */
  • public static function getShopDomain($http = false, $entities = false)
    /**
    getShopDomain returns domain name according to configuration and ignoring ssl *
    @param boolean $http if true, return domain name with protocol
    @param boolean $entities if true,
    @return string domain */
  • public static function getShopDomainSsl($http = false, $entities = false)
    /**
    getShopDomainSsl returns domain name according to configuration and depending on ssl activation *
    @param boolean $http if true, return domain name with protocol
    @param boolean $entities if true,
    @return string domain */
  • public static function getServerName()
    /**
    Get the server variable SERVER_NAME *
    @return string server name */
  • public static function getRemoteAddr()
    /**
    Get the server variable REMOTE_ADDR, or the first ip of HTTP_X_FORWARDED_FOR (when using proxy) *
    @return string $remote_addr ip of client */
  • public static function usingSecureMode()
    /**
    Check if the current page use SSL connection on not *
    @return bool uses SSL */
  • public static function getCurrentUrlProtocolPrefix()
    /**
    Get the current url prefix protocol (https/http) *
    @return string protocol */
  • public static function secureReferrer($referrer)
    /**
    Secure an URL referrer *
    @param string $referrer URL referrer
    @return string secured referrer */
  • public static function getValue($key, $default_value = false)
    /**
    Get a value from $_POST / $_GET
    if unavailable, take a default value *
    @param string $key Value key
    @param mixed $default_value (optional)
    @return mixed Value */
  • public static function getIsset($key)
  • public static function setCookieLanguage($cookie = null)
    /**
    Change language in cookie while clicking on a flag *
    @return string iso code */
  • public static function switchLanguage(Context $context = null)
    /**
    Set cookie id_lang */
  • public static function setCurrency($cookie)
    /**
    Set cookie currency from POST or default currency *
    @return Currency object */
  • public static function displayPrice($price, $currency = null, $no_utf8 = false, Context $context = null)
    /**
    Return price with currency sign for a given product *
    @param float $price Product price
    @param object $currency Current currency (object, id_currency, NULL => context currency)
    @return string Price correctly formated (sign, decimal separator…) */
  • public static function displayPriceSmarty($params, &$smarty)
  • public static function convertPrice($price, $currency = null, $to_currency = true, Context $context = null)
    /**
    Return price converted *
    @param float $price Product price
    @param object $currency Current currency object
    @param boolean $to_currency convert to currency or from currency to default currency */
  • public static function convertPriceFull($amount, Currency $currency_from = null, Currency $currency_to = null)
    /** *
    Convert amount from a currency to an other currency automatically
    @param float $amount
    @param Currency $currency_from if null we used the default currency
    @param Currency $currency_to if null we used the default currency */
  • public static function dateFormat($params, &$smarty)
    /**
    Display date regarding to language preferences *
    @param array $params Date, format…
    @param object $smarty Smarty object for language preferences
    @return string Date */
  • public static function displayDate($date, $id_lang, $full = false, $separator = ‘-‘)
    /**
    Display date regarding to language preferences *
    @param string $date Date to display format UNIX
    @param integer $id_lang Language id
    @param boolean $full With time or not (optional)
    @param string $separator DEPRECATED
    @return string Date */
  • public static function safeOutput($string, $html = false)
    /**
    Sanitize a string *
    @param string $string String to sanitize
    @param boolean $full String contains HTML or not (optional)
    @return string Sanitized string */
  • public static function htmlentitiesUTF8($string, $type = ENT_QUOTES)
  • public static function htmlentitiesDecodeUTF8($string)
  • public static function safePostVars()
  • public static function deleteDirectory($dirname, $delete_self = true)
    /**
    Delete directory and subdirectories *
    @param string $dirname Directory name */
  • public static function displayError($string = ‘Fatal error’, $htmlentities = true, Context $context = null)
    /**
    Display an error according to an error code *
    @param string $string Error message
    @param boolean $htmlentities By default at true for parsing error message with htmlentities */
  • public static function dieObject($object, $kill = true)
    /**
    Display an error with detailed object *
    @param mixed $object
    @param boolean $kill
    @return $object if $kill = false; */
  • public static function fd($object, $type = ‘log’)
    /**
    Display a var dump in firebug console *
    @param object $object Object to display */
  • public static function d($object, $kill = true)
    /**
    ALIAS OF dieObject() – Display an error with detailed object *
    @param object $object Object to display */
  • public static function p($object)
    /**
    ALIAS OF dieObject() – Display an error with detailed object but don’t stop the execution *
    @param object $object Object to display */
  • public static function isSubmit($submit)
    /**
    Check if submit has been posted *
    @param string $submit submit name */
  • public static function getMetaTags($id_lang, $page_name, $title = »)
    /**
    @deprecated 1.5.0 */
  • public static function getHomeMetaTags($id_lang, $page_name)
    /**
    @deprecated 1.5.0 */
  • public static function completeMetaTags($meta_tags, $default_value, Context $context = null)
    /**
    @deprecated 1.5.0 */
  • public static function encrypt($passwd)
    /**
    Encrypt password *
    @param string $passwd String to encrypt */
  • public static function getToken($page = true, Context $context = null)
    /**
    Get token to prevent CSRF *
    @param string $token token to encrypt */
  • public static function getAdminToken($string)
    /**
    Tokenize a string *
    @param string $string string to encript */
  • public static function getAdminTokenLite($tab, Context $context = null)
  • public static function getAdminTokenLiteSmarty($params, &$smarty)
  • public static function getPath($id_category, $path = », $link_on_the_item = false, $category_type = ‘products’, Context $context = null)
    /**
    Get the user’s journey *
    @param integer $id_category Category ID
    @param string $path Path end
    @param boolean $linkOntheLastItem Put or not a link on the current category
    @param string [optionnal] $categoryType defined what type of categories is used (products or cms) */
  • public static function getFullPath($id_category, $end, $type_cat = ‘products’, Context $context = null)
    /**
    @param string [optionnal] $type_cat defined what type of categories is used (products or cms) */
  • public static function link_rewrite($str, $utf8_decode = false)
    /**
    Return the friendly url from the provided string *
    @param string $str
    @param bool $utf8_decode => needs to be marked as deprecated
    @return string */
  • public static function str2url($str)
    /**
    Return a friendly url made from the provided string
    If the mbstring library is available, the output is the same as the js function of the same name *
    @param string $str
    @return string */
  • public static function replaceAccentedChars($str)
    /**
    Replace all accented chars by their equivalent non accented chars. *
    @param string $str
    @return string */
  • public static function truncate($str, $max_length, $suffix = ‘…’)
    /
    CAUTION : Use it only on module hookEvents. *
    For other purposes use the smarty function instead */
  • public static function dateYears()
    /**
    Generate date form *
    @param integer $year Year to select
    @param integer $month Month to select
    @param integer $day Day to select
    @return array $tab html data with 3 cells :[‘days’], [‘months’], [‘years’] * */
  • public static function dateDays()
  • public static function dateMonths()
  • public static function hourGenerate($hours, $minutes, $seconds)
  • public static function dateFrom($date)
  • public static function dateTo($date)
  • public static function strtolower($str)
  • public static function strlen($str, $encoding = ‘UTF-8’)
  • public static function stripslashes($string)
  • public static function strtoupper($str)
  • public static function substr($str, $start, $length = false, $encoding = ‘utf-8’)
  • public static function ucfirst($str)
  • public static function orderbyPrice(&$array, $order_way)
  • public static function iconv($from, $to, $string)
  • public static function isEmpty($field)
  • public static function ps_round($value, $precision = 0)
    /**
    returns the rounded value of $value to specified precision, according to your configuration; *
    @note : PHP 5.3.0 introduce a 3rd parameter mode in round function *
    @param float $value
    @param int $precision
    @return float */
  • public static function ceilf($value, $precision = 0)
    /**
    returns the rounded value down of $value to specified precision *
    @param float $value
    @param int $precision
    @return float */
  • public static function floorf($value, $precision = 0)
    /**
    returns the rounded value up of $value to specified precision *
    @param float $value
    @param int $precision
    @return float */
  • public static function file_exists_cache($filename)
    /**
    file_exists() wrapper with cache to speedup performance *
    @param string $filename File name
    @return boolean Cached result of file_exists($filename) */
  • public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5)
  • public static function simplexml_load_file($url, $class_name = null)
  • public static function minifyHTML($html_content)
    /**
    @deprecated as of 1.5 use Media::minifyHTML() */
  • * @prototype string public static function toCamelCase(string $str[, bool $catapitalise_first_char = false])
  • public static function toCamelCase($str, $catapitalise_first_char = false)
    /**
    Translates a string with underscores into camel case (e.g. first_name -> firstName)
    @prototype string public static function toCamelCase(string $str[, bool $catapitalise_first_char = false]) */
  • public static function toUnderscoreCase($string)
    /**
    Transform a CamelCase string to underscore_case string *
    @param string $string
    @return string */
  • public static function getBrightness($hex)
  • public static function minifyHTMLpregCallback($preg_matches)
    /**
    @deprecated as of 1.5 use Media::minifyHTMLpregCallback() */
  • public static function packJSinHTML($html_content)
    /**
    @deprecated as of 1.5 use Media::packJSinHTML() */
  • public static function packJSinHTMLpregCallback($preg_matches)
    /**
    @deprecated as of 1.5 use Media::packJSinHTMLpregCallback() */
  • public static function packJS($js_content)
    /**
    @deprecated as of 1.5 use Media::packJS() */
  • public static function parserSQL($sql)
  • public static function minifyCSS($css_content, $fileuri = false)
    /**
    @deprecated as of 1.5 use Media::minifyCSS() */
  • public static function replaceByAbsoluteURL($matches)
  • public static function addJS($js_uri)
    /**
    addJS load a javascript file in the header *
    @deprecated as of 1.5 use FrontController->addJS()
    @param mixed $js_uri
    @return void */
  • public static function addCSS($css_uri, $css_media_type = ‘all’)
    /**
    @deprecated as of 1.5 use FrontController->addCSS() */
  • public static function cccCss($css_files)
    /**
    @deprecated as of 1.5 use Media::cccCss() */
  • public static function cccJS($js_files)
    /**
    @deprecated as of 1.5 use Media::cccJS() */
  • public static function getMediaServer($filename)
  • public static function generateHtaccess($path = null, $rewrite_settings = null, $cache_control = null, $specific = », $disable_multiviews = null, $medias = false, $disable_modsec = null)
  • public static function getDefaultIndexContent()
  • public static function jsonDecode($json, $assoc = false)
    /**
    jsonDecode convert json string to php array / object *
    @param string $json
    @param boolean $assoc (since 1.4.2.4) if true, convert to associativ array
    @return array */
  • public static function jsonEncode($data)
    /**
    Convert an array to json string *
    @param array $data
    @return string json */
  • public static function displayAsDeprecated($message = null)
    /**
    Display a warning message indicating that the method is deprecated */
  • public static function displayParameterAsDeprecated($parameter)
    /**
    Display a warning message indicating that the parameter is deprecated */
  • public static function displayFileAsDeprecated()
  • public static function enableCache($level = 1, Context $context = null)
  • public static function restoreCacheSettings(Context $context = null)
  • public static function isCallable($function)
  • public static function pRegexp($s, $delim)
  • public static function str_replace_once($needle, $replace, $haystack)
  • public static function property_exists($class, $property)
    /**
    Function property_exists does not exist in PHP < 5.1 *
    @deprecated since 1.5.0 (PHP 5.1 required, so property_exists() is now natively supported)
    @param object or class $class
    @param string $property
    @return boolean */
  • public static function checkPhpVersion()
    /**
    @desc identify the version of php
    @return string */
  • public static function ZipTest($from_file)
    /**
    @desc try to open a zip file in order to check if it’s valid
    @return bool success */
  • public static function getSafeModeStatus()
  • public static function ZipExtract($from_file, $to_dir)
    /**
    @desc extract a zip file to the given directory
    @return bool success */
  • public static function getProductsOrder($type, $value = null, $prefix = false)
    /**
    Get products order field name for queries. *
    @param string $type by|way
    @param string $value If no index given, use default order from admin -> pref -> products
    @param bool|\bool(false)|string $prefix *
    @return string Order by sql clause */
  • public static function convertBytes($value)
    /**
    Convert a shorthand byte value from a PHP configuration directive to an integer value
    @param string $value value to convert
    @return int */
  • public static function display404Error()
  • public static function url($begin, $end)
    /**
    Concat $begin and $end, add ? or & between strings *
    @since 1.5.0
    @param string $begin
    @param string $end
    @return string */
  • public static function dieOrLog($msg, $die = true)
    /**
    Display error and dies or silently log the error. *
    @param string $msg
    @param bool $die
    @return bool success of logging */
  • public static function nl2br($str)
    /**
    Convert \n and \r\n and \r to
    *
    @param string $string String to transform
    @return string New string */
  • public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null)
    /**
    Clear cache for Smarty *
    @param Smarty $smarty */
  • public static function getMemoryLimit()
    /**
    getMemoryLimit allow to get the memory limit in octet *
    @since 1.4.5.0
    @return int the memory limit value in octet */
  • public static function getOctets($option)
    /**
    getOctet allow to gets the value of a configuration option in octet *
    @since 1.5.0
    @return int the value of a configuration option in octet */
  • public static function isX86_64arch()
    /** *
    @return bool true if the server use 64bit arch */
  • public static function getMaxUploadSize($max_size = 0)
    /**
    Get max file upload size considering server settings and optional max value *
    @param int $max_size optional max file size
    @return int max file size in bytes */
  • public static function apacheModExists($name)
    /**
    apacheModExists return true if the apache module $name is loaded
    @TODO move this method in class Information (when it will exist) *
    Notes: This method requires either apache_get_modules or phpinfo()
    to be available. With CGI mod, we cannot get php modules *
    @param string $name module name
    @return boolean true if exists
    @since 1.4.5.0 */
  • public static function scandir($path, $ext = ‘php’, $dir = », $recursive = false)
    /* *
    @return array List of file found
    @since 1.5.0 */
  • public static function version_compare($v1, $v2, $operator = ‘<‘)
    /**
    Align version sent and use internal function *
    @static
    @param $v1
    @param $v2
    @param string $operator
    @return mixed */
  • public static function alignVersionNumber(&$v1, &$v2)
    /**
    Align 2 version with the same number of sub version
    version_compare will work better for its comparison ?
    (Means: ‘1.8’ to ‘1.9.3’ will change ‘1.8’ to ‘1.8.0’)
    @static
    @param $v1
    @param $v2 */
  • public static function modRewriteActive()
  • public static function unSerialize($serialized, $object = false)
  • public static function arrayUnique($array)
    /**
    Reproduce array_unique working before php version 5.2.9
    @param array $array
    @return array */
  • public static function cleanNonUnicodeSupport($pattern)
    /**
    Delete unicode class from regular expression patterns
    @param string $pattern
    @return pattern */
  • public static function addonsRequest($request, $params = array())

class TranslateCore

./classes/Translate.php

  • public static function getAdminTranslation($string, $class = ‘AdminTab’, $addslashes = false, $htmlentities = true, $sprintf = null)
    /**
    Get a translation for an admin controller *
    @param $string
    @param string $class
    @param bool $addslashes
    @param bool $htmlentities
    @return string */
  • public static function getGenericAdminTranslation($string, $key = null, &$lang_array)
    /**
    Return the translation for a string if it exists for the base AdminController or for helpers *
    @static
    @param $string string to translate
    @param null $key md5 key if already calculated (optional)
    @param $lang_array global array of admin translations
    @return string translation */
  • public static function getModuleTranslation($module, $string, $source, $sprintf = null, $js = false)
    /**
    Get a translation for a module *
    @param string|Module $module
    @param string $string
    @param string $source
    @return string */
  • public static function getPdfTranslation($string)
    /**
    Get a translation for a PDF *
    @param string $string
    @return string */
  • public static function checkAndReplaceArgs($string, $args)
    /**
    Check if string use a specif syntax for sprintf and replace arguments if use it *
    @param $string
    @param $args
    @return string */

class TranslatedConfigurationCore extends Configuration

./classes/TranslatedConfiguration.php

  • public function __construct($id = NULL, $id_lang = NULL)
  • public function add($autodate = true, $nullValues = false)
  • public function update($nullValues = false)
  • public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)

class UpgraderCore

./classes/Upgrader.php

  • public function __construct($autoload = false)
  • public function __get($var)
  • public function downloadLast($dest, $filename = ‘prestashop.zip’)
    /**
    downloadLast download the last version of PrestaShop and save it in $dest/$filename *
    @param string $dest directory where to save the file
    @param string $filename new filename
    @return boolean *
    @TODO ftp if copy is not possible (safe_mode for example) */
  • public function isLastVersion()
  • public function checkPSVersion($force = false)
    /**
    checkPSVersion ask to prestashop.com if there is a new version. return an array if yes, false otherwise *
    @return mixed */
  • public function loadFromConfig()
    /**
    load the last version informations stocked in base *
    @return $this */
  • public function getChangedFilesList()
    /**
    return an array of files
    that the md5file does not match to the original md5file (provided by $rss_md5file_link_dir )
    @return void */
  • public function isAuthenticPrestashopVersion()

class ValidateCore

./classes/Validate.php

  • public static function isIp2Long($ip)
  • public static function isAnything()
  • public static function isEmail($email)
    /**
    Check for e-mail validity *
    @param string $email e-mail address to validate
    @return boolean Validity is ok or not */
  • public static function isModuleUrl($url, &$errors)
    /**
    Check for module URL validity *
    @param string $url module URL to validate
    @param array $errors Reference array for catching errors
    @return boolean Validity is ok or not */
  • public static function isMd5($md5)
    /**
    Check for MD5 string validity *
    @param string $md5 MD5 string to validate
    @return boolean Validity is ok or not */
  • public static function isSha1($sha1)
    /**
    Check for SHA1 string validity *
    @param string $sha1 SHA1 string to validate
    @return boolean Validity is ok or not */
  • public static function isFloat($float)
    /**
    Check for a float number validity *
    @param float $float Float number to validate
    @return boolean Validity is ok or not */
  • public static function isUnsignedFloat($float)
  • public static function isOptFloat($float)
    /**
    Check for a float number validity *
    @param float $float Float number to validate
    @return boolean Validity is ok or not */
  • public static function isCarrierName($name)
    /**
    Check for a carrier name validity *
    @param string $name Carrier name to validate
    @return boolean Validity is ok or not */
  • public static function isImageSize($size)
    /**
    Check for an image size validity *
    @param string $size Image size to validate
    @return boolean Validity is ok or not */
  • public static function isName($name)
    /**
    Check for name validity *
    @param string $name Name to validate
    @return boolean Validity is ok or not */
  • public static function isHookName($hook)
    /**
    Check for hook name validity *
    @param string $hook Hook name to validate
    @return boolean Validity is ok or not */
  • public static function isMailName($mail_name)
    /**
    Check for sender name validity *
    @param string $mail_name Sender name to validate
    @return boolean Validity is ok or not */
  • public static function isMailSubject($mail_subject)
    /**
    Check for e-mail subject validity *
    @param string $mail_subject e-mail subject to validate
    @return boolean Validity is ok or not */
  • public static function isModuleName($module_name)
    /**
    Check for module name validity *
    @param string $module_name Module name to validate
    @return boolean Validity is ok or not */
  • public static function isTplName($tpl_name)
    /**
    Check for template name validity *
    @param string $tpl_name Template name to validate
    @return boolean Validity is ok or not */
  • public static function isImageTypeName($type)
    /**
    Check for image type name validity *
    @param string $type Image type name to validate
    @return boolean Validity is ok or not */
  • public static function isPrice($price)
    /**
    Check for price validity *
    @param string $price Price to validate
    @return boolean Validity is ok or not */
  • public static function isNegativePrice($price)
    /**
    Check for price validity (including negative price) *
    @param string $price Price to validate
    @return boolean Validity is ok or not */
  • public static function isLanguageIsoCode($iso_code)
    /**
    Check for language code (ISO) validity *
    @param string $iso_code Language code (ISO) to validate
    @return boolean Validity is ok or not */
  • public static function isLanguageCode($s)
  • public static function isStateIsoCode($iso_code)
  • public static function isNumericIsoCode($iso_code)
  • public static function isDiscountName($voucher)
    /**
    Check for voucher name validity *
    @param string $voucher voucher to validate
    @return boolean Validity is ok or not */
  • public static function isCatalogName($name)
    /**
    Check for product or category name validity *
    @param string $name Product or category name to validate
    @return boolean Validity is ok or not */
  • public static function isMessage($message)
    /**
    Check for a message validity *
    @param string $message Message to validate
    @return boolean Validity is ok or not */
  • public static function isCountryName($name)
    /**
    Check for a country name validity *
    @param string $name Country name to validate
    @return boolean Validity is ok or not */
  • public static function isLinkRewrite($link)
    /**
    Check for a link (url-rewriting only) validity *
    @param string $link Link to validate
    @return boolean Validity is ok or not */
  • public static function isRoutePattern($pattern)
    /**
    Check for a route pattern validity *
    @param string $pattern to validate
    @return boolean Validity is ok or not */
  • public static function isAddress($address)
    /**
    Check for a postal address validity *
    @param string $address Address to validate
    @return boolean Validity is ok or not */
  • public static function isCityName($city)
    /**
    Check for city name validity *
    @param string $city City name to validate
    @return boolean Validity is ok or not */
  • public static function isValidSearch($search)
    /**
    Check for search query validity *
    @param string $search Query to validate
    @return boolean Validity is ok or not */
  • public static function isGenericName($name)
    /**
    Check for standard name validity *
    @param string $name Name to validate
    @return boolean Validity is ok or not */
  • public static function isCleanHtml($html)
    /**
    Check for HTML field validity (no XSS please !) *
    @param string $html HTML field to validate
    @return boolean Validity is ok or not */
  • public static function isReference($reference)
    /**
    Check for product reference validity *
    @param string $reference Product reference to validate
    @return boolean Validity is ok or not */
  • public static function isPasswd($passwd, $size = 5)
    /**
    Check for password validity *
    @param string $passwd Password to validate
    @param int $size
    @return boolean Validity is ok or not */
  • public static function isPasswdAdmin($passwd)
  • public static function isConfigName($config_name)
    /**
    Check for configuration key validity *
    @param string $config_name Configuration key to validate
    @return boolean Validity is ok or not */
  • public static function isPhpDateFormat($date_format)
    /**
    Check date formats like http://php.net/manual/en/function.date.php *
    @param string $date_format date format to check
    @return boolean Validity is ok or not */
  • public static function isDateFormat($date)
    /**
    Check for date format *
    @param string $date Date to validate
    @return boolean Validity is ok or not */
  • public static function isDate($date)
    /**
    Check for date validity *
    @param string $date Date to validate
    @return boolean Validity is ok or not */
  • public static function isBirthDate($date)
    /**
    Check for birthDate validity *
    @param string $date birthdate to validate
    @return boolean Validity is ok or not */
  • public static function isBool($bool)
    /**
    Check for boolean validity *
    @param boolean $bool Boolean to validate
    @return boolean Validity is ok or not */
  • public static function isPhoneNumber($number)
    /**
    Check for phone number validity *
    @param string $number Phone number to validate
    @return boolean Validity is ok or not */
  • public static function isEan13($ean13)
    /**
    Check for barcode validity (EAN-13) *
    @param string $ean13 Barcode to validate
    @return boolean Validity is ok or not */
  • public static function isUpc($upc)
    /**
    Check for barcode validity (UPC) *
    @param string $upc Barcode to validate
    @return boolean Validity is ok or not */
  • public static function isPostCode($postcode)
    /**
    Check for postal code validity *
    @param string $postcode Postal code to validate
    @return boolean Validity is ok or not */
  • public static function isZipCodeFormat($zip_code)
    /**
    Check for zip code format validity *
    @param string $zip_code zip code format to validate
    @return boolean Validity is ok or not */
  • public static function isOrderWay($way)
    /**
    Check for table or identifier validity
    Mostly used in database for ordering : ASC / DESC *
    @param string $way Keyword to validate
    @return boolean Validity is ok or not */
  • public static function isOrderBy($order)
    /**
    Check for table or identifier validity
    Mostly used in database for ordering : ORDER BY field *
    @param string $order Field to validate
    @return boolean Validity is ok or not */
  • public static function isTableOrIdentifier($table)
    /**
    Check for table or identifier validity
    Mostly used in database for table names and id_table *
    @param string $table Table/identifier to validate
    @return boolean Validity is ok or not */
  • public static function isValuesList()
    /**
    @deprecated 1.5.0 You should not use list like this, please use an array when you build a SQL query */
  • public static function isTagsList($list)
    /**
    Check for tags list validity *
    @param string $list List to validate
    @return boolean Validity is ok or not */
  • public static function isProductVisibility($s)
    /**
    Check for product visibility *
    @param string $s visibility to check
    @return boolean Validity is ok or not */
  • public static function isInt($value)
    /**
    Check for an integer validity *
    @param integer $value Integer to validate
    @return boolean Validity is ok or not */
  • public static function isUnsignedInt($value)
    /**
    Check for an integer validity (unsigned) *
    @param integer $value Integer to validate
    @return boolean Validity is ok or not */
  • public static function isPercentage($value)
    /**
    Check for an percentage validity (between 0 and 100) *
    @param float $value Float to validate
    @return boolean Validity is ok or not */
  • public static function isUnsignedId($id)
    /**
    Check for an integer validity (unsigned)
    Mostly used in database for auto-increment *
    @param integer $id Integer to validate
    @return boolean Validity is ok or not */
  • public static function isNullOrUnsignedId($id)
    /
    Because an id could be equal to zero when there is no association */ }
  • public static function isLoadedObject($object)
    /**
    Check object validity *
    @param object $object Object to validate
    @return boolean Validity is ok or not */
  • public static function isColor($color)
    /**
    Check object validity *
    @param integer $object Object to validate
    @return boolean Validity is ok or not */
  • public static function isUrl($url)
    /**
    Check url validity (disallowed empty string) *
    @param string $url Url to validate
    @return boolean Validity is ok or not */
  • public static function isTrackingNumber($tracking_number)
    /**
    Check tracking number validity (disallowed empty string) *
    @param string $tracking_number Tracking number to validate
    @return boolean Validity is ok or not */
  • public static function isUrlOrEmpty($url)
    /**
    Check url validity (allowed empty string) *
    @param string $url Url to validate
    @return boolean Validity is ok or not */
  • public static function isAbsoluteUrl($url)
    /**
    Check if URL is absolute *
    @param string $url URL to validate
    @return boolean Validity is ok or not */
  • public static function isMySQLEngine($engine)
  • public static function isUnixName($data)
  • public static function isTablePrefix($data)
  • public static function isFileName($name)
    /**
    Check for standard name file validity *
    @param string $name Name to validate
    @return boolean Validity is ok or not */
  • public static function isDirName($dir)
    /**
    Check for standard name directory validity
    @param string $dir Directory to validate
    @return boolean Validity is ok or not */
  • public static function isTabName($name)
    /**
    Check for admin panel tab name validity *
    @param string $name Name to validate
    @return boolean Validity is ok or not */
  • public static function isWeightUnit($unit)
  • public static function isDistanceUnit($unit)
  • public static function isSubDomainName($domain)
  • public static function isVoucherDescription($text)
  • public static function isSortDirection($value)
    /**
    Check if the value is a sort direction value (DESC/ASC) *
    @param char $value
    @return boolean Validity is ok or not */
  • public static function isLabel($label)
    /**
    Customization fields’ label validity *
    @param string $label
    @return boolean Validity is ok or not */
  • public static function isPriceDisplayMethod($data)
    /**
    Price display method validity *
    @param integer $data Data to validate
    @return boolean Validity is ok or not */
  • public static function isDniLite($dni)
    /**
    @param string $dni to validate
    @return bool */
  • public static function isCookie($data)
    /**
    Check if $data is a PrestaShop cookie object *
    @param mixed $data to validate
    @return bool */
  • public static function isString($data)
    /**
    Price display method validity *
    @param string $data Data to validate
    @return boolean Validity is ok or not */
  • public static function isReductionType($data)
    /**
    Check if the data is a reduction type (amout or percentage) *
    @param string $data Data to validate
    @return boolean Validity is ok or not */
  • public static function isBoolId($ids)
    /**
    Check for bool_id *
    @param string $ids
    @return boolean Validity is ok or not */
  • public static function isBool_Id($ids)
    /**
    @deprecated 1.5.0 Use Validate::isBoolId() */
  • public static function isLocalizationPackSelection($data)
    /**
    Check the localization pack part selected *
    @param string $data Localization pack to check
    @return boolean Validity is ok or not */
  • public static function isSerializedArray($data)
    /**
    Check for PHP serialized data *
    @param string $data Serialized data to validate
    @return boolean Validity is ok or not */
  • public static function isCoordinate($data)
    /**
    Check for Latitude/Longitude *
    @param string $data Coordinate to validate
    @return boolean Validity is ok or not */
  • public static function isLangIsoCode($iso_code)
    /**
    Check for Language Iso Code *
    @param string $iso_code
    @return boolean Validity is ok or not */
  • public static function isLanguageFileName($file_name)
    /**
    Check for Language File Name *
    @param string $file_name
    @return boolean Validity is ok or not */
  • public static function isArrayWithIds($ids)
    /** *
    @param array $ids
    @return boolean return true if the array contain only unsigned int value */
  • public static function isSceneZones($zones)
    /** *
    @param array $zones
    @return boolean return true if array contain all value required for an image map zone */
  • public static function isStockManagement($stock_management)
    /** *
    @param array $stock_management
    @return boolean return true if is a valide stock management */
  • public static function isSiret($siret)
    /**
    Validate SIRET Code
    @static
    @param $siret SIRET Code
    @return boolean Return true if is valid */
  • public static function isApe($ape)
    /**
    Validate APE Code
    @static
    @param $ape APE Code
    @return boolean Return true if is valid */
  • public static function isControllerName($name)

class ZoneCore extends ObjectModel

./classes/Zone.php

  • public static function getZones($active = false)
    /**
    Get all available geographical zones *
    @param bool $active
    @return array Zones */
  • public static function getIdByName($name)
    /**
    Get a zone ID from its default language name *
    @param string $name
    @return integer id_zone */
  • public function delete()
    /**
    Delete a zone *
    @return boolean Deletion result */

class WebserviceExceptionCore extends Exception

./classes/webservice\WebserviceException.php

  • public function __construct($message, $code)
  • public function getType()
  • public function setType($type)
  • public function setStatus($status)
  • public function getStatus()
  • public function getWrongValue()
  • public function setDidYouMean($wrong_value, $available_values)
  • public function getAvailableValues()

class WebserviceKeyCore extends ObjectModel

./classes/webservice\WebserviceKey.php

  • public function add($autodate = true, $nullValues = false)
  • public static function keyExists($key)
  • public function delete()
  • public function deleteAssociations()
  • public static function getPermissionForAccount($auth_key)
  • public static function isKeyActive($auth_key)
  • public static function getClassFromKey($auth_key)
  • public static function setPermissionForAccount($id_account, $permissions_to_set)

class WebserviceOutputBuilderCore

./classes/webservice\WebserviceOutputBuilder.php

  • public function __construct($ws_url)
  • public function setObjectRender(WebserviceOutputInterface $obj_render)
    /**
    Set the render object for set the output format.
    Set the Content-type for the http header. *
    @param WebserviceOutputInterface $obj_render
    @throw WebserviceException if the object render is not an instance of WebserviceOutputInterface
    @return $this */
  • public function getObjectRender()
    /**
    getter
    @return WebserviceOutputInterface */
  • public function setWsResources($resources)
    /**
    Need to have the resource list to get the class name for an entity,
    To build *
    @param array $resources
    @return $this */
  • public function buildHeader()
    /**
    This method return an array with each http header params for a content.
    This check each required params. *
    If this method is overrided don’t forget to check required specific params (for xml etc…) *
    @return array */
  • public function setHeaderParams($key, $value)
    /**
    @param $key The normalized key expected for an http response
    @param $value
    @throw WebserviceException if the key or the value are corrupted
    (use Validate::isCleanHtml method)
    @return $this */
  • public function getHeaderParams($key = null)
    /**
    @param null|string $key if null get all header params otherwise the params specified by the key
    @throw WebserviceException if the key is corrupted (use Validate::isCleanHtml method)
    @throw WebserviceException if the asked key does’nt exists.
    @return array|string */
  • public function resetHeaderParams()
    /**
    Delete all Header parameters previously set. *
    @return $this */
  • public function getStatus()
    /**
    @return string the normalized status for http request */
  • public function getStatusInt()
  • public function setStatus($num)
    /**
    Set the return header status *
    @param int $num the Http status code
    @return void */
  • public function getErrors($errors)
    /**
    Build errors output using an error array *
    @param array $errors
    @return string output in the format specified by WebserviceOutputBuilder::objectRender */
  • public function getResourcesList($key_permissions)
    /**
    Build the resource list in the output format specified by WebserviceOutputBuilder::objectRender
    @param $key_permissions
    @return string */
  • public function registerOverrideWSParameters($wsrObject, $method)
  • public function getContent($objects, $schema_to_display = null, $fields_to_display = ‘minimum’, $depth = 0, $type_of_view = self::VIEW_LIST, $override = true)
    /**
    Method is used for each content type
    Different content types are :
    – list of entities,
    – tree diagram of entity details (full or minimum),
    – schema (synopsis & blank), *
    @param array $objects each object created by entity asked
    @see WebserviceOutputBuilder::executeEntityGetAndHead
    @param null|string $schema_to_display if null display the entities list or entity details.
    @param string|array $fields_to_display the fields allow for the output
    @param int $depth depth for the tree diagram output.
    @param int $type_of_view use the 2 constants WebserviceOutputBuilder::VIEW_LIST WebserviceOutputBuilder::VIEW_DETAILS
    @return string in the output format specified by WebserviceOutputBuilder::objectRender */
  • public function renderEntityMinimum($object, $depth)
    /**
    Create the tree diagram with no details *
    @param $object create by the entity
    @param $depth the depth for the tree diagram
    @return string */
  • public function renderEntity($object, $depth)
    /**
    Build the entity detail. *
    @param ObjectModel $object create by the entity
    @param int $depth the depth for the tree diagram
    @return string */
  • public function setIndent($depth)
  • public function getSynopsisDetails($field)
  • public function setSpecificField($object, $method, $field_name, $entity_name)
    /** *
    @param string|object $object
    @param string $method
    @return $this */
  • public function getSpecificField()
  • public function setVirtualField($object, $method, $entity_name, $parameters)
  • public function getVirtualFields()
  • public function addVirtualFields($entity_name, $entity_object)
  • public function setFieldsToDisplay($fields)

class WebserviceOutputXMLCore implements WebserviceOutputInterface

./classes/webservice\WebserviceOutputXML.php

  • public function setSchemaToDisplay($schema)
  • public function getSchemaToDisplay()
  • public function setWsUrl($url)
  • public function getWsUrl()
  • public function getContentType()
  • public function __construct($languages = array())
  • public function setLanguages($languages)
  • public function renderErrorsHeader()
  • public function renderErrorsFooter()
  • public function renderErrors($message, $code = null)
  • public function renderField($field)
  • public function renderNodeHeader($node_name, $params, $more_attr = null, $has_child = true)
  • public function getNodeName($params)
  • public function renderNodeFooter($node_name, $params)
  • public function overrideContent($content)
  • public function renderAssociationWrapperHeader()
  • public function renderAssociationWrapperFooter()
  • public function renderAssociationHeader($obj, $params, $assoc_name, $closed_tags = false)
  • public function renderAssociationFooter($obj, $params, $assoc_name)

class WebserviceRequestCore

./classes/webservice\WebserviceRequest.php

  • public function getOutputEnabled()
  • public function setOutputEnabled($bool)
  • public static function getInstance()
    /**
    Get WebserviceRequest object instance (Singleton) *
    @return object WebserviceRequest instance */
  • public static function getResources()
  • public function getPriceForProduct($field, $entity_object, $ws_params)
    /**
    This method is used for calculate the price for products on the output details *
    @param $field
    @param $entity_object
    @param $ws_params
    @return array field parameters. */
  • public function specificPriceForProduct($entity_object, $parameters)
    /**
    This method is used for calculate the price for products on a virtual fields *
    @param $entity_object
    @param array $parameters
    @return array */
  • public function specificPriceCalculation($parameters)
  • public function specificPriceForCombination($entity_object, $parameters)
    /**
    This method is used for calculate the price for products on a virtual fields *
    @param $entity_object
    @param array $parameters
    @return array */
  • public function fetch($key, $method, $url, $params, $bad_class_name, $inputXml = NULL)
    /**
    Start Webservice request
    Check webservice activation
    Check autentication
    Check resource
    Check HTTP Method
    Execute the action
    Display the result *
    @param string $key
    @param string $method
    @param string $url
    @param string $params
    @param string $inputXml *
    @return array Returns an array of results (headers, content, type of resource…) */
  • public function setError($status, $label, $code)
    /**
    Set a webservice error *
    @param int $status
    @param string $label
    @param int $code
    @return void */
  • public function setErrorDidYouMean($num, $label, $value, $available_values, $code)
    /**
    Set a webservice error and propose a new value near from the available values *
    @param int $num
    @param string $label
    @param array $value
    @param array $values
    @param int $code
    @return void */
  • public function webserviceErrorHandler($errno, $errstr, $errfile, $errline)
    /**
    Used to replace the default PHP error handler, in order to display PHP errors in a XML format *
    @param string $errno contains the level of the error raised, as an integer
    @param array $errstr contains the error message, as a string
    @param array $errfile errfile, which contains the filename that the error was raised in, as a string
    @param array $errline errline, which contains the line number the error was raised at, as an integer
    @return boolean Always return true to avoid the default PHP error handler */
  • public function setFieldsToDisplay()
  • public function getFilteredObjectList()
  • public function getFilteredObjectDetails()
  • public function executeEntityGetAndHead()
    /**
    Execute GET and HEAD requests *
    Build filter
    Build fields display
    Build sort
    Build limit *
    @return boolean */
  • public function filterLanguage()

class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManagementInterface

./classes/webservice\WebserviceSpecificManagementImages.php

  • public function setObjectOutput(WebserviceOutputBuilderCore $obj)
  • public function getObjectOutput()
  • public function setWsObject(WebserviceRequestCore $obj)
  • public function getWsObject()
  • public function getContent()
    /*
    This method need $this->imgToDisplay to be set if output don’t needs to be XML */
  • public function manage()

class WebserviceSpecificManagementSearchCore implements WebserviceSpecificManagementInterface

./classes/webservice\WebserviceSpecificManagementSearch.php

  • public function setObjectOutput(WebserviceOutputBuilderCore $obj)
  • public function setWsObject(WebserviceRequestCore $obj)
  • public function getWsObject()
  • public function getObjectOutput()
  • public function setUrlSegment($segments)
  • public function getUrlSegment()
  • public function manage()
    /**
    Management of search * */
  • public function getContent()
    /**
    This must be return a string with specific values as WebserviceRequest expects. *
    @return string */

class TaxCore extends ObjectModel

./classes/tax\Tax.php

  • public function delete()
  • public function historize()
    /**
    Save the object with the field deleted to true *
    @return bool */
  • public function toggleStatus()
  • public function update($nullValues = false)
  • public function isUsed()
    /**
    Returns true if the tax is used in an order details *
    @return bool */
  • public static function getTaxes($id_lang = false, $active_only = true)
    /**
    Get all available taxes *
    @return array Taxes */
  • public static function excludeTaxeOption()
  • public static function getTaxIdByName($tax_name, $active = 1)
    /**
    Return the tax id associated to the specified name *
    @param string $tax_name
    @param boolean $active (true by default) */
  • public static function getProductEcotaxRate($id_address = null)
    /**
    Returns the ecotax tax rate *
    @param id_address
    @return float $tax_rate */
  • public static function getCarrierTaxRate($id_carrier, $id_address = null)
    /**
    Returns the carrier tax rate *
    @param id_address
    @return float $tax_rate */
  • public static function getProductTaxRateViaRules($id_product, $id_country, $id_state, $zipcode)
    /**
    Return the product tax rate using the tax rules system *
    @param integer $id_product
    @param integer $id_country
    @return Tax *
    @deprecated since 1.5 */
  • public static function getProductTaxRate($id_product, $id_address = null, Context $context = null)
    /**
    Returns the product tax *
    @param integer $id_product
    @param integer $id_country
    @return Tax */

class TaxCalculatorCore

./classes/tax\TaxCalculator.php

  • public function __construct(array $taxes = array(), $computation_method = TaxCalculator::COMBINE_METHOD)
    /**
    @param array $taxes
    @param int $computation_method (COMBINE_METHOD | ONE_AFTER_ANOTHER_METHOD) */
  • public function addTaxes($price_te)
    /**
    Compute and add the taxes to the specified price *
    @param price_te price tax excluded
    @return float price with taxes */
  • public function removeTaxes($price_ti)
    /**
    Compute and remove the taxes to the specified price *
    @param price_ti price tax inclusive
    @return price without taxes */
  • public function getTotalRate()
    /**
    @return float total taxes rate */
  • public function getTaxesName()
  • public function getTaxesAmount($price_te)
    /**
    Return the tax amount associated to each taxes of the TaxCalculator *
    @param float $price_te
    @return array $taxes_amount */

class TaxManagerFactoryCore

./classes/tax\TaxManagerFactory.php

  • public static function getManager(Address $address, $type)
    /**
    Returns a tax manager able to handle this address *
    @param Address $address
    @param string $type *
    @return TaxManager */
  • public static function execHookTaxManagerFactory(Address $address, $type)
    /**
    Check for a tax manager able to handle this type of address in the module list *
    @param Address $address
    @param string $type *
    @return TaxManager */

class TaxRuleCore extends ObjectModel

./classes/tax\TaxRule.php

  • public static function deleteByGroupId($id_group)
  • public static function retrieveById($id_tax_rule)
  • public static function getTaxRulesByGroupId($id_lang, $id_group)
  • public static function deleteTaxRuleByIdTax($id_tax)
  • public static function deleteTaxRuleByIdCounty($id_county)
    /**
    @deprecated since 1.5 */
  • public static function isTaxInUse($id_tax)
    /**
    @param int $id_tax
    @return boolean */
  • public function breakDownZipCode($zip_codes)
    /**
    @param string $zipcode a range of zipcode (eg: 75000 / 75000-75015)
    @return array an array containing two zipcode ordered by zipcode */
  • public static function swapTaxId($old_id, $new_id)
    /**
    Replace a tax_rule id by an other one in the tax_rule table *
    @param int $old_id
    @param int $new_id */

class TaxRulesGroupCore extends ObjectModel

./classes/tax\TaxRulesGroup.php

  • public static function getTaxRulesGroups($only_active = true)
  • public static function getTaxRulesGroupsForOptions()
    /**
    @return array an array of tax rules group formatted as $id => $name */
  • public function delete()
  • public static function getAssociatedTaxRatesByIdCountry($id_country)
    /**
    @return array */
  • public static function getIdByName($name)
    /**
    Returns the tax rules group id corresponding to the name *
    @param string name
    @return int id of the tax rules */
  • public function hasUniqueTaxRuleForCountry($id_country, $id_state)
  • public static function getTaxesRate($id_tax_rules_group, $id_country, $id_state, $zipcode)
    /**
    @deprecated since 1.5 */
  • public static function getTaxes($id_tax_rules_group, $id_country, $id_state, $id_county)
    /**
    Return taxes associated to this para
    @deprecated since 1.5 */

class TaxRulesTaxManagerCore implements TaxManagerInterface

./classes/tax\TaxRulesTaxManager.php

  • public function __construct(Address $address, $type)
    /**

@param Address $address
@param mixed An additional parameter for the tax manager (ex: tax rules id for TaxRuleTaxManager) */

  • public static function isAvailableForThisAddress(Address $address)
    /**
    Returns true if this tax manager is available for this address *
    @return boolean */
  • public function getTaxCalculator()
    /**
    Return the tax calculator associated to this address *
    @return TaxCalculator */

 

class StockCore extends ObjectModel

./classes/stock\Stock.php

  • public function update($null_values = false)
    /**
    @see ObjectModel::update() */
  • public function add($autodate = true, $null_values = false)
    /**
    @see ObjectModel::add() */
  • public function getWsRealQuantity()
    /**
    Webservice : used to get the real quantity of a product */

class StockAvailableCore extends ObjectModel

./classes/stock\StockAvailable.php

  • public function updateWs()
    /**
    For a given {id_product, id_product_attribute and id_shop}, gets the stock available id associated *
    @param int $id_product
    @param int $id_product_attribute Optional
    @param int $id_shop Optional
    @return int */
  • public static function getStockAvailableIdByProductId($id_product, $id_product_attribute = null, $id_shop = null)
  • public static function synchronize($id_product, $order_id_shop = null)
    /**
    For a given id_product, synchronizes StockAvailable::quantity with Stock::usable_quantity *
    @param int $id_product */
  • public static function setProductDependsOnStock($id_product, $depends_on_stock = true, $id_shop = null, $id_product_attribute = 0)
    /**
    For a given id_product, sets if stock available depends on stock *
    @param int $id_product
    @param int $depends_on_stock Optional : true by default
    @param int $id_shop Optional : gets context by default */
  • public static function setProductOutOfStock($id_product, $out_of_stock = false, $id_shop = null, $id_product_attribute = 0)
    /**
    For a given id_product, sets if product is available out of stocks *
    @param int $id_product
    @param int $out_of_stock Optional false by default
    @param int $id_shop Optional gets context by default */
  • public static function getQuantityAvailableByProduct($id_product = null, $id_product_attribute = null, $id_shop = null)
    /**
    For a given id_product and id_product_attribute, gets its stock available *
    @param int $id_product
    @param int $id_product_attribute Optional
    @param int $id_shop Optional : gets context by default
    @return int Quantity */
  • public function add($autodate = true, $null_values = false)
    /**
    Upgrades total_quantity_available after having saved
    @see ObjectModel::add() */
  • public function update($null_values = false)
    /**
    Upgrades total_quantity_available after having update
    @see ObjectModel::update() */
  • public function postSave()
    /**
    Upgrades total_quantity_available after having saved
    @see StockAvailableCore::update()
    @see StockAvailableCore::add() */
  • public static function updateQuantity($id_product, $id_product_attribute, $delta_quantity, $id_shop = null)
    /**
    For a given id_product and id_product_attribute updates the quantity available *
    @param int $id_product
    @param int $id_product_attribute Optional
    @param int $delta_quantity The delta quantity to update
    @param int $id_shop Optional */
  • public static function setQuantity($id_product, $id_product_attribute, $quantity, $id_shop = null)
    /**
    For a given id_product and id_product_attribute sets the quantity available *
    @param int $id_product
    @param int $id_product_attribute Optional
    @param int $delta_quantity The delta quantity to update
    @param int $id_shop Optional */
  • public static function removeProductFromStockAvailable($id_product, $id_product_attribute = null, $shop = null)
    /**
    Removes a given product from the stock available *
    @param int $id_product
    @param int $id_product_attribute Optional
    @param mixed $id_shop shop id or shop object Optional */
  • public static function resetProductFromStockAvailableByShopGroup(ShopGroup $shop_group)
    /**
    Removes all product quantities from all a group of shops
    If stocks are shared, remoe all old available quantities for all shops of the group
    Else remove all available quantities for the current group *
    @param ShopGroup $shop_group the ShopGroup object */
  • public static function dependsOnStock($id_product, $id_shop = null)
    /**
    For a given product, tells if it depends on the physical (usable) stock *
    @param int $id_product
    @param int $id_shop Optional : gets context if null @see Context::getContext()
    @return bool : depends on stock @see $depends_on_stock */
  • public static function outOfStock($id_product, $id_shop = null)
    /**
    For a given product, get its « out of stock » flag *
    @param int $id_product
    @param int $id_shop Optional : gets context if null @see Context::getContext()
    @return bool : depends on stock @see $depends_on_stock */
  • public static function addSqlShopRestriction(DbQuery $sql = null, $shop = null, $alias = null)
    /**
    Add an sql restriction for shops fields – specific to StockAvailable *
    @param DbQuery $query Reference to the query object
    @param int $id_shop Optional : The shop ID
    @param string $alias Optional : The current table alias *
    @return mixed the DbQuery object or the sql restriction string */
  • public static function addSqlShopParams(&$params, $id_shop = null)
    /**
    Add sql params for shops fields – specific to StockAvailable *
    @param array $params Reference to the params array
    @param int $id_shop Optional : The shop ID * */
  • public static function copyStockAvailableFromShopToShop($src_shop_id, $dst_shop_id)
    /**
    Copies stock available content table *
    @param int $src_shop_id
    @param int $dst_shop_id
    @return bool */

class StockManagerCore implements StockManagerInterface

./classes/stock\StockManager.php

  • public static function isAvailable()
    /**
    @see StockManagerInterface::isAvailable() */
  • public function addProduct($id_product,
    /**
    @see StockManagerInterface::addProduct() */
  • public function removeProduct($id_product,
    /**
    @see StockManagerInterface::removeProduct() */
  • public function getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false)
    /**
    @see StockManagerInterface::getProductPhysicalQuantities() */
  • public function getProductRealQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false)
    /**
    @see StockManagerInterface::getProductRealQuantities() */
  • public function transferBetweenWarehouses($id_product,
    /**
    @see StockManagerInterface::transferBetweenWarehouses() */
  • public function getProductCoverage($id_product, $id_product_attribute, $coverage, $id_warehouse = null)
    /**
    @see StockManagerInterface::getProductCoverage()
    Here, $coverage is a number of days
    @return int number of days left (-1 if infinite) */

class StockManagerFactoryCore

./classes/stock\StockManagerFactory.php

  • public static function getManager()
    /**
    Returns a StockManager *
    @return StockManagerInterface */
  • public static function execHookStockManagerFactory()
    /**
    Looks for a StockManager in the modules list. *
    @return StockManagerInterface */

class StockMvtCore extends ObjectModel

./classes/stock\StockMvt.php

  • public static function addMissingMvt($id_employee)
    /**
    @deprecated since 1.5.0 *
    This method no longer exists.
    There is no equivalent or replacement, considering that this should be handled by inventories. */
  • public static function getNegativeStockMvts($id_order, $id_product, $id_product_attribute, $quantity, $id_warehouse = null)
    /**
    Gets the negative (decrements the stock) stock mvts that correspond to the given order, for :
    the given product, in the given quantity. *
    @since 1.5.0
    @param int $id_order
    @param int $id_product
    @param int $id_product_attribute Use 0 if the product does not have attributes
    @param int $quantity
    @param int $id_warehouse Optional
    @return Array mvts */
  • public static function getLastPositiveStockMvt($id_product, $id_product_attribute)
    /**
    For a given product, gets the last positive stock mvt *
    @since 1.5.0
    @param int $id_product
    @param int $id_product_attribute Use 0 if the product does not have attributes
    @return bool|array */

class StockMvtReasonCore extends ObjectModel

./classes/stock\StockMvtReason.php

  • public static function getStockMvtReasons($id_lang, $sign = null)
    /**
    Gets Stock Mvt Reasons *
    @param int $id_lang
    @param int $sign Optionnal
    @return array */
  • public static function getStockMvtReasonsWithFilter($id_lang, $ids_ignore, $sign = null)
    /**
    Same as StockMvtReason::getStockMvtReasons(), ignoring a specific lists of ids *
    @since 1.5.0
    @param int $id_lang
    @param array $ids_ignore
    @param int $sign optional */
  • public static function exists($id_stock_mvt_reason)
    /**
    For a given id_stock_mvt_reason, tells if it exists *
    @since 1.5.0
    @param int $id_stock_mvt_reason
    @return bool */

class StockMvtWSCore extends ObjectModelCore

./classes/stock\StockMvtWS.php

  • public function __construct($id = null, $id_lang = null, $id_shop = null)
    /**
    @see ObjectModel */
  • public function getWebserviceObjectList($join, $filter, $sort, $limit, $full = false)
    /*@see ObjectModel::getWebserviceObjectList()
    Added $full for this specific object */
  • public function getWSProductName()
    /**
    Webservice : getter for the product name */

class SupplyOrderCore extends ObjectModel

./classes/stock\SupplyOrder.php

  • public function update($null_values = false)
    /**
    @see ObjectModel::update() */
  • public function add($autodate = true, $null_values = false)
    /**
    @see ObjectModel::add() */
  • public function getEntries($id_lang = null)
    /**
    Retrieves the product entries for the current order *
    @param int $id_lang Optional Id Lang – Uses Context::language::id by default
    @return array */
  • public function getEntriesCollection()
    /**
    Retrieves the details entries (i.e. products) collection for the current order *
    @return Collection of SupplyOrderDetail */
  • public function hasEntries()
    /**
    Check if the order has entries *
    @return bool Has/Has not */
  • public function isEditable()
    /**
    Check if the current state allows to edit the current order *
    @return bool */
  • public function isDeliveryNoteAvailable()
    /**
    Checks if the current state allows to generate a delivery note for this order *
    @return bool */
  • public function isInReceiptState()
    /**
    Checks if the current state allows to add products in stock *
    @return bool */
  • public function resetProducts()
    /**
    Removes all products from the order */
  • public static function warehouseHasPendingOrders($id_warehouse)
    /**
    For a given $id_warehouse, tells if it has pending supply orders *
    @param int $id_warehouse
    @return bool */
  • public static function supplierHasPendingOrders($id_supplier)
    /**
    For a given $id_supplier, tells if it has pending supply orders *
    @param int $id_supplier Id Supplier
    @return bool */
  • public static function exists($match)
    /**
    For a given id or reference, tells if the supply order exists *
    @param int|string $match Either the reference of the order, or the Id of the order
    @return int SupplyOrder Id */
  • public static function getSupplyOrderByReference($reference)
    /**
    For a given reference, returns the corresponding supply order *
    @param string $reference Reference of the order
    @return bool|SupplyOrder */
  • public function hydrate(array $data, $id_lang = null)
    /**
    @see ObjectModel::hydrate() */
  • public static function getReferenceById($id_supply_order)
    /**
    Gets the reference of a given order *
    @param int $id_supply_order
    @return bool|string */
  • public function getWsSupplyOrderDetails()
    /**
    Webservice : gets the ids supply_order_detail associated to this order *
    @return array */

class SupplyOrderDetailCore extends ObjectModel

./classes/stock\SupplyOrderDetail.php

  • public function update($null_values = false)
    /**
    @see ObjectModel::update() */
  • public function add($autodate = true, $null_values = false)
    /**
    @see ObjectModel::add() */
  • public function applyGlobalDiscount($discount_rate)
    /**
    Applies a global order discount rate, for the current product (i.e detail)
    Calls ObjectModel::update() *
    @param $discount_rate The discount rate in percent (Ex. 5 for 5 percents) */
  • public function validateController($htmlentities = true)
    /**
    @see ObjectModel::validateController() *
    @param $htmlentities Optional
    @return $errors If any.. */
  • public function hydrate(array $data, $id_lang = null)
    /**
    @see ObjectModel::hydrate() */

class SupplyOrderHistoryCore extends ObjectModel

./classes/stock\SupplyOrderHistory.php

class SupplyOrderReceiptHistoryCore extends ObjectModel

./classes/stock\SupplyOrderReceiptHistory.php

class SupplyOrderStateCore extends ObjectModel

./classes/stock\SupplyOrderState.php

  • public static function getSupplyOrderStates($id_state_referrer = null, $id_lang = null)
    /**
    Gets the list of supply order states *
    @param int $id_state_referrer Optional, used to know what state is available after this one
    @param int $id_lang Optional Id Language
    @return array States */
  • public static function getStates($ids = null, $id_lang = null)
    /**
    Gets the list of supply order states *
    @param array $ids Optional Do not include these ids in the result
    @param int $id_lang Optional
    @return array */

class WarehouseCore extends ObjectModel

./classes/stock\Warehouse.php

  • public function getShops()
    /**
    Gets the shops associated to the current warehouse *
    @return array Shops (id, name) */
  • public function getCarriers($return_reference = false)
    /**
    Gets the carriers associated to the current warehouse *
    @return array Ids of the associated carriers */
  • public function setCarriers($ids_carriers)
    /**
    Sets the carriers associated to the current warehouse *
    @param array $ids_carriers */
  • public static function removeCarrier($id_carrier, $id_warehouse = null)
    /**
    For a given carrier, removes it from the warehouse/carrier association
    If $id_warehouse is set, it only removes the carrier for this warehouse *
    @param int $id_carrier Id of the carrier to remove
    @param int $id_warehouse optional Id of the warehouse to filter */
  • public function isEmpty()
    /**
    Checks if a warehouse is empty – i.e. has no stock *
    @return bool */
  • public static function exists($id_warehouse)
    /**
    Checks if the given warehouse exists *
    @param int $id_warehouse
    @return bool Exists/Does not exist */
  • public static function setProductLocation($id_product, $id_product_attribute, $id_warehouse, $location)
    /**
    For a given {product, product attribute} sets its location in the given warehouse
    First, for the given parameters, it cleans the database before updating *
    @param int $id_product ID of the product
    @param int $id_product_attribute Use 0 if this product does not have attributes
    @param int $id_warehouse ID of the warehouse
    @param string $location Describes the location (no lang id required)
    @return bool Success/Failure */
  • public function resetProductsLocations()
    /**
    Resets all product locations for this warehouse */
  • public static function getProductLocation($id_product, $id_product_attribute, $id_warehouse)
    /**
    For a given {product, product attribute} gets its location in the given warehouse *
    @param int $id_product ID of the product
    @param int $id_product_attribute Use 0 if this product does not have attributes
    @param int $id_warehouse ID of the warehouse
    @return string Location of the product */
  • public static function getProductWarehouseList($id_product, $id_product_attribute = 0, $id_shop = null)
    /**
    For a given {product, product attribute} gets warehouse list *
    @param int $id_product ID of the product
    @param int $id_product_attribute Optional, uses 0 if this product does not have attributes
    @param int $id_shop Optional, ID of the shop. Uses the context shop id (@see Context::shop)
    @return array Warehouses (ID, reference/name concatenated) */
  • public static function getWarehouses($ignore_shop = false, $id_shop = null)
    /**
    Gets available warehouses
    It is possible via ignore_shop and id_shop to filter the list with shop id *
    @param bool $ignore_shop Optional, false by default – Allows to get only the warehouses that are associated to one/some shops (@see $id_shop)
    @param int $id_shop Optional, Context::shop::Id by default – Allows to define a specific shop to filter.
    @return array Warehouses (ID, reference/name concatenated) */
  • public static function getWarehousesGroupedByShops()
    /**
    Gets warehouses grouped by shops *
    @return array (of array) Warehouses ID are grouped by shops ID */
  • public function getNumberOfProducts()
    /**
    Gets the number of products in the current warehouse *
    @return int Number of different id_stock */
  • public function getQuantitiesOfProducts()
    /**
    Gets the number of quantities – for all products – in the current warehouse *
    @return int Total Quantity */
  • public function getStockValue()
    /**
    Gets the value of the stock in the current warehouse *
    @return int Value of the stock */
  • public static function getWarehousesByEmployee($id_employee)
    /**
    For a given employee, gets the warehouse(s) he/she manages *
    @param int $id_employee Manager ID
    @return array ids_warehouse Ids of the warehouses */
  • public static function getWarehousesByProductId($id_product, $id_product_attribute = 0)
    /**
    For a given product, returns the warehouses it is stored in *
    @param int $id_product Product Id
    @param int $id_product_attribute Optional, Product Attribute Id – 0 by default (no attribues)
    @return array Warehouses Ids and names */
  • public static function getWarehouseNameById($id_warehouse)
    /**
    For a given $id_warehouse, returns its name *
    @param int $id_warehouse Warehouse Id
    @return string Name */
  • public static function getPackWarehouses($id_product, $id_shop = null)
    /**
    For a given pack, returns the warehouse it can be shipped from *
    @param int $id_product
    @return int|bool id_warehouse or false */
  • public function resetStockAvailable()
  • public function getWsStockValue()
    /**
    Webservice : gets the value of the warehouse
    @return int */
  • public function getWsStocks()
    /**
    Webservice : gets the ids stock associated to this warehouse
    @return array */
  • public function getWsShops()
    /**
    Webservice : gets the ids shops associated to this warehouse
    @return array */
  • public function getWsCarriers()
    /**
    Webservice : gets the ids carriers associated to this warehouse
    @return array */

class WarehouseProductLocationCore extends ObjectModel

./classes/stock\WarehouseProductLocation.php

  • public static function getProductLocation($id_product, $id_product_attribute, $id_warehouse)
    /**
    For a given product and warehouse, gets the location *
    @param int $id_product product ID
    @param int $id_product_attribute product attribute ID
    @param int $id_warehouse warehouse ID
    @return string $location Location of the product */
  • public static function getIdByProductAndWarehouse($id_product, $id_product_attribute, $id_warehouse)
    /**
    For a given product and warehouse, gets the WarehouseProductLocation corresponding ID *
    @param int $id_product
    @param int $id_product_attribute
    @param int $id_supplier
    @return int $id_warehouse_product_location ID of the WarehouseProductLocation */
  • public static function getCollection($id_product)
    /**
    For a given product, gets its warehouses *
    @param int $id_product
    @return Collection The type of the collection is WarehouseProductLocation */
  • public static function getProducts($id_warehouse)

class ShopCore extends ObjectModel

./classes/shop\Shop.php

  • public function __construct($id = null, $id_lang = null, $id_shop = null)
    /**
    On shop instance, get its theme and URL data too *
    @param int $id
    @param int $id_lang
    @param int $id_shop */
  • public function setUrl()
  • public function add($autodate = true, $null_values = false)
    /**
    Add a shop, and clear the cache *
    @param bool $autodate
    @param bool $null_values
    @return bool */
  • public function delete()
    /**
    Remove a shop only if it has no dependencies, and remove its associations *
    @return bool */
  • public static function hasDependency($id_shop)
    /**
    Detect dependency with customer or orders *
    @param int $id_shop
    @return bool */
  • public static function initialize()
    /**
    Find the shop from current domain / uri and get an instance of this shop
    if INSTALL_VERSION is defined, will return an empty shop object *
    @return Shop */
  • public function getAddress()
    /**
    @return Address the current shop address */
  • public function getTheme()
    /**
    Get shop theme name *
    @return string */
  • public function getBaseURI()
    /**
    Get shop URI *
    @return string */
  • public function getBaseURL()
    /**
    Get shop URL *
    @return string */
  • public function getGroup()
    /**
    Get group of current shop *
    @return ShopGroup */
  • public function getCategory()
    /**
    Get root category of current shop *
    @return int */
  • public function getUrls()
    /**
    Get list of shop’s urls *
    @return array */
  • public function isDefaultShop()
    /**
    Check if current shop ID is the same as default shop in configuration *
    @return bool */
  • public static function getAssoTable($table)
    /**
    Get the associated table if available *
    @return array */
  • public static function checkIdShopDefault($table)
    /**
    check if the table has an id_shop_default *
    @return boolean */
  • public static function getAssoTables()
    /**
    Get list of associated tables to shop *
    @return array */
  • public static function addTableAssociation($table_name, $table_details)
    /**
    Add table associated to shop *
    @param string $table_name
    @param array $table_details
    @return bool */
  • public static function isTableAssociated($table)
    /**
    Check if given table is associated to shop *
    @param string $table
    @return bool */
  • public static function cacheShops($refresh = false)
    /**
    Load list of groups and shops, and cache it *
    @param bool $refresh */
  • public static function getCompleteListOfShopsID()
  • public static function getShops($active = true, $id_shop_group = null, $get_as_list_id = false)
    /**
    Get shops list *
    @param bool $active
    @param int $id_shop_group
    @param bool $get_as_list_id
    @return array */
  • public function getUrlsSharedCart()
  • public static function getShopsCollection($active = true, $id_shop_group = null)
    /**
    Get a collection of shops *
    @param bool $active
    @param int $id_shop_group
    @return Collection */
  • public static function getShop($shop_id)
    /**
    Return some informations cached for one shop *
    @param int $shop_id
    @return array */
  • public static function getIdByName($name)
    /**
    Return a shop ID from shop name *
    @param string $name
    @return int */
  • public static function getTotalShops($active = true, $id_shop_group = null)
    /**
    @param bool $active
    @param int $id_shop_group
    @return int Total of shops */
  • public static function getGroupFromShop($shop_id, $as_id = true)
    /**
    Retrieve group ID of a shop *
    @param int $shop_id Shop ID
    @return int Group ID */
  • public static function getSharedShops($shop_id, $type)
    /**
    If the shop group has the option $type activated, get all shops ID of this group, else get current shop ID *
    @param int $shop_id
    @param int $type Shop::SHARE_CUSTOMER | Shop::SHARE_ORDER
    @return array */
  • public static function getContextListShopID($share = false)
    /**
    Get a list of ID concerned by the shop context (E.g. if context is shop group, get list of children shop ID) *
    @param string $share If false, dont check share datas from group. Else can take a Shop::SHARE_
    constant value
    @return array */
  • public static function getShopById($id, $identifier, $table)
    /**
    Return the list of shop by id *
    @param int $id
    @param string $identifier
    @param string $table
    @return array */
  • public static function setContext($type, $id = null)
    /**
    Change the current shop context *
    @param int $type Shop::CONTEXT_ALL | Shop::CONTEXT_GROUP | Shop::CONTEXT_SHOP
    @param int $id ID shop if CONTEXT_SHOP or id shop group if CONTEXT_GROUP */
  • public static function getContext()
    /**
    Get current context of shop *
    @return int */
  • public static function getContextShopID($null_value_without_multishop = false)
    /**
    Get current ID of shop if context is CONTEXT_SHOP *
    @return int */
  • public static function getContextShopGroupID($null_value_without_multishop = false)
    /**
    Get current ID of shop group if context is CONTEXT_SHOP or CONTEXT_GROUP *
    @return int */
  • public static function getContextShopGroup()
  • public static function addSqlRestriction($share = false, $alias = null)
    /**
    Add an sql restriction for shops fields *
    @param int $share If false, dont check share datas from group. Else can take a Shop::SHARE_
    constant value
    @param string $alias */
  • public static function addSqlAssociation($table, $alias, $inner_join = true, $on = null, $force_not_default = false)
    /**
    Add an SQL JOIN in query between a table and its associated table in multishop *
    @param string $table Table name (E.g. product, module, etc.)
    @param string $alias Alias of table
    @param bool $inner_join Use or not INNER JOIN
    @param string $on
    @return string */
  • public static function addSqlRestrictionOnLang($alias = null, $id_shop = null)
    /**
    Add a restriction on id_shop for multishop lang table *
    @param string $alias
    @param Context $context
    @return string */
  • public static function getTree()
    /**
    Get all groups and associated shops as subarrays *
    @return array */
  • public static function isFeatureActive()
    /**
    @return bool Return true if multishop feature is active and at last 2 shops have been created */
  • public function copyShopData($old_id, $tables_import = false, $deleted = false)
  • public static function getCategories($id = 0, $only_id = true)
    /**
    @static
    @param int $id
    @return array */
  • public static function getCurrentShop()
    /**
    @deprecated 1.5.0 Use shop->id */
  • public static function getEntityIds($entity, $id_shop, $active = false, $delete = false)
    /**
    @param string $entity
    @param int $id_shop
    @return array|bool */

class ShopGroupCore extends ObjectModel

./classes/shop\ShopGroup.php

  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public static function getShopGroups($active = true)
  • public static function getTotalShopGroup($active = true)
    /**
    @return int Total of shop groups */
  • public function haveShops()
  • public function getTotalShops()
  • public static function getShopsFromGroup($id_group)
  • public static function getIdByName($name)
    /**
    Return a group shop ID from group shop name *
    @param string $name
    @return int */
  • public static function hasDependency($id_shop_group, $check = ‘all’)
    /**
    Detect dependency with customer or orders *
    @param int $id_shop_group
    @param string $check all|customer|order
    @return bool */

class ShopUrlCore extends ObjectModel

./classes/shop\ShopUrl.php

  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public function getBaseURI()
  • public function getURL($ssl = false)
  • public static function getShopUrls($id_shop = false)
    /**
    Get list of shop urls *
    @param bool $id_shop
    @return Collection */
  • public function setMain()
  • public function canAddThisUrl($domain, $domain_ssl, $physical_uri, $virtual_uri)
  • public static function getMainShopDomain()
  • public static function getMainShopDomainSSL()

class RangePriceCore extends ObjectModel

./classes/range\RangePrice.php

  • public function add($autodate = true, $null_values = false)
    /**
    Override add to create delivery value for all zones
    @see classes/ObjectModelCore::add()

@param bool $null_values
@param bool $autodate
@return boolean Insertion result */

  • public static function getRanges($id_carrier)
    /**
    Get all available price ranges *
    @return array Ranges */
  • public static function rangeExist($id_carrier, $delimiter1, $delimiter2)
  • public static function isOverlapping($id_carrier, $delimiter1, $delimiter2, $id_rang = null)

 

class RangeWeightCore extends ObjectModel

./classes/range\RangeWeight.php

  • public function add($autodate = true, $null_values = false)
    /**
    Override add to create delivery value for all zones
    @see classes/ObjectModelCore::add()

@param bool $null_values
@param bool $autodate
@return boolean Insertion result */

  • public static function getRanges($id_carrier)
    /**
    Get all available price ranges *
    @return array Ranges */
  • public static function rangeExist($id_carrier, $delimiter1, $delimiter2)
  • public static function isOverlapping($id_carrier, $delimiter1, $delimiter2, $id_rang = null)

 

class HTMLTemplateDeliverySlipCore extends HTMLTemplate

./classes/pdf\HTMLTemplateDeliverySlip.php

  • public function __construct(OrderInvoice $order_invoice, $smarty)
  • public function getContent()
    /**
    Returns the template’s HTML content
    @return string HTML content */
  • public function getBulkFilename()
    /**
    Returns the template filename when using bulk rendering
    @return string filename */
  • public function getFilename()
    /**
    Returns the template filename
    @return string filename */

class HTMLTemplateInvoiceCore extends HTMLTemplate

./classes/pdf\HTMLTemplateInvoice.php

  • public function __construct(OrderInvoice $order_invoice, $smarty)
  • public function getContent()
    /**
    Returns the template’s HTML content
    @return string HTML content */
  • public function getTaxTabContent()
    /**
    Returns the tax tab content */
  • public function getBulkFilename()
    /**
    Returns the template filename when using bulk rendering
    @return string filename */
  • public function getFilename()
    /**
    Returns the template filename
    @return string filename */

class HTMLTemplateOrderReturnCore extends HTMLTemplate

./classes/pdf\HTMLTemplateOrderReturn.php

  • public function __construct(OrderReturn $order_return, $smarty)
  • public function getContent()
    /**
    Returns the template’s HTML content
    @return string HTML content */
  • public function getFilename()
    /**
    Returns the template filename
    @return string filename */
  • public function getBulkFilename()
    /**
    Returns the template filename when using bulk rendering
    @return string filename */

class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice

./classes/pdf\HTMLTemplateOrderSlip.php

  • public function __construct(OrderSlip $order_slip, $smarty)
  • public function getContent()
    /**
    Returns the template’s HTML content
    @return string HTML content */
  • public function getBulkFilename()
    /**
    Returns the template filename when using bulk rendering
    @return string filename */
  • public function getFilename()
    /**
    Returns the template filename
    @return string filename */
  • public function getTaxTabContent()
    /**
    Returns the tax tab content */
  • public function getProductTaxesBreakdown()
  • public function getShippingTaxesBreakdown()

class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate

./classes/pdf\HTMLTemplateSupplyOrderForm.php

  • public function __construct(SupplyOrder $supply_order, $smarty)
  • public function getContent()
    /**
    @see HTMLTemplate::getContent() */
  • public function getBulkFilename()
    /**
    @see HTMLTemplate::getBulkFilename() */
  • public function getFilename()
    /**
    @see HTMLTemplate::getFileName() */
  • public function getHeader()
    /**
    @see HTMLTemplate::getHeader() */
  • public function getFooter()
    /**
    @see HTMLTemplate::getFooter() */

class PDFCore

./classes/pdf\PDF.php

  • public function __construct($objects, $template, $smarty)
  • public function render($display = true)
  • public function getTemplateObject($object)

class PDFGeneratorCore extends TCPDF

./classes/pdf\PDFGenerator.php

  • public function __construct($use_cache = false)
  • public function setEncoding($encoding)
    /**
    set the PDF encoding
    @param string $encoding */
  • public function createHeader($header)
    /** *
    set the PDF header
    @param string $header HTML */
  • public function createFooter($footer)
    /** *
    set the PDF footer
    @param string $footer HTML */
  • public function createContent($content)
    /** *
    create the PDF content
    @param string $content HTML */
  • public function setFontForLang($iso_lang)
    /**
    Change the font
    @param string $iso_lang */
  • public function Header()
    /**
    @see TCPDF::Header() */
  • public function Footer()
    /**
    @see TCPDF::Footer() */
  • public function render($filename, $display = true)
    /**
    Render the pdf file *
    @param string $filename
    @param $display : true:display to user, false:save, ‘I’,’D’,’S’ as fpdf display
    @throws PrestaShopException */
  • public function writePage()
    /**
    Write a PDF page */

class OrderCore extends ObjectModel

./classes/order\Order.php

  • public function __construct($id = null, $id_lang = null)
  • public function getFields()
    /**
    @see ObjectModel::getFields()
    @return array */
  • public function add($autodate = true, $null_values = true)
  • public function getTaxCalculationMethod()
  • public function deleteProduct($order, $orderDetail, $quantity)
    /
    Does NOT delete a product but « cancel » it (which means return/refund/delete it depending of the case) */
  • public function getCartProducts()
    /**
    This function return products of the orders
    It’s similar to Order::getProducts but witrh similar outputs of Cart::getProducts *
    @return array */
  • public function deleteCustomization($id_customization, $quantity, $orderDetail)
  • public function getHistory($id_lang, $id_order_state = false, $no_hidden = false, $filters = 0)
    /**
    Get order history *
    @param integer $id_lang Language id
    @param integer $id_order_state Filter a specific order state
    @param integer $no_hidden Filter no hidden status
    @param integer $filters Flag to use specific field filter *
    @return array History entries ordered by date DESC */
  • public function getProductsDetail()
  • public function getFirstMessage()
  • public function 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) *
    @deprecated */
  • public function getProducts($products = false, $selectedProducts = false, $selectedQty = false)
    /**
    Get order products *
    @return array Products with price, quantity (with taxe and without) */
  • public static function getIdOrderProduct($id_customer, $id_product)
  • public function getTaxesAverageUsed()
  • public function getVirtualProducts()
    /**
    Count virtual products in order *
    @return int number of virtual products */
  • public function isVirtual($strict = true)
    /**
    Check if order contains (only) virtual products *
    @param boolean $strict If false return true if there are at least one product virtual
    @return boolean true if is a virtual order or false * */
  • public function getDiscounts($details = false)
    /**
    @deprecated 1.5.0.1 */
  • public function getCartRules()
  • public static function getDiscountsCustomer($id_customer, $id_cart_rule)
  • public function getCurrentState()
    /**
    Get current order state (eg. Awaiting payment, Delivered…) *
    @return int Order state id */
  • public function getCurrentStateFull($id_lang)
    /**
    Get current order state name (eg. Awaiting payment, Delivered…) *
    @return array Order state details */
  • public function hasBeenDelivered()
  • public function hasProductReturned()
    /**
    Has products returned by the merchant or by the customer? */
  • public function hasBeenPaid()
  • public function hasBeenShipped()
  • public function isInPreparation()
  • public function isPaidAndShipped()
    /**
    Checks if the current order state is paid and shipped *
    @return bool */
  • public static function getCustomerOrders($id_customer, $showHiddenStatus = false, Context $context = null)
    /**
    Get customer orders *
    @param integer $id_customer Customer id
    @param boolean $showHiddenStatus Display or not hidden order statuses
    @return array Customer orders */
  • public static function getOrdersIdByDate($date_from, $date_to, $id_customer = null, $type = null)
  • public static function getOrdersWithInformations($limit = null, Context $context = null)
  • public static function getOrdersIdInvoiceByDate($date_from, $date_to, $id_customer = null, $type = null)
    /**
    @deprecated since 1.5.0.2 *
    @static
    @param $date_from
    @param $date_to
    @param $id_customer
    @param $type *
    @return array */
  • public static function getOrderIdsByStatus($id_order_state)
    /**
    @deprecated 1.5.0.3 *
    @static
    @param $id_order_state
    @return array */
  • public function getTotalProductsWithoutTaxes($products = false)
    /**
    Get product total without taxes *
    @return Product total with taxes */
  • public function getTotalProductsWithTaxes($products = false)
    /**
    Get product total with taxes *
    @return Product total with taxes */
  • public function getCustomer()
    /**
    Get order customer
    @return Customer $customer */
  • public static function getCustomerNbOrders($id_customer)
    /**
    Get customer orders number *
    @param integer $id_customer Customer id
    @return array Customer orders number */
  • public static function getOrderByCartId($id_cart)
    /**
    Get an order by its cart id *
    @param integer $id_cart Cart id
    @return array Order details */
  • public function addDiscount($id_cart_rule, $name, $value)
    /**
    @deprecated 1.5.0.1
    @see Order::addCartRule()
    @param int $id_cart_rule
    @param string $name
    @param float $value
    @return bool */
  • public function addCartRule($id_cart_rule, $name, $values, $id_order_invoice = 0, $free_shipping = null)
    /**
    @since 1.5.0.1
    @param int $id_cart_rule
    @param string $name
    @param array $values
    @param int $id_order_invoice
    @return bool */
  • public function getNumberOfDays()
  • public function isReturnable()
    /**
    Can this order be returned by the client? *
    @return bool */
  • public static function getLastInvoiceNumber()
  • public function setInvoice($use_existing_payment = false)
    /**
    This method allows to generate first invoice of the current order */
  • public function setDelivery()
  • public static function getByDelivery($id_delivery)
  • public static function getByReference($reference)
    /**
    Get a collection of orders using reference
    @since 1.5.0.14@param string $reference
    @return Collection of Order */
  • public function getTotalWeight()
  • public static function getInvoice($id_invoice)
    /** *
    @param int $id_invoice
    @deprecated 1.5.0.1 */
  • public function isAssociatedAtGuest($email)
  • public static function getCartIdStatic($id_order, $id_customer = 0)
    /**
    @param int $id_order
    @param int $id_customer optionnal
    @return int id_cart */
  • public function getWsOrderRows()
  • public function setCurrentState($id_order_state, $id_employee = 0)
    /*
    Set current order state
    @param int $id_order_state
    @param int $id_employee (/!\ not optional except for Webservice. */
  • public function addWs($autodate = true, $nullValues = false)
  • public function deleteAssociations()
  • public function getPreviousOrderId()
    /**
    This method return the ID of the previous order
    @since 1.5.0.1
    @return int */
  • public function getNextOrderId()
    /**
    This method return the ID of the next order
    @since 1.5.0.1
    @return int */
  • public function getOrderDetailList()
    /**
    Get the an order detail list of the current order
    @return array */
  • public static function generateReference()
    /**
    Gennerate a unique reference for orders generated with the same cart id
    This references, is usefull for check payment *
    @return String */
  • public function orderContainProduct($id_product)
  • public function useOneAfterAnotherTaxComputationMethod()
    /**
    This method returns true if at least one order details uses the
    One After Another tax computation method. *
    @since 1.5.0.1
    @return boolean */
  • public function getOrderPaymentCollection()
    /**
    This method allows to get all Order Payment for the current order
    @since 1.5.0.1
    @return Collection of Order Payment */
  • public function addOrderPayment($amount_paid, $payment_method = null, $payment_transaction_id = null, $currency = null, $date = null, $order_invoice = null)
    /** *
    This method allows to add a payment to the current order
    @since 1.5.0.1
    @param float $amount_paid
    @param string $payment_method
    @param string $payment_transaction_id
    @param Currency $currency
    @param string $date
    @param OrderInvoice $order_invoice
    @return bool */
  • public function getDocuments()
    /**
    Returns the correct product taxes breakdown. *
    Get all documents linked to the current order *
    @since 1.5.0.1
    @return array */
  • public function getReturn()
  • public function getShipping()
    /**
    @return array return all shipping method for the current order
    state_name sql var is now deprecated – use order_state_name for the state name and carrier_name for the carrier_name */
  • public function getOrderSlipsCollection()
    /** *
    Get all order_slips for the current order
    @since 1.5.0.2
    @return Collection of Order slip */
  • public function getInvoicesCollection()
    /** *
    Get all invoices for the current order
    @since 1.5.0.1
    @return Collection of Order invoice */
  • public function getDeliverySlipsCollection()
    /** *
    Get all delivery slips for the current order
    @since 1.5.0.2
    @return Collection of Order invoice */
  • public function getNotPaidInvoicesCollection()
    /**
    Get all not paid invoices for the current order
    @since 1.5.0.2
    @return Collection of Order invoice not paid */
  • public function getTotalPaid($currency = null)
    /**
    Get total paid *
    @since 1.5.0.1
    @param Currency $currency currency used for the total paid of the current order
    @return float amount in the $currency */
  • public function getOrdersTotalPaid()
    /**
    Get the sum of total_paid_tax_incl of the orders with similar reference *
    @since 1.5.0.1
    @return float */
  • public function updateShippingCost($amount)
    /** *
    This method allows to change the shipping cost of the current order
    @since 1.5.0.1
    @param float $amount
    @return bool */
  • public function getProductTaxesBreakdown()
    /**
    Returns the correct product taxes breakdown. *
    @since 1.5.0.1
    @return array */
  • public function getShippingTaxesBreakdown()
    /**
    Returns the shipping taxes breakdown *
    @since 1.5.0.1
    @return array */
  • public function getWrappingTaxesBreakdown()
    /**
    Returns the wrapping taxes breakdown
    @todo
    @since 1.5.0.1
    @return array */
  • public function getEcoTaxTaxesBreakdown()
    /**
    Returns the ecotax taxes breakdown *
    @since 1.5.0.1
    @return array */
  • public function hasInvoice()
    /** *
    Has invoice return true if this order has already an invoice
    @return bool */
  • public function getWarehouseList()
    /**
    Get warehouse associated to the order *
    return array List of warehouse */
  • public function getCurrentOrderState()
    /**
    @since 1.5.0.4
    @return OrderState or null if Order haven’t a state */
  • public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
    /**
    @see ObjectModel::getWebserviceObjectList() */
  • public function getBrother()
    /**
    Get all other orders with the same reference
    @since 1.5.0.13 */
  • public function getOrderPayments()
    /**
    Get a collection of order payments
    @since 1.5.0.13 */
  • public function 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@since 1.5.0.14 */
  • public static function 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@since 1.5.0.14 */

class OrderCarrierCore extends ObjectModel

./classes/order\OrderCarrier.php

class OrderCartRuleCore extends ObjectModel

./classes/order\OrderCartRule.php

class OrderDetailCore extends ObjectModel

./classes/order\OrderDetail.php

  • public function __construct($id = null, $id_lang = null, $context = null)
  • public function delete()
  • public static function getDownloadFromHash($hash)
  • public static function incrementDownload($id_order_detail, $increment = 1)
  • public function getTaxCalculator()
    /**
    Returns the tax calculator associated to this order detail.
    @since 1.5.0.1
    @return TaxCalculator */
  • public static function getTaxCalculatorStatic($id_order_detail)
    /**
    Return the tax calculator associated to this order_detail
    @since 1.5.0.1
    @param int $id_order_detail
    @return TaxCalculator */
  • public function saveTaxCalculator(Order $order, $replace = false)
    /**
    Save the tax calculator
    @since 1.5.0.1
    @return boolean */
  • public function updateTaxAmount($order)
  • public static function getList($id_order)
    /**
    Get a detailed order list of an id_order
    @param int $id_order
    @return array */
  • public function createList(Order $order, Cart $cart, $id_order_state, $product_list, $id_order_invoice = 0, $use_taxes = true, $id_warehouse = 0)
    /**
    Create a list of order detail for a specified id_order using cart
    @param object $order
    @param object $cart
    @param int $id_order_status
    @param int $id_order_invoice
    @param bool $use_taxes set to false if you don’t want to use taxes */
  • public function getStockState()
    /**
    Get the state of the current stock product
    @return array */
  • public function setShippingCost(Order $order, $product)
    /*Set the additional shipping information@param Order $order
    @param $product */
  • public function getWsTaxes()

class OrderDiscountCore extends OrderCartRule

./classes/order\OrderDiscount.php

  • public function __get($key)
  • public function __set($key, $value)
  • public function __call($method, $args)

class OrderHistoryCore extends ObjectModel

./classes/order\OrderHistory.php

  • public function changeIdOrderState($new_order_state, $id_order, $use_existing_payment = false)
    /**
    Sets the new state of the given order *
    @param int $new_order_state
    @param int/object $id_order
    @param bool $use_existing_payment */
  • public static function getLastOrderState($id_order)
    /**
    Returns the last order state
    @param int $id_order
    @return OrderState|bool
    @deprecated 1.5.0.4
    @see Order->current_state */
  • public function addWithemail($autodate = true, $template_vars = false, Context $context = null)
    /**
    @param bool $autodate Optional
    @param array $template_vars Optional
    @param Context $context Optional
    @return bool */
  • public function add($autodate = true, $null_values = false)
  • public function isValidated()
    /**
    @return int */

class OrderInvoiceCore extends ObjectModel

./classes/order\OrderInvoice.php

  • public function getProductsDetail()
  • public function getProducts($products = false, $selectedProducts = false, $selectedQty = false)
    /**
    Get order products *
    @return array Products with price, quantity (with taxe and without) */
  • public function useOneAfterAnotherTaxComputationMethod()
    /**
    This method returns true if at least one order details uses the
    One After Another tax computation method. *
    @since 1.5
    @return boolean */
  • public function getProductTaxesBreakdown()
    /**
    Returns the correct product taxes breakdown. *
    @since 1.5
    @return array */
  • public function getShippingTaxesBreakdown($order)
    /**
    Returns the shipping taxes breakdown *
    @since 1.5
    @return array */
  • public function getWrappingTaxesBreakdown()
    /**
    Returns the wrapping taxes breakdown
    @todo
    @since 1.5
    @return array */
  • public function getEcoTaxTaxesBreakdown()
    /**
    Returns the ecotax taxes breakdown *
    @since 1.5
    @return array */
  • public static function getByDateInterval($date_from, $date_to)
    /**
    Returns all the order invoice that match the date interval *
    @since 1.5
    @static
    @param $date_from
    @param $date_to
    @return array collection of OrderInvoice */
  • public static function getByStatus($id_order_state)
    /**
    @since 1.5.0.3
    @static
    @param $id_order_state
    @return array collection of OrderInvoice */
  • public static function getByDeliveryDateInterval($date_from, $date_to)
    /**
    @since 1.5.0.3
    @static
    @param $date_from
    @param $date_to
    @return array collection of invoice */
  • public static function getCarrier($id_order_invoice)
    /**
    @since 1.5
    @static
    @param $id_order_invoice */
  • public static function getCarrierId($id_order_invoice)
    /**
    @since 1.5
    @static
    @param $id_order_invoice */
  • public static function retrieveOneById($id)
    /**
    @static
    @param $id
    @return OrderInvoice */
  • public function getTotalPaid()
    /**
    Amounts of payments
    @since 1.5.0.2
    @return float Total paid */
  • public function getRestPaid()
    /**
    Rest Paid
    @since 1.5.0.2
    @return float Rest Paid */
  • public function getSibling()
    /**
    Return collection of order invoice object linked to the payments of the current order invoice object
    @since 1.5.0.14 */
  • public function getSiblingTotal($mod = OrderInvoice::TAX_INCL)
    /**
    Return total to paid of sibling invoices
    @param int $mod TAX_EXCL, TAX_INCL, DETAIL@since 1.5.0.14 */
  • public function getGlobalRestPaid()
    /**
    Get global rest to paid
    This method will return something different of the method getRestPaid if
    there is an other invoice linked to the payments of the current invoice
    @since 1.5.0.13 */
  • public function isPaid()
    /**
    @since 1.5.0.2
    @return bool Is paid ? */
  • public function getOrderPaymentCollection()
    /**
    @since 1.5.0.2
    @return Collection of Order payment */
  • public function getInvoiceNumberFormatted($id_lang, $id_shop = null)
    /**
    Get the formatted number of invoice
    @since 1.5.0.2
    @param int $id_lang for invoice_prefix
    @return string */
  • public function saveCarrierTaxCalculator(array $taxes_amount)

class OrderMessageCore extends ObjectModel

./classes/order\OrderMessage.php

  • public static function getOrderMessages($id_lang)

class OrderPaymentCore extends ObjectModel

./classes/order\OrderPayment.php

  • public function add($autodate = true, $nullValues = false)
  • public static function getByOrderId($id_order)
    /**
    Get the detailed payment of an order
    @param int $id_order
    @return array */
  • public static function getByOrderReference($order_reference)
    /**
    Get the detailed payment of an order
    @param int $order_reference
    @return array
    @since 1.5.0.13 */
  • public static function getByInvoiceId($id_invoice)
    /**
    Get Order Payments By Invoice ID
    @static
    @param $id_invoice Invoice ID
    @return Collection Collection */
  • public function getOrderInvoice($id_order)
    /**
    Return order invoice object linked to the payment
    @param int $id_order Order Id *
    @since 1.5.0.13 */

class OrderReturnCore extends ObjectModel

./classes/order\OrderReturn.php

  • public function addReturnDetail($orderDetailList, $productQtyList, $customizationIds, $customizationQtyInput)
  • public function checkEnoughProduct($orderDetailList, $productQtyList, $customizationIds, $customizationQtyInput)
  • public function countProduct()
  • public static function getOrdersReturn($customer_id, $order_id = false, $no_denied = false, Context $context = null)
  • public static function getOrdersReturnDetail($id_order_return)
  • public static function getOrdersReturnProducts($orderReturnId, $order)
  • public static function getReturnedCustomizedProducts($id_order)
  • public static function deleteOrderReturnDetail($id_order_return, $id_order_detail, $id_customization = 0)
  • public static function getProductReturnDetail($id_order_detail)
    /**Get return details for one product line
    @param $id_order_detail */
  • public static function addReturnedQuantity(&$products, $id_order)
    /**Add returned quantity to products list
    @param array $products
    @param int $id_order */

class OrderReturnStateCore extends ObjectModel

./classes/order\OrderReturnState.php

  • public static function getOrderReturnStates($id_lang)
    /**
    Get all available order states *
    @param integer $id_lang Language id for state name
    @return array Order states */

class OrderSlipCore extends ObjectModel

./classes/order\OrderSlip.php

  • public function addSlipDetail($orderDetailList, $productQtyList)
  • public static function getOrdersSlip($customer_id, $order_id = false)
  • public static function getOrdersSlipDetail($id_order_slip = false, $id_order_detail = false)
  • public static function getOrdersSlipProducts($orderSlipId, $order)
  • public static function getProductSlipResume($id_order_detail)
    /**Get resume of all refund for one product line
    @param $id_order_detail */
  • public static function getProductSlipDetail($id_order_detail)
    /**Get refund details for one product line
    @param $id_order_detail */
  • public function getProducts()
  • public static function getSlipsIdByDate($dateFrom, $dateTo)
  • public static function createOrderSlip($order, $productList, $qtyList, $shipping_cost = false)
  • public static function createPartialOrderSlip($order, $amount, $shipping_cost_amount, $order_detail_list)
  • public function addPartialSlipDetail($order_detail_list)
  • public function getEcoTaxTaxesBreakdown()

class OrderStateCore extends ObjectModel

./classes/order\OrderState.php

  • public static function getOrderStates($id_lang)
    /**
    Get all available order states *
    @param integer $id_lang Language id for state name
    @return array Order states */
  • public static function invoiceAvailable($id_order_state)
    /**
    Check if we can make a facture when order is in this state *
    @param integer $id_order_state State ID
    @return boolean availability */
  • public function isRemovable()

class FileLoggerCore extends AbstractLogger

./classes/log\FileLogger.php

  • public function setFilename($filename)
    /**
    Check if the specified filename is writable and set the filename *
    @param string filename */
  • public function getFilename()
    /**
    Log the message *
    @param string message
    @param level */

class HelperCore

./classes/helper\Helper.php

  • public function __construct()
  • public function setTpl($tpl)
  • public function createTemplate($tpl_name)
    /**
    Create a template from the override file, else from the base file. *
    @param string $tpl_name filename
    @return Template */
  • public function generate()
    /**
    default behaviour for helper is to return a tpl fetched *
    @return void */
  • public static function renderAdminCategorieTree($translations,
    /**
    @deprecated 1.5.0 */
  • public function renderCategoryTree($root = null,
    /** *
    @param array $root array with the name and ID of the tree root category, if null the Shop’s root category will be used
    @param type $selected_cat array of selected categories * Format * Array
    ( * [0] => 1 * [1] => 2 * )
    OR * Array * ( * [1] => Array * ( * [id_category] => 1 * [name] => Home page * ) * )
    @param string $input_name name of input
    @param bool $use_radio use radio tree or checkbox tree
    @param bool $use_search display a find category search box
    @param array $disabled_categories
    @param bool $use_in_popup
    @param bool $use_shop_context
    @return string */
  • public function renderRequiredFields($class_name, $identifier, $table_fields)
    /**
    Render a form with potentials required fields *
    @param string $class_name
    @param string $identifier
    @param array $table_fields
    @return string */
  • public function renderModulesList($modules_list)
  • public static function renderShopList()

class HelperFormCore extends Helper

./classes/helper\HelperForm.php

  • public function __construct()
  • public function generateForm($fields_form)
  • public function generate()
  • public function getFieldsRequired()
    /**
    Return true if there are required fields */
  • public function renderAssoShop($disable_shared = false)
    /**
    Render an area to determinate shop association *
    @return string */

class HelperHelpAccessCore extends Helper

./classes/helper\HelperHelpAccess.php

  • public function __construct($label, $iso_lang, $country, $ps_version)
  • public function generate()
    /*@return string|void */

class HelperListCore extends Helper

./classes/helper\HelperList.php

  • public function __construct()
  • public function generateList($list, $fields_display)
    /**
    Return an html list given the data to fill it up *
    @param array $list entries to display (rows)
    @param array $fields_display fields (cols)
    @return string html */
  • public function displayEnableLink($token, $id, $value, $active, $id_category = null, $id_product = null)
    /**
    Fetch the template for action enable *
    @param string $token
    @param int $id
    @param int $value state enabled or not
    @param string $active status
    @param int $id_category
    @param int $id_product
    @return string */
  • public function displayListContent()
  • public function displayDuplicateLink($token = null, $id, $name = null)
    /**
    Display duplicate action link */
  • public function displayDetailsLink($token = null, $id, $name = null)
    /**
    Display action show details of a table row
    This action need an ajax request with a return like this:
    {
    use_parent_structure: true // If false, data need to be an html
    data:
    [
    {field_name: ‘value’}
    ],
    fields_display: // attribute $fields_list of the admin controller
    }
    or somethins like this:
    {
    use_parent_structure: false // If false, data need to be an html
    data:
    My html content’,
    fields_display: // attribute $fields_list of the admin controller
    } */
  • public function displayViewLink($token = null, $id, $name = null)
    /**
    Display view action link */
  • public function displayEditLink($token = null, $id, $name = null)
    /**
    Display edit action link */
  • public function displayDeleteLink($token = null, $id, $name = null)
    /**
    Display delete action link */
  • public function displayDefaultLink($token = null, $id, $name = null)
    /**
    Display delete action link */
  • public function displayListHeader()
    /**
    Display list header (filtering, pagination and column names) */
  • public function displayListFooter()
    /**
    Close list table and submit button */

class HelperOptionsCore extends Helper

./classes/helper\HelperOptions.php

  • public function __construct()
  • public function generateOptions($option_list)
    /**
    Generate a form for options
    @param array options
    @return string html */
  • public function displayOptionTypeImage($key, $field, $value)
    /**
    Type = image */
  • public function displayOptionTypePrice($key, $field, $value)
    /**
    Type = price */
  • public function displayOptionTypeDisabled($key, $field, $value)
    /**
    Type = disabled */
  • public function getOptionValue($key, $field)

class HelperViewCore extends Helper

./classes/helper\HelperView.php

  • public function __construct()
  • public function generateView()

class PrestaShopDatabaseExceptionCore extends PrestaShopException

./classes/exception\PrestaShopDatabaseException.php

  • public function __toString()

class PrestaShopExceptionCore extends Exception

./classes/exception\PrestaShopException.php

  • public function displayMessage()
    /**
    This method acts like an error handler, if dev mode is on, display the error else use a better silent way */

class PrestaShopModuleExceptionCore extends PrestaShopException

./classes/exception\PrestaShopModuleException.php

class PrestaShopPaymentExceptionCore extends PrestaShopException

./classes/exception\PrestaShopPaymentException.php

class DbMySQLiCore extends Db

./classes/db\DbMySQLi.php

  • public function connect()
    /**
    @see DbCore::connect() */
  • public function disconnect()
    /**
    @see DbCore::disconnect() */
  • public function nextRow($result = false)
    /**
    @see DbCore::nextRow() */
  • public function Insert_ID()
    /**
    @see DbCore::Insert_ID() */
  • public function Affected_Rows()
    /**
    @see DbCore::Affected_Rows() */
  • public function getMsgError($query = false)
    /**
    @see DbCore::getMsgError() */
  • public function getNumberError()
    /**
    @see DbCore::getNumberError() */
  • public function getVersion()
    /**
    @see DbCore::getVersion() */
  • public function _escape($str)
    /**
    @see DbCore::_escape() */
  • public function set_db($db_name)
    /**
    @see DbCore::set_db() */
  • public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix)
    /**
    @see Db::hasTableWithSamePrefix() */
  • public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5)
    /**
    @see Db::checkConnection() */
  • public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
  • static public function tryUTF8($server, $user, $pwd)
    /**
    @see Db::checkEncoding() */

class DbPDOCore extends Db

./classes/db\DbPDO.php

  • public function connect()
    /**
    @see DbCore::connect() */
  • public function disconnect()
    /**
    @see DbCore::disconnect() */
  • public function nextRow($result = false)
    /**
    @see DbCore::nextRow() */
  • public function Insert_ID()
    /**
    @see DbCore::Insert_ID() */
  • public function Affected_Rows()
    /**
    @see DbCore::Affected_Rows() */
  • public function getMsgError($query = false)
    /**
    @see DbCore::getMsgError() */
  • public function getNumberError()
    /**
    @see DbCore::getNumberError() */
  • public function getVersion()
    /**
    @see DbCore::getVersion() */
  • public function _escape($str)
    /**
    @see DbCore::_escape() */
  • public function set_db($db_name)
    /**
    @see DbCore::set_db() */
  • public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix)
    /**
    @see Db::hasTableWithSamePrefix() */
  • public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
  • public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5)
    /**
    @see Db::checkConnection() */
  • public static function tryUTF8($server, $user, $pwd)
    /**
    @see Db::checkEncoding() */

class DbQueryCore

./classes/db\DbQuery.php

  • public function select($fields)
    /**
    Add fields in query selection *
    @param string $fields List of fields to concat to other fields
    @return DbQuery */
  • public function from($table, $alias = null)
    /**
    Set table for FROM clause *
    @param string $table Table name
    @return DbQuery */
  • public function join($join)
    /**
    Add JOIN clause
    E.g. $this->join(‘RIGHT JOIN ‘._DB_PREFIX_.’product p ON …’); *
    @param string $join Complete string
    @return DbQuery */
  • public function leftJoin($table, $alias = null, $on = null)
    /**
    Add LEFT JOIN clause *
    @param string $table Table name (without prefix)
    @param string $alias Table alias
    @param string $on ON clause */
  • public function innerJoin($table, $alias = null, $on = null)
    /**
    Add INNER JOIN clause
    E.g. $this->innerJoin(‘product p ON …’) *
    @param string $table Table name (without prefix)
    @param string $alias Table alias
    @param string $on ON clause */
  • public function leftOuterJoin($table, $alias = null, $on = null)
    /**
    Add LEFT OUTER JOIN clause *
    @param string $table Table name (without prefix)
    @param string $alias Table alias
    @param string $on ON clause */
  • public function naturalJoin($table, $alias = null)
    /**
    Add NATURAL JOIN clause *
    @param string $table Table name (without prefix)
    @param string $alias Table alias */
  • public function where($restriction)
    /**
    Add a restriction in WHERE clause (each restriction will be separated by AND statement) *
    @param string $restriction
    @return DbQuery */
  • public function having($restriction)
    /**
    Add a restriction in HAVING clause (each restriction will be separated by AND statement) *
    @param string $restriction
    @return DbQuery */
  • public function orderBy($fields)
    /**
    Add an ORDER B restriction *
    @param string $fields List of fields to sort. E.g. $this->order(‘myField, b.mySecondField DESC’)
    @return DbQuery */
  • public function groupBy($fields)
    /**
    Add a GROUP BY restriction *
    @param string $fields List of fields to sort. E.g. $this->group(‘myField, b.mySecondField DESC’)
    @return DbQuery */
  • public function limit($limit, $offset = 0)
    /**
    Limit results in query *
    @param string $fields List of fields to sort. E.g. $this->order(‘myField, b.mySecondField DESC’)
    @return DbQuery */
  • public function build()
    /**
    Generate and get the query *
    @return string */
  • public function __toString()

class MySQLCore extends Db

./classes/db\MySQL.php

  • public function connect()
    /**
    @see DbCore::connect() */
  • public function disconnect()
    /**
    @see DbCore::disconnect() */
  • public function nextRow($result = false)
    /**
    @see DbCore::nextRow() */
  • public function Insert_ID()
    /**
    @see DbCore::Insert_ID() */
  • public function Affected_Rows()
    /**
    @see DbCore::Affected_Rows() */
  • public function getMsgError($query = false)
    /**
    @see DbCore::getMsgError() */
  • public function getNumberError()
    /**
    @see DbCore::getNumberError() */
  • public function getVersion()
    /**
    @see DbCore::getVersion() */
  • public function _escape($str)
    /**
    @see DbCore::_escape() */
  • public function set_db($db_name)
    /**
    @see DbCore::set_db() */
  • public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix)
    /**
    @see Db::hasTableWithSamePrefix() */
  • public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5)
    /**
    @see Db::checkConnection() */
  • public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
  • static public function tryUTF8($server, $user, $pwd)
    /**
    @see Db::checkEncoding() */

class AdminControllerCore extends Controller

./classes/controller\AdminController.php

  • public function __construct()
  • public function initBreadcrumbs()
    /**
    Set breadcrumbs array for the controller page */
  • public function initToolbarTitle()
    /**
    set default toolbar_title to admin breadcrumb *
    @return void */
  • public function viewAccess($disable = false)
    /**
    Check rights to view the current tab *
    @param bool $disable
    @return boolean */
  • public function checkToken()
    /**
    Check for security token */
  • public function ajaxProcessHelpAccess()
  • public function processFilter()
    /**
    Set the filters used for the list display */
  • public function postProcess()
    /**
    @todo uses redirectAdmin only if !$this->ajax */
  • public function processDeleteImage()
    /**
    Object Delete images */
  • public function processExport()
  • public function processDelete()
    /**
    Object Delete */
  • public function processSave()
    /**
    Call the right method for creating or updating object *
    @return mixed */
  • public function processAdd()
    /**
    Object creation */
  • public function processUpdate()
    /**
    Object update */
  • public function processUpdateFields()
    /**
    Change object required fields */
  • public function processStatus()
    /**
    Change object status (active, inactive) */
  • public function processPosition()
    /**
    Change object position */
  • public function processResetFilters()
    /**
    Cancel all filters for this tab */
  • public function initToolbar()
    /**
    assign default action in toolbar_btn smarty var, if they are not set.
    uses override to specifically add, modify or remove items * */
  • public function checkAccess()
    /**
    Check if the token is valid, else display a warning page */
  • public function displayNoSmarty()
  • public function displayAjax()
  • public function display()
  • public function initHeader()
    /**
    Assign smarty variables for the header */
  • public function addRowAction($action)
    /**
    Declare an action to use for each row in the list */
  • public function addRowActionSkipList($action, $list)
    /**
    Add an action to use for each row in the list */
  • public function initContent()
    /**
    Assign smarty variables for all default views, list and form, then call other init functions */
  • public function initCursedPage()
    /**
    initialize the invalid doom page of death *
    @return void */
  • public function initFooter()
    /**
    Assign smarty variables for the footer */
  • public function renderModulesList()
  • public function renderList()
    /**
    Function used to render the list to display for this controller */
  • public function renderView()
    /**
    Override to render the view page */
  • public function renderForm()
    /**
    Function used to render the form for this controller */
  • public function renderOptions()
    /**
    Function used to render the options for this controller */
  • public function setHelperDisplay(Helper $helper)
    /**
    this function set various display option for helper list *
    @param Helper $helper
    @return void */
  • public function setMedia()
  • public function init()
    /**
    Init context and dependencies, handles POST and GET */
  • public function initShopContext()
  • public function initProcess()
    /**
    Retrieve GET and POST value and translate them to actions */
  • public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
    /**
    Get the current objects’ list form the database *
    @param integer $id_lang Language used for display
    @param string $order_by ORDER BY clause
    @param string $_orderWay Order way (ASC, DESC)
    @param integer $start Offset in LIMIT clause
    @param integer $limit Row count in LIMIT clause */
  • public function getModulesList($filter_modules_list)
  • public function getLanguages()
  • public function getFieldsValue($obj)
    /**
    Return the list of fields value *
    @param object $obj Object
    @return array */
  • public function getFieldValue($obj, $key, $id_lang = null)
    /**
    Return field value if possible (both classical and multilingual fields) *
    Case 1 : Return value if present in $_POST / $_GET
    Case 2 : Return object value *
    @param object $obj Object
    @param string $key Field name
    @param integer $id_lang Language id (optional)
    @return string */
  • public function validateRules($class_name = false)
    /**
    Manage page display (form, list…) *
    @param string $className Allow to validate a different class than the current one */
  • public function viewDetails()
    /**
    Display object details */
  • public function beforeUpdateOptions()
    /**
    Can be overriden */
  • public function displayRequiredFields()
    /**
    prepare the view to display the required fields form */
  • public function createTemplate($tpl_name)
    /**
    Create a template from the override file, else from the base file. *
    @param string $tpl_name filename
    @return Template */
  • public function jsonConfirmation($message)
    /**
    Shortcut to set up a json success payload *
    @param $message success message */
  • public function jsonError($message)
    /**
    Shortcut to set up a json error payload *
    @param $message error message */
  • public function isFresh($file, $timeout = 604800000)
  • public function refresh($file_to_refresh, $external_file)
  • public function fillModuleData(&$module, $output_type = ‘link’, $back = null)
  • public function displayModuleOptions($module, $output_type = ‘link’, $back = null)

class FrontControllerCore extends Controller

./classes/controller\FrontController.php

  • public function __construct()
  • public function checkAccess()
    /**
    @see Controller::checkAccess() *
    @return boolean */
  • public function viewAccess()
    /**
    @see Controller::viewAccess *
    @return boolean */
  • public function init()
  • public function postProcess()
  • public function initContent()
  • public function displayHeader($display = true)
    /**
    @deprecated 1.5.0 */
  • public function displayFooter($display = true)
    /**
    @deprecated 1.5.0 */
  • public function initCursedPage()
  • public function process()
  • public function redirect()
  • public function displayContent()
    /**
    1.4 retrocompatibility – will be removed in 1.6 */
  • public function display()
  • public function setMobileMedia()
    /**
    Specific medias for mobile device. */
  • public function setMedia()
  • public function initHeader()
  • public function initFooter()
  • public function checkLiveEditAccess()
  • public function getLiveEditFooter()
  • public function productSort()
  • public function pagination($nbProducts = 10)
  • public static function getCurrentCustomerGroups()
  • public function isTokenValid()
    /**
    Check if token is valid *
    @since 1.5.0
    @return bool */
  • public function addCSS($css_uri, $css_media_type = ‘all’)
    /**
    Add one or several CSS for front, checking if css files are overriden in theme/css/modules/ directory *
    @see Controller::addCSS() */
  • public function addJS($js_uri)
    /**
    Add one or several JS files for front, checking if js files are overriden in theme/js/modules/ directory *
    @see Controller::addJS() */
  • public function setTemplate($default_template)
    /**
    This is overrided to manage is behaviour
    if a customer access to the site with mobile device. */
  • public function getOverrideTemplate()
    /**
    Returns the template corresponding to the current page.
    By default this method return false but could easily be overridden in a specific controller *
    @since 1.5
    @return bool */
  • public function getLayout()
    /**
    Returns the layout corresponding to the current page by using the override system
    Ex:
    On the url: http://localhost/index.php?id_product=1&controller=product, this method will
    check if the layout exists in the following files (in that order), and return the first found:
    – /themes/default/override/layout-product-1.tpl
    – /themes/default/override/layout-product.tpl
    – /themes/default/layout.tpl *
    @since 1.5
    @return bool|string */
  • public function setMobileTemplate($template)
    /**
    This checks if the template set is available for mobile themes,
    otherwise the front template is choosen. */
  • public function initLogoAndFavicon()
    /**
    Return an array with specific logo and favicon,
    if mobile device *
    @since 1.5
    @return array */

class ModuleFrontControllerCore extends FrontController

./classes/controller\ModuleFrontController.php

  • public function __construct()
  • public function setTemplate($template)
    /**
    Assign module template *
    @param string $template */
  • public function getTemplatePath()
    /**
    Get path to front office templates for the module *
    @return string */

class CacheApcCore extends Cache

./classes/cache\CacheApc.php

  • public function __construct()
  • public function flush()
    /**
    @see Cache::flush() */

class CacheFsCore extends Cache

./classes/cache\CacheFs.php

  • public function flush()
    /**
    @see Cache::flush() */
  • public static function deleteCacheDirectory()
    /**
    Delete cache directory */
  • public static function createCacheDirectories($level_depth, $directory = false)
    /**
    Create cache directory *
    @param int $level_depth
    @param string $directory */

class CacheMemcacheCore extends Cache

./classes/cache\CacheMemcache.php

  • public function __construct()
  • public function __destruct()
  • public function connect()
    /**
    Connect to memcache server */
  • public function flush()
    /**
    @see Cache::flush() */
  • public static function addServer($ip, $port, $weight)
    /**
    Add a memcache server *
    @param string $ip
    @param int $port
    @param int $weight */
  • public static function getMemcachedServers()
    /**
    Get list of memcached servers *
    @return array */
  • public static function deleteServer($id_server)
    /**
    Delete a memcache server *
    @param int $id_server */

class CacheXcacheCore extends Cache

./classes/cache\CacheXcache.php

  • public function __construct()
  • public function flush()
    /**
    @see Cache::flush() */
Deja una respuesta
You May Also Like