cuadrao Posted October 26, 2012 Share Posted October 26, 2012 (edited) Somebody knows how could I show supplier's address in supplier products' list (after supplier's description)? Thanks! Edited October 26, 2012 by cuadrao (see edit history) Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted October 26, 2012 Share Posted October 26, 2012 Hi, You will need to change 2 files: SupplierController.php and supplier.tpl. override/controllers/front/SupplierController.php class SupplierController extends SupplierControllerCore { protected function assignOne() { $nbProducts = $this->supplier->getProducts($this->supplier->id, null, null, null, $this->orderBy, $this->orderWay, true); $this->pagination((int)$nbProducts); $id_address = Address::getAddressIdBySupplierId($this->supplier->id); if ($id_address > 0) { $address = new Address((int)$id_address); } $this->context->smarty->assign(array( 'nb_products' => $nbProducts, 'products' => $this->supplier->getProducts($this->supplier->id, $this->context->cookie->id_lang, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay), 'path' => ($this->supplier->active ? Tools::safeOutput($this->supplier->name) : ''), 'supplier' => $this->supplier, 'supplier_address' => $address, )); } } in themes/your_theme/supplier.tpl file insert the following code: <h2>{$supplier_address->address1|escape:'htmlall':'UTF-8'}</h2> Regards 2 Link to comment Share on other sites More sharing options...
cuadrao Posted October 26, 2012 Author Share Posted October 26, 2012 Thank you very much, Alexander. It works perfectly! Link to comment Share on other sites More sharing options...
kelvz Posted September 16, 2013 Share Posted September 16, 2013 where did you get the suppliers addresses? i am using version 1.4.8 and i don't have any controls to add suppliers addresses to my back office... the only thing is i have manufacturers addresses... Link to comment Share on other sites More sharing options...
[email protected] Posted February 22, 2015 Share Posted February 22, 2015 Hi, am not sure how to start my own topic but it must be similar to this, looking to add the manufacturers address. Yes, I have found where to add the address but when updating both the address section and the manufacturer list, I get informed when I click on the manufacturer that there is no address.Nor am I amble to choose any of the manufacturers when I want to add an address. So, perhaps this is really where the problem is. Am only able to work in back office because I am not accustomed to working with code. Can you help? Link to comment Share on other sites More sharing options...
Recommended Posts