Jump to content

Custom startpage, how can i implement this?


Recommended Posts

Hi there, i am wondering how i could implement a custom startpage that has some stuff from prestashop but not all of it. The idea is that a customer lands on this page and it contains some elements like a custom login-box, a list of manufacturers and some other stuff ideally maintained by CMS pages in Prestashop. The sidebars etc should not be present.

Any advice on if and how this can be done?

Link to comment
Share on other sites

You can remove the sidebars by going into Modules > Positions and simply removing any "boxes" you don't want. You should also be able to move them around, say, if you only want one sidebar. Then with css you can change the width of your page, etc. I have heard that a lot of people are having trouble using the Home Text Editor to change their intro text.

I personally am looking for a way to define the Home page as something completely different, like New Products or a Category. No luck so far! :(

Good luck to you. :)

-jennyb

Link to comment
Share on other sites

But this also removes the header and footer. That are elements that i would like to reuse.

This isnt impossible but its is very hard to get only header without left column and also footer without right. Because the header.php file includes left side hooks like Module::hookExec('leftColumn').

But you cant find Module::hookExec('leftColumn') in 1.4.x header.php.
1.4 versions has additional controller classes like FrontController. Other hand you cant edit controller class too because it effects all pages of your store.

/Class/FrontConroller.php line 450

$smarty->assign(array(
           'HOOK_HEADER' => Module::hookExec('header'),
           'HOOK_TOP' => Module::hookExec('top'),
            'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn')  /* THIS LINE GETS LEFT BLOCKS  FOR ALL PAGES*/
       ));



But as i said it isnt possible.
I have written a php page ;)

<?

include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/init.php');

   header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');

       $smarty->assign(array(
           'time' => time(),
           'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),
           'static_token' => Tools::getToken(false),
           'token' => Tools::getToken(),
           'logo_image_width' => Configuration::get('SHOP_LOGO_WIDTH'),
           'logo_image_height' => Configuration::get('SHOP_LOGO_HEIGHT'),
           'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,
           'content_only' => 0,
           'HOOK_HEADER' => Module::hookExec('header'),
           'HOOK_TOP' => Module::hookExec('top'),
           'HOOK_LEFT_COLUMN' => ''  /* THIS LINE WONT GET LEFT BLOCKS*/
       ));
       if ((Configuration::get('PS_CSS_THEME_CACHE') OR Configuration::get('PS_JS_THEME_CACHE')) AND is_writable(_PS_THEME_DIR_.'cache'))
       {
           // CSS compressor management
           if (Configuration::get('PS_CSS_THEME_CACHE'))
               Tools::cccCss();

           //JS compressor management
           if (Configuration::get('PS_JS_THEME_CACHE'))
               Tools::cccJs();
       }
       $smarty->assign('css_files', $css_files);
       $smarty->assign('js_files', array_unique($js_files));
       $smarty->display(_PS_THEME_DIR_.'header.tpl');
?>
PUT YOUR CONTENT HERE 
<?
       $smarty->assign(array(
           'HOOK_RIGHT_COLUMN' => '', /* THIS LINE WONT GET RIGHT BLOCKS*/
           'HOOK_FOOTER' => Module::hookExec('footer'),
           'content_only' => 0
       ));
       $smarty->display(_PS_THEME_DIR_.'footer.tpl');
?>        



Enjoy it ;)

Regards

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