selin Posted January 10, 2014 Share Posted January 10, 2014 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? thx. Link to comment Share on other sites More sharing options...
selin Posted January 10, 2014 Author Share Posted January 10, 2014 upppp Link to comment Share on other sites More sharing options...
vekia Posted January 10, 2014 Share Posted January 10, 2014 it's because addToSupplier function doesn't exist. try with addSupplierReference 1 Link to comment Share on other sites More sharing options...
selin Posted January 23, 2014 Author Share Posted January 23, 2014 it's because addToSupplier function doesn't exist. try with addSupplierReference Exactly how should I use? For example, could you give? Thank you! Link to comment Share on other sites More sharing options...
vekia Posted January 23, 2014 Share Posted January 23, 2014 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 More sharing options...
Recommended Posts