musti4300 Posted October 23, 2016 Share Posted October 23, 2016 HiI want to set the price from each supplieres related to the product. so when i click on the prodcut it will show me the price for each supplier???? $product = new Product(); $product->price = $price; $product->wholesale_price = $data[8]; $product->id_supplier = 3;How does the code looks like , maybe like this?????$product->supplier_price =199;?? Link to comment Share on other sites More sharing options...
rocky Posted October 24, 2016 Share Posted October 24, 2016 You should use the ProductSupplier class to set the prices. For example: $product_supplier = new ProductSupplier(); $product_supplier->id_supplier = 3; $product_supplier->id_product = 10; $product_supplier->id_product_attribute = 123; $product_supplier->product_supplier_reference = 'Reference'; $product_supplier->id_currency = 1; $product_supplier->product_supplier_price_te = 199; $product_supplier->add(); Change 3 to the supplier ID, 10 to the product ID, 123 to the product attribute ID if applicable, 'Reference' to the supplier reference, 1 to the currency ID and 199 to the supplier price excluding tax. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now