Jump to content

How to edit count of products at main page?


Recommended Posts

noodly,

can you re-write your question, as it's not clear what you are referring to.

"15 page at main page"

"print only 8 items"  (do you mean new products, or best sellers, or popular products or so???)

 

please elaborate.

 

pascal.

Link to comment
Share on other sites

noodly,

can you re-write your question, as it's not clear what you are referring to.

"15 page at main page"

"print only 8 items"  (do you mean new products, or best sellers, or popular products or so???)

 

please elaborate.

 

pascal.

ok) Only 8 items max (Populat category, Best sales, etc). Where I have to change counts?

Thanks.

Link to comment
Share on other sites

Popular (= favourites):

modules->modules, find "featured products on the home page" module, click configure.

Here you can change the amount of products shown (default 8)

post-455771-0-91288700-1420568598_thumb.png

 

 

New Products:

modules->modules, find "New products block" module, click configure.

Here you can change the amount of products shown (default 8)

post-455771-0-23218800-1420568634_thumb.png

 

 

Best sellers needs some file editing (don't ask me why they didn't do it just like popular/New products... 8-[   ):

 

edit file:  modules/blockbestsellers/blockbestsellers.php   (Make backup!!)

in function   getBestSellers (at end of file), change red number :

 

protected function getBestSellers($params)
{
  if (Configuration::get('PS_CATALOG_MODE'))
    return false;
 
  if (!($result = ProductSale::getBestSalesLight((int)$params['cookie]->id_lang, 0, 8)))
    return (Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY') ? array() : false);
 
  $currency = new Currency($params['cookie']->id_currency);
  $usetax = (Product::getTaxCalculationMethod((int)$this->context->customer->id) != PS_TAX_EXC);
  foreach ($result as &$row) {
    $row['price'] = Tools::displayPrice(Product::getPriceStatic((int)$row['id_product'], $usetax),
        $currency);
    $row['price24'] = Tools::displayPrice(((float)Product::getPriceStatic((int)$row['id_product'],
        $usetax)/24), $currency);
  }
  return $result;
}
 

Hope this helps,

pascal.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...