Jump to content

(SOLVED)Linkable add in the body of the site?


Recommended Posts

well, you probably need to add fixed / absolute div into main div in your shop. You can set up values like top / right to show div box anywhere you want

Share this post


Link to post
Share on other sites

Hi,

Thanks for your reply!

 

I have tried to add a div to the header.tpl/ global.css. It doesnt work.

 

What I did:

header.tpl:

<div id="locator">

<p>{background:url(../img/testing.jpg)}</p>

</div>

global.css:

#locator { position:absolute; visibility:show; left: 20px; top: 20px; z-index:20}

 

When I add the code the page doesn't show. Do You know what I am doing wrong?

 

Thank you.

Edited by blackadder (see edit history)

Share this post


Link to post
Share on other sites

Hi,

Thanks for your reply!

 

I have tried to add a div to the header.tpl/ global.css. It doesnt work.

 

What I did:

header.tpl:

<div id="locator">

<p>{background:url(../img/testing.jpg)}</p>

</div>

global.css:

#locator { position:absolute; visibility:show; left: 20px; top: 20px; z-index:20}

 

When I add the code the page doesn't show. Do You know what I am doing wrong?

 

Thank you.

 

You've got force compilation turned to on? maybe this is the mail problem. You can also check parnet div (or other parent tag if exists) - maybe parent has got overflow:hidden; so your div is invisible :) In my opinion you must also add display:block; into #locator id styles

Share this post


Link to post
Share on other sites

Hi again,

You are right! :D

 

I didn't see the owerflow was set to hidden.

Also I guess I had the wrong tags for the img. I changed it to plain text and now its working.

 

Thanks for You'r help!

 

Thanks to vekia, this is how you can add divs in the body of PrestaShop:

1 Make a div in the header.tpl after the head and before body tags:

 

 

{if isset($js_files)}

{foreach from=$js_files item=js_uri}

<script type="text/javascript" src="{$js_uri}"></script>

{/foreach}

{/if}

{$HOOK_HEADER}

</head>

<!-- ADDS -->

<div id="locator">

<a href="http://www.axaxtra.com" target="_blank">

<img src="http://www.new.axaxtra.com/themes/default/img/testing.jpg"></a>

</div>

 

 

<body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if $hide_left_column}hide-left-column{/if} {if $hide_right_column}hide-right-column{/if} {if $content_only} content_only {/if}">

{if !$content_only}

{if isset($restricted_country_mode) && $restricted_country_mode}

<div id="restricted-country">

<p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p>

</div>

 

{/if}

 

<div id="page" class="container_9 clearfix">

 

 

<!-- Header -->

<div id="header" class="grid_9 alpha omega">

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

2. Make the changes to the global.css:

 

/* Locator ****************ADDS IN BODY********************************************************* */

 

#locator { display:block;

position:absolute;

visibility:show;

left: 250px; top: 135px; z-index:20;

background:;

width:200px;

height:200px;

}

 

Now you can have adds wherever you want on the page, just use html to code your new div in the header.tpl

 

Someone talented schould make a block of this?

Edited by blackadder (see edit history)

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More