blackadder Posted January 27, 2013 Share Posted January 27, 2013 (edited) Hi, I have changed the default to my own layout. As of now I would like to have a linkable image as a add in the body of the site. Anyone knows the right way to do this? Any help would be greatly appriciated! http://img405.images...ableaddbody.jpg Thanks! Edited January 29, 2013 by blackadder (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 28, 2013 Share Posted January 28, 2013 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 Link to comment Share on other sites More sharing options...
blackadder Posted January 29, 2013 Author Share Posted January 29, 2013 (edited) 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 January 29, 2013 by blackadder (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2013 Share Posted January 29, 2013 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 Link to comment Share on other sites More sharing options...
blackadder Posted January 29, 2013 Author Share Posted January 29, 2013 (edited) Hi again, You are right! 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 January 29, 2013 by blackadder (see edit history) 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