Jump to content

How to place the two modules the way I want?


d.crysty23

Recommended Posts

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}

post-715508-0-91351000-1391545467_thumb.png

Link to comment
Share on other sites

 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

post-715508-0-38498500-1391553538_thumb.png

Edited by d.crysty23 (see edit history)
Link to comment
Share on other sites

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

 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

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

 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
}

post-715508-0-67754600-1391624799_thumb.png

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