Jump to content

AddToCategories vs AddToManufacturer


Recommended Posts

Hi PrestaShop!

 

I can, product => category. (auto save)
my code: $product->addToCategories($product->id_category_default); 

 

okey..

 

BUT!

 

I can't save, product => supplier. :(

my code: $product->addToSupplier($product->id_supplier);

 

How can I do?  :unsure:

thx.

 
Link to comment
Share on other sites

  • 2 weeks later...

for example:

 

$this->addSupplierReference($id_supplier, $id_product_attribute);

where id_supplier is an id of your supplier and id_product_attribute id of attribute.

 

 

detailed explanation of variables:

    /**
     * Sets or updates Supplier Reference
     *
     * @param int $id_supplier
     * @param int $id_product_attribute
     * @param string $supplier_reference
     * @param float $price
     * @param int $id_currency
     */
    public function addSupplierReference($id_supplier, $id_product_attribute, $supplier_reference = null, $price = null, $id_currency = null)
    {

Link to comment
Share on other sites

×
×
  • Create New...