$id
$id : integer
Holds Stock
removeCarrier(integer $id_carrier, integer $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
integer | $id_carrier | Id of the carrier to remove |
integer | $id_warehouse | optional Id of the warehouse to filter |
setProductLocation(integer $id_product, integer $id_product_attribute, integer $id_warehouse, string $location) : boolean
For a given {product, product attribute} sets its location in the given warehouse First, for the given parameters, it cleans the database before updating
integer | $id_product | ID of the product |
integer | $id_product_attribute | Use 0 if this product does not have attributes |
integer | $id_warehouse | ID of the warehouse |
string | $location | Describes the location (no lang id required) |
Success/Failure
getProductLocation(integer $id_product, integer $id_product_attribute, integer $id_warehouse) : string
For a given {product, product attribute} gets its location in the given warehouse
integer | $id_product | ID of the product |
integer | $id_product_attribute | Use 0 if this product does not have attributes |
integer | $id_warehouse | ID of the warehouse |
Location of the product
getProductWarehouseList(integer $id_product, integer $id_product_attribute, integer $id_shop = null) : array
For a given {product, product attribute} gets warehouse list
integer | $id_product | ID of the product |
integer | $id_product_attribute | Optional, uses 0 if this product does not have attributes |
integer | $id_shop | Optional, ID of the shop. Uses the context shop id (@see Context::shop) |
Warehouses (ID, reference/name concatenated)
getWarehouses(boolean $ignore_shop = false, integer $id_shop = null) : array
Gets available warehouses It is possible via ignore_shop and id_shop to filter the list with shop id
boolean | $ignore_shop | Optional, false by default - Allows to get only the warehouses that are associated to one/some shops (@see $id_shop) |
integer | $id_shop | Optional, Context::shop::Id by default - Allows to define a specific shop to filter. |
Warehouses (ID, reference/name concatenated)
getWarehousesByProductId(integer $id_product, integer $id_product_attribute) : array
For a given product, returns the warehouses it is stored in
integer | $id_product | Product Id |
integer | $id_product_attribute | Optional, Product Attribute Id - 0 by default (no attribues) |
Warehouses Ids and names