Jump to content

Main page


Recommended Posts

Can someone explain for me in a simple way how i can do this!

when you first come into prestashop, the main page is allways on "feat products" in the middle,

Now i would like to delete that, and put "New products" instead of "feat products", in that place

so the first thing you see when you come in is "New products".

thanks in advance!

Link to comment
Share on other sites

Look here first
http://www.prestashop.com/wiki/Moving_and_Transplanting_Modules/#Transplanting_a_module

So to remove Featured block go to
Back Office » Modules » Positions
Homepage content section and delete Featured Products on the homepage v0.9.

Then to add New Products block
click Transplant a module
Module : New products block
Hook into : Homepage content

But to New Products block looks like Featured block you have to change css and tpl files
or to download module like this one
from this post
or similar , search the forum.

Link to comment
Share on other sites

I didnt work, i planted "new products block" into homepage content, but the only thing that came up was the side block on the right menu, nothing in the main menu, what files do i have to change in that case? thanks in advance apprentice

Link to comment
Share on other sites

My bad, new product block don't have defined hook for homepage.
But you can easily add it.
First backup module blocknewproducts then add this code to
blocknewproducts.php

   function hookHome($params)
   {
                return $this->hookRightColumn($params);
   }


Or to look like featured product block

    function hookHome($params)
   {
       global $smarty;

       $currency = new Currency(intval($params['cookie']->id_currency));
       $newProducts = Product::getNewProducts(intval($params['cookie']->id_lang), 0, intval(Configuration::get('NEW_PRODUCTS_NBR')));

       $smarty->assign(array(
           'new_products' => $newProducts,
           'mediumSize' => Image::getSize('medium')));
       return $this->display(__FILE__, 'blockhomenew.tpl');
   }


Copy blockhomenew.tpl to modules\blocknewproducts
This is modified tpl file from module from previous post.

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...