Properties

$id_product

$id_product : integer

Type

integer — product ID

$id_product_attribute

$id_product_attribute : integer

Type

integer — product attribute ID

$id_supplier

$id_supplier : integer

Type

integer — the supplier ID

$product_supplier_reference

$product_supplier_reference : string

Type

string — The supplier reference of the product

$id_currency

$id_currency : integer

Type

integer — the currency ID for unit price tax excluded

$product_supplier_price_te

$product_supplier_price_te : string

Type

string — The unit price tax excluded of the product

$definition

$definition : 

Type

$webserviceParameters

$webserviceParameters : 

Type

Methods

delete()

delete() 

getProductSupplierReference()

getProductSupplierReference(integer  $id_product, integer  $id_product_attribute, integer  $id_supplier) : string

For a given product and supplier, gets the product supplier reference

Parameters

integer $id_product
integer $id_product_attribute
integer $id_supplier

Returns

string

getProductSupplierPrice()

getProductSupplierPrice(integer  $id_product, integer  $id_product_attribute, integer  $id_supplier, boolean  $with_currency = false) : array

For a given product and supplier, gets the product supplier unit price

Parameters

integer $id_product
integer $id_product_attribute
integer $id_supplier
boolean $with_currency

Optional

Returns

array

getIdByProductAndSupplier()

getIdByProductAndSupplier(integer  $id_product, integer  $id_product_attribute, integer  $id_supplier) : array

For a given product and supplier, gets corresponding ProductSupplier ID

Parameters

integer $id_product
integer $id_product_attribute
integer $id_supplier

Returns

array

getSupplierCollection()

getSupplierCollection(integer  $id_product, integer  $group_by_supplier = true) : \PrestaShopCollection

For a given product, retrieves its suppliers

Parameters

integer $id_product
integer $group_by_supplier

Returns

\PrestaShopCollection —

Collection of ProductSupplier

getProductPrice()

getProductPrice(  $id_supplier, integer  $id_product, integer  $id_product_attribute, boolean  $converted_price = false) : Array

For a given Supplier, Product, returns the purchased price

Parameters

$id_supplier
integer $id_product
integer $id_product_attribute

Optional

boolean $converted_price

Optional

Returns

Array —

keys: price_te, id_currency