d.crysty23 Posted February 4, 2014 Share Posted February 4, 2014 I've managed to create a new hook in the default template of prestashop but I can't place "featured products" under "image slider" (see image to understand what I mean). I've added a segment of header.tpl and the place where I've put my div. Do you know what I should change in order to get the final result? <!-- Header --> <div id="header" class="grid_9 alpha omega"> <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"> <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/> </a> <div id="header_right" class="grid_9 omega"> {$HOOK_TOP} </div> </div> <div id="columns" class="grid_9 alpha omega clearfix"> <!-- Left --> <div id="left_column" class="column grid_2 alpha"> {$HOOK_LEFT_COLUMN} </div> <!-- Center --> <div id="center_column" class=" grid_5"> <div id="myCustomHook"> {hook h='displayTop2'} </div><!--my hook--> {/if} Link to comment Share on other sites More sharing options...
vekia Posted February 4, 2014 Share Posted February 4, 2014 you attached your slider module also to your new hook? Link to comment Share on other sites More sharing options...
d.crysty23 Posted February 4, 2014 Author Share Posted February 4, 2014 (edited) yes, I've tried it now, I've put both modules in the newly created hook and it looks like this... It didn't solve much. PS:featured products" should go all the way to the side, right now there's a very large space on the left side. I've created this hook specificaly in order to try and do this but.. i'm right back where I've started Edited February 4, 2014 by d.crysty23 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 4, 2014 Share Posted February 4, 2014 as long as you will have left column there, your module will not have 100% of container block. Link to comment Share on other sites More sharing options...
d.crysty23 Posted February 4, 2014 Author Share Posted February 4, 2014 So I should understand that this cannot be done? I've seen in other templates that something like this was done. Do you know any alternative option? I really want to solve this Link to comment Share on other sites More sharing options...
vekia Posted February 4, 2014 Share Posted February 4, 2014 you have to totally reorganise structure of your theme. remove the left column, attach block categories to displayTop, then you will be able to display it inline to slider you've got. After that you will be able to define 100% container width of homefeatured module. in fact, i have no idea what you exactly expect on other pages (like product page, category pages etc.) Link to comment Share on other sites More sharing options...
d.crysty23 Posted February 5, 2014 Author Share Posted February 5, 2014 I can't manage to atach the block categories to the displayTop hook. I've added these code line and the moment I publish the module in the respective hook, the screen goes blank and the site no longer works. What can I do? public function install() { if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('footer') || !$this->registerHook('header') || !$this->registerHook('displayTop')|| //new hook // Temporary hooks. Do NOT hook any module on it. Some CRUD hook will replace them as soon as possible. !$this->registerHook('categoryAddition') || !$this->registerHook('categoryUpdate') || !$this->registerHook('categoryDeletion') || !$this->registerHook('actionAdminMetaControllerUpdate_optionsBefore') || !$this->registerHook('actionAdminLanguagesControllerStatusBefore') || !Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 4) || !Configuration::updateValue('BLOCK_CATEG_DHTML', 1)) return false; return true; } function hookDisplayTop($params) { return $this->hookDisplayHome($params); } the code from the blockcategories.php Link to comment Share on other sites More sharing options...
vekia Posted February 5, 2014 Share Posted February 5, 2014 use this: public function hookdisplayTop($params) { return $this->hookLeftColumn($params); } blockcategories doesn't support displayHome hook Link to comment Share on other sites More sharing options...
d.crysty23 Posted February 5, 2014 Author Share Posted February 5, 2014 (edited) it worked,the module is published,but now everthing is one under the other.How do i put "home slider" and "categories" on the same line? THANK YOU VERY MUCH! Edited February 5, 2014 by d.crysty23 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 5, 2014 Share Posted February 5, 2014 due to the fact, that it's not online and i can't check it, i will prepare some code, but im not sure at all that this code will work. use these styles: #categories_block_left {display:inline-block!important; float:left!important; width:202px!important;} .bx-wrapper { display:inline-block; float:right;} Link to comment Share on other sites More sharing options...
d.crysty23 Posted February 5, 2014 Author Share Posted February 5, 2014 I've tried the changes you suggested, but it didn't work, so I've tried some other changes and the module looks like this now. The code is posted below. Do you think it's okay what I've done or that I might have some troubles in the future because of this? .bx-wrapper { margin-top:-250px; margin-left:250px; margin-bottom:20px; height:300px } 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