Sharak Posted November 28, 2013 Share Posted November 28, 2013 (edited) http://5.9.94.3/~akademia/en/3_alivar It's quite strange problem. Link above should load manufacturer page, but it looks like only manufacturer.tpl is loaded. All others, including header.tpl and footer.tpl are missing. Core files must be fine cause on default theme this page looks OK, but it can't be my theme's fault as manufacturer.tpl is exactly the same as the one in default theme and all other pages load just fine. Presta 1.5.6.0 Edited November 29, 2013 by Sharak (see edit history) Link to comment Share on other sites More sharing options...
ibndawood Posted November 28, 2013 Share Posted November 28, 2013 Hi Sharak, This is what I think your problem is not in your manufacture.tpl but product-list.tpl which is being called from manufacturer.tpl. In your product-list.tpl you must have added code to display manufacturer's link. In default theme it does not display manufacturer link. So its most likely that the code you added to display manufacturer link (and image) in the product-list.tpl is causing the problem. 1 Link to comment Share on other sites More sharing options...
Sharak Posted November 28, 2013 Author Share Posted November 28, 2013 (edited) Thanks. Your absolutely right But I still need manufacturer's image and link in product-list.tpl so how can I achieve that without ruining manufacturer page? Edited November 28, 2013 by Sharak (see edit history) Link to comment Share on other sites More sharing options...
ibndawood Posted November 29, 2013 Share Posted November 29, 2013 <a href="{$link->getmanufacturerLink($product.id_manufacturer, $product.link_rewrite)|escape:'htmlall':'UTF-8'}" class="lnk_img"> <img src="{$img_manu_dir}{$product.id_manufacturer|escape:'htmlall':'UTF-8'}-medium_default.jpg" alt="" /> </a> Add this code anywhere within the foreach loop in your product-list.tpl. It should be within the foreach loop because {$product} is available only within the foreach loop. 1 Link to comment Share on other sites More sharing options...
Sharak Posted November 29, 2013 Author Share Posted November 29, 2013 Works like a charm Thank you! Only thing missing is a condition when product doesn't have manufacturer set, so just to get rid of ?-images: {if $product.id_manufacturer != 0} <a href="{$link->getmanufacturerLink($product.id_manufacturer, $product.link_rewrite)|escape:'htmlall':'UTF-8'}" class="lnk_img"> <img src="{$img_manu_dir}{$product.id_manufacturer|escape:'htmlall':'UTF-8'}-manufacturer.jpg" alt="" /> </a> {/if} Link to comment Share on other sites More sharing options...
ibndawood Posted November 29, 2013 Share Posted November 29, 2013 Glad it worked for you. get rid of what ? sorry I did not understand that part. Link to comment Share on other sites More sharing options...
Sharak Posted November 29, 2013 Author Share Posted November 29, 2013 If product doesn't have manufacturer set then there's an image with ? instead manufacturer's logo. So I added {if} section just to get rid of that Link to comment Share on other sites More sharing options...
phpdeveloper Posted February 7, 2014 Share Posted February 7, 2014 Hi, I want to add the manufacture names in product-list page. is it possible to call from product-list page? Link to comment Share on other sites More sharing options...
Sharak Posted February 7, 2014 Author Share Posted February 7, 2014 Use {$product.manufacturer_name} Link to comment Share on other sites More sharing options...
rajlaskar Posted May 10, 2014 Share Posted May 10, 2014 <a href="{$link->getmanufacturerLink($product.id_manufacturer, $product.link_rewrite)|escape:'htmlall':'UTF-8'}" class="lnk_img"> <img src="{$img_manu_dir}{$product.id_manufacturer|escape:'htmlall':'UTF-8'}-medium_default.jpg" alt="" /> </a> hi the manufacturer link become www.domain/manufacturerID_productURLreWRITEN , then when clicked, its redirect to www.domain/manufacturerID_ManufacutererName why is it like that, any specific reason? i would have been good if manufacturer name is passed in first place is not? Link to comment Share on other sites More sharing options...
rajlaskar Posted May 10, 2014 Share Posted May 10, 2014 manufacturer url should be {$link->getmanufacturerLink($product->id_manufacturer, $manufacturer.link_rewrite)} Link to comment Share on other sites More sharing options...
Recommended Posts