guest* Posted November 11, 2010 Share Posted November 11, 2010 How can I get the manufacturers WITH Link to manufacturer page in product.tpl. I included this code, but don't know how can I build the link so when you click there you wil come to manufactuer page. I also want the manufacturer displayed underscored <!--manufacturer --> {l s='Hersteller'}: {$product->manufacturer_name|escape:'htmlall':'UTF-8'} Link to comment Share on other sites More sharing options...
rocky Posted November 12, 2010 Share Posted November 12, 2010 Unfortunately, you can't access the manufacturer link from the product object, so you will need to add code to product.php to pass in the link. Change line 111 of product.php (in PrestaShop v1.3.2) from: $product = new Product($id_product, true, intval($cookie->id_lang)); to: $product = new Product($id_product, true, intval($cookie->id_lang)); $manufacturer = new Manufacturer($product->id_manufacturer, intval($cookie->id_lang)); $smarty->assign('manufacturer_link', $link->getManufacturerLink($manufacturer->id, $manufacturer->link_rewrite)); then you can use the following in product.tpl: <!--manufacturer --> {l s='Hersteller'}: <a href="{$manufacturer_link}">{$product->manufacturer_name|escape:'htmlall':'UTF-8'} Link to comment Share on other sites More sharing options...
guest* Posted November 12, 2010 Author Share Posted November 12, 2010 Thxs. Rocky, it works like a charm... Link to comment Share on other sites More sharing options...
rocky Posted November 12, 2010 Share Posted November 12, 2010 Great. Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Trove Posted December 15, 2010 Share Posted December 15, 2010 Great post, i use it in my store and it works like a charm. Link to comment Share on other sites More sharing options...
Trove Posted January 25, 2011 Share Posted January 25, 2011 i cannot seem to get this to work in the 1.4.x version, the product.php is completely different than the one used in 1.3.x . Link to comment Share on other sites More sharing options...
kombat2000 Posted January 31, 2011 Share Posted January 31, 2011 thanks a lot.it's very usefull Link to comment Share on other sites More sharing options...
vineshkumar Posted February 1, 2011 Share Posted February 1, 2011 Thanks from me too...solved me issue also Link to comment Share on other sites More sharing options...
Trove Posted February 4, 2011 Share Posted February 4, 2011 Is there a way to use this in the product-list.tpl too? i tried it but i cant seem to get this to work. Link to comment Share on other sites More sharing options...
marsupulami Posted March 3, 2011 Share Posted March 3, 2011 Doesn't work for 1.3.6 Link to comment Share on other sites More sharing options...
guest* Posted April 6, 2011 Author Share Posted April 6, 2011 @marsupulami. It works on 1.3.6. but not more on 1.4.0.17. Did you checked your code ? Cleared the folder of /tools/smarty/compile on your FTP ? Cleared browser cache ? Link to comment Share on other sites More sharing options...
Usman Ahmed Posted July 14, 2011 Share Posted July 14, 2011 Work fine, Thanks Nethercott Constructions. Link to comment Share on other sites More sharing options...
JulianM Posted October 11, 2011 Share Posted October 11, 2011 Sorry the last msg is too old but I just found the solution in 1.4.x - There is a product_manufacturer that is passed to Smarty by the controller so you can use that variable in smarty to get the link. Hope this helps. Link to comment Share on other sites More sharing options...
guest* Posted October 12, 2011 Author Share Posted October 12, 2011 And which is the variable for product.tpl and 1.4.X ? The old one does not assign anymore. Link to comment Share on other sites More sharing options...
gregor0306 Posted May 28, 2012 Share Posted May 28, 2012 When you change content in Product.php without properly overriding it your changes will be erased with next Prestashop upgrade, right? Link to comment Share on other sites More sharing options...
christophe12 Posted January 30, 2013 Share Posted January 30, 2013 For this upgrade in 1.5.3 edit product.tpl in your template and change line 224 in : <h2 itemprop="brand"><a href="{$link->getmanufacturerLink($product->id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</a></h2> 1 Link to comment Share on other sites More sharing options...
amerigeau Posted May 24, 2013 Share Posted May 24, 2013 For this upgrade in 1.5.3 edit product.tpl in your template <h2 itemprop="brand"><a href="{$link->getmanufacturerLink($product->id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</a></h2> Merci pour ce tip, très utile et qui tombe à pic 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