onecallhire Posted January 6, 2014 Share Posted January 6, 2014 (edited) Hi, i am trying to change the order of the manufactures block. i have looked at other posts and have tried the solutions but none of them work. i am using version 1.5.6.0. Edited January 7, 2014 by onecallhire (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 What do you mean exactly? the module's position? Or the order in which manufacturers are displayed in it? Link to comment Share on other sites More sharing options...
onecallhire Posted January 6, 2014 Author Share Posted January 6, 2014 the order in which they are displayed Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 You must edit this: $sql = 'SELECT m.*, ml.`description`, ml.`short_description` FROM `'._DB_PREFIX_.'manufacturer` m LEFT JOIN `'._DB_PREFIX_.'manufacturer_lang` ml ON ( m.`id_manufacturer` = ml.`id_manufacturer` AND ml.`id_lang` = '.(int)$id_lang.' ) '.Shop::addSqlAssociation('manufacturer', 'm'); if ($active) $sql .= ' WHERE m.`active` = 1'; $sql .= ' GROUP BY m.id_manufacturer ORDER BY m.`name` ASC'. ($p ? ' LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n : ''); In classes/Manufacturer.php CHange the ORDER BY, of course. Although I think the don't have a 'position' order, and you can only order them by either name or id (logically of course) Link to comment Share on other sites More sharing options...
onecallhire Posted January 6, 2014 Author Share Posted January 6, 2014 if i was to give the manufactures a prefix of 01. 02. 03. etc. is there a way to hide the prefix? Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 Yes, you can then use a modifier in blockmanufacturer.tpl, like {$manufacturer.name|substr:3} This will take chars from the third on, removing the first 2 digits in your case Link to comment Share on other sites More sharing options...
onecallhire Posted January 6, 2014 Author Share Posted January 6, 2014 where abouts in the block manufacturer.tpl file will that go, as i looked and there are multiple occurrences of {$manufacturer.name} Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 Ideally, every of them Link to comment Share on other sites More sharing options...
onecallhire Posted January 6, 2014 Author Share Posted January 6, 2014 i have made the changes but it still doesnt work. Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 Have you modified the tpl file in the theme's folder? or base modules folder? Link to comment Share on other sites More sharing options...
onecallhire Posted January 6, 2014 Author Share Posted January 6, 2014 i went to: /modules/blockmanufacturer should i have done it in the themes folder? Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2014 Share Posted January 6, 2014 If it's there, yes Link to comment Share on other sites More sharing options...
onecallhire Posted January 6, 2014 Author Share Posted January 6, 2014 it worked thank you. just one more thing. how will i do it for the manufacturers page? Link to comment Share on other sites More sharing options...
onecallhire Posted January 7, 2014 Author Share Posted January 7, 2014 (edited) Never Mind i figured it out Edited January 7, 2014 by onecallhire (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts