rodrigo_neo Posted March 14, 2017 Share Posted March 14, 2017 Hi. im triying to add manufactures address into product page. I overwrite ProductCrontroller \controllers\front\ProductController.php by adding this line at 295: $productManufacturer_address = new Address((int) $productManufacturer->id_address, $this->context->language->id); then assign smarty var, etc.... the thing is $productManufacturer->id_address is empty, so obiously nothing is displayed i check in Back office and bd an the manufacturer has the right address. $productManufacturer is generated in this line: $productManufacturer = new Manufacturer((int) $this->product->id_manufacturer, $this->context->language->id); $productManufacturer is fill whit the right data, but id_address is empty Any help? HOw can i get manufacturer id address? Thanks! Link to comment Share on other sites More sharing options...
rodrigo_neo Posted March 16, 2017 Author Share Posted March 16, 2017 Please i need advice! Any other way to get id_address? Thanks Link to comment Share on other sites More sharing options...
rodrigo_neo Posted March 17, 2017 Author Share Posted March 17, 2017 Im fix it my self. I think its a prestashop bug but i dont know how to tell to the devs. i create a override of manufacture whit this code: class Manufacturer extends ManufacturerCore { public function __construct($id = null, $idLang = null) { parent::__construct($id, $idLang); $this->id_address = Manufacturer::getManufacturerAddress(); } } Now with apropiate calls and smarty variables, no problem in display address in product page. Im using prestashop 1.7 Thanks! 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