dittetved Posted January 17, 2014 Share Posted January 17, 2014 I am building my first site in prestashop and i need to change the look of the manufacturer-list.tpl. I want the pagination to be removed and instead i want all manufacturers shown in a grid on one single page. I have created the grid and removed this line: {include file="./nbr-product-page.tpl" paginationId='bottom'} but that is not enough. Now the pagination is gone but it only shows 10 manufacturers. My manufacturer page is here: http://nationgym.test.celto.dk/manufacturers Link to comment Share on other sites More sharing options...
vekia Posted January 17, 2014 Share Posted January 17, 2014 it's related to manufacturers controller: $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); change it to $this->n = abs((int)(Tools::getValue('n', 99))); where the 99 is an number of manufacturers to display 3 Link to comment Share on other sites More sharing options...
typoman Posted September 17, 2014 Share Posted September 17, 2014 Thanks for the help on this. I was looking exactly for that solution. But it could not be the same solution for suppliers - the supplier controller looks different. How can I achieve the same effect (all suppliers on one page, without pagination) for suppliers? I deleted the includ of pagination.tpl on the end of supplier-list.tpl in my theme. But i only got 15 items - which comes from the setting of «shown products per page». Is there a solution for this? best regards, typoman Link to comment Share on other sites More sharing options...
vekia Posted September 18, 2014 Share Posted September 18, 2014 there is a code like: $suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->n); change $this->n to any other number you want (number of suppliers per page) Link to comment Share on other sites More sharing options...
MarionGeorges Posted August 17, 2016 Share Posted August 17, 2016 (edited) Hello, sorry to ask after 2 years, but the change for the supplier's page don't work. I did what you're explain : $suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->99); I tried to add some '99' or "99", but still not working, the page is broken with this change. Is Typoman successed in this supplier change ? there is a code like: $suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->n); change $this->n to any other number you want (number of suppliers per page) Edited August 17, 2016 by MarionGeorges (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2016 Share Posted August 18, 2016 the page is broken with this change. what you mean by broken? you see some errors? can you post them here if so ? Link to comment Share on other sites More sharing options...
Prestapol Posted December 27, 2017 Share Posted December 27, 2017 How to show all manufacturers all in one single page? I mean, how to modify pagination to show all manufacturers? I have Prestashop 1.6.1.17. Link to comment Share on other sites More sharing options...
lomi Posted December 27, 2017 Share Posted December 27, 2017 On 9/18/2014 at 10:59 PM, vekia said: there is a code like: $suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->n); change $this->n to any other number you want (number of suppliers per page) Hello, I also would need the solution to remove the limit of displayed manufacturers. It seems that this code has changed in newer versions, so maybe you could share the modifications that have to be done on them, i'm using 1.6.1.10. Thanks! Link to comment Share on other sites More sharing options...
Prestapol Posted January 16, 2018 Share Posted January 16, 2018 Nobody can help us? Link to comment Share on other sites More sharing options...
CJV Posted May 20, 2020 Share Posted May 20, 2020 En 17/1/2014 a las 10:21 PM, vekia dijo: it's related to manufacturers controller: $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); change it to $this->n = abs((int)(Tools::getValue('n', 99))); where the 99 is an number of manufacturers to display Hi Vekia, How can I make this modification on prestashop 1.6.1.23? thanks in advance. Link to comment Share on other sites More sharing options...
CJV Posted August 9, 2022 Share Posted August 9, 2022 Any solution to this please? I want to show all the manufacturers in one page. Now it is showing only 10 per page. @vekia code doesn´t work on prestashop 1.6.1.23 Thanks in advance! Link to comment Share on other sites More sharing options...
CJV Posted August 11, 2022 Share Posted August 11, 2022 Well, I have been able to do it! I share it in case it helps someone else: MOD TO SHOW ALL THE BRANDS (MANUFACTURERS) IN A SINGLE PAGE WITHOUT PAGINATION IN PRESTASHOP 1.6.1.23 \controllers\front\ManufacturerController.php protected function assignAll() { if (Configuration::get('PS_DISPLAY_SUPPLIERS')) { $data = Manufacturer::getManufacturers(false, $this->context->language->id, true, false, false, false); $nbProducts = count($data); $this->pagination($nbProducts); $data = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, $this->n, false); Modify "$this->n" by the amount we are interested in, in this case 999999999 if (Configuration::get('PS_DISPLAY_SUPPLIERS')) { $data = Manufacturer::getManufacturers(false, $this->context->language->id, true, false, false, false); $nbProducts = count($data); $this->pagination($nbProducts); $data = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, 9999999, false); And as an extra I share with you how I modify my "manufacturers-list.tpl", where I show all the manufacturers with images, separated by alphabetical order and with shortcut selector by letter. I hope it helps someone. In case something changes regarding the default theme, I warn you that I use the panda theme by sunnytoo. {capture name=path}{l s='Manufacturers:'}{/capture} <h1 class="page-heading product-listing"> {l s='Brands'} <span class="heading-counter"> {if $nbManufacturers == 0}{l s='There are no manufacturers.'} {else} {if $nbManufacturers == 1} {l s='There is 1 brand'} {else} {l s='There are %d brands' sprintf=$nbManufacturers} {/if} {/if} </span> </h1> <div id="toc_container"> <!-- <p class="toc_title" style="text-align: left;">Acceso rápido</p> --> <ul class="toc_list"> {foreach from=$manufacturers item=manufacturer name=manufacturers} {if !isset($currentLetter)} {$currentLetter = $manufacturer.name|substr:0:1} <li style="float: left; padding: 5px 28px 5px 0;"><a style="font-size: 1.4em; color: #ed93b1; font-weight: bold; " href="#{if in_array($currentLetter, array(0,1,2,3,4,5,6,7,8,9))}0-9{else}{$manufacturer.name|substr:0:1}{/if}">{if in_array($currentLetter, array(0,1,2,3,4,5,6,7,8,9))}0-9{else}{$manufacturer.name|substr:0:1}{/if}</a></li> {else if isset($currentLetter) && $currentLetter != $manufacturer.name|substr:0:1 && (string)($manufacturer.name|substr:0:1) != (string)((int)($manufacturer.name|substr:0:1))} {$currentLetter = $manufacturer.name|substr:0:1} <li style="float: left; padding: 5px 28px 5px 0;"><a style="font-size: 1.4em; color: #ed93b1; font-weight: bold;" href="#{$manufacturer.name|substr:0:1}">{$manufacturer.name|substr:0:1}</a></li> {/if} {/foreach} </ul> </div> {if isset($errors) AND $errors} {include file="$tpl_dir./errors.tpl"} {else} <div class="content_sortPagiBar" style="border-bottom: 1px solid #d7d7d9;"> </div> <!-- .content_sortPagiBar --> <ul id="manufacturers_list" class="product_list"> {foreach from=$manufacturers item=manufacturer name=manufacturers} {if !isset($currentLetter)} {$currentLetter = $manufacturer.name|substr:0:1} <li id="{if in_array($currentLetter, array(0,1,2,3,4,5,6,7,8,9))}0-9{else}{$manufacturer.name|substr:0:1}{/if}" class="alphabetical"><h3>{if in_array($currentLetter, array(0,1,2,3,4,5,6,7,8,9))}0-9{else}{$manufacturer.name|substr:0:1}{/if}</h3></li> {else if isset($currentLetter) && $currentLetter != $manufacturer.name|substr:0:1 && (string)($manufacturer.name|substr:0:1) != (string)((int)($manufacturer.name|substr:0:1))} {$currentLetter = $manufacturer.name|substr:0:1} <li id="{$manufacturer.name|substr:0:1}" class="alphabetical"><h3>{$manufacturer.name|substr:0:1}</h3></li> {/if} <li class="col-xs-6 col-sm-3 col-md-3"> <div class="mansup-container"> <div style="text-align:center;"> <a class="lnk_img" href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'html':'UTF-8'}" title="{$manufacturer.name|escape:'html':'UTF-8'}" > <img src="{$img_manu_dir}{$manufacturer.image|escape:'html':'UTF-8'}.jpg" width="125" height="125" alt="{$manufacturer.name|escape:'html':'UTF-8'}" /> </a> <h3 class="s_title_block"> <a class="product-name" href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'html':'UTF-8'}"> {$manufacturer.name|truncate:60:'...'|escape:'html':'UTF-8'} </a> </h3> </div> </div> </li> {/foreach} </ul> {/if} 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