ladivito Posted December 25, 2009 Share Posted December 25, 2009 Hi,anyone that know where i get wrong plz let me know...i just modify the /themes/prestashop/header.tpl and try to make the blocksearch and user info in a line here.....after 2 days trying this is what i can get.....i just merge 2 block into the header.tpl and add a banner at the headerthe banner is fine but just the both block is not in the same line although i put it into a same i would like to put the blocksearch then continue with blockuserinfoThanks in advancehere is the code> {$HOOK_HEADER} </head> <body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}> {if !$content_only} </pre> <ul>{l s='This shop requires JavaScript to run correctly. Please activate JavaScript in your browser.'}</ul> <br><div> <!-- Header --> <!-- Block user information module HEADER --> <!-- Block search module TOP --> <form method="get" action="{$base_dir}search.php" id="searchbox"> <!-- image on background --> <input type="hidden" name="orderby" value="position" /> <input type="hidden" name="orderway" value="desc" /> <input type="text" id="search_query" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" /> <input type="submit" name="submit_search" value="{l s='Search' mod='blocksearch'}" class="button" /> </form> {if $ajaxsearch} [removed] {literal} function formatSearch(row) { return row[2] + ' > ' + row[1]; } function redirectSearch(event, data, formatted) { $('#search_query').val(data[1]); document.location.href = data[3]; } $('document').ready( function() { $("#search_query").autocomplete( '{/literal}{$base_dir}{literal}search.php', { minChars: 3, max:10, width:500, scroll: false, formatItem:formatSearch, extraParams:{ajaxSearch:1,id_lang:{/literal}{$cookie->id_lang}{literal[spam-filter] }).result(redirectSearch) }); {/literal} [removed] {/if} <!-- /Block search module TOP --> {if $logged} {l s='Welcome back' mod='blockuserinfo'}, {$customerName}({l s='Log me out' mod='blockuserinfo'}) {else} {l s='Welcome' mod='blockuserinfo'}, {l s='Log in here' mod='blockuserinfo'} {/if} {l s='Cart:'} {if $cart_qties > 0}{$cart_qties}{/if}{l s=' package' mod='blockuserinfo'}{l s=' packages' mod='blockuserinfo'} {if $cart_qties > 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, 4)}{else}{convertPrice price=$cart->getOrderTotal(true, 4)}{/if}{/if} {l s='(empty)' mod='blockuserinfo'} <!-- --> <!-- /Block user information module HEADER --> <!-- -->< Link to comment Share on other sites More sharing options...
ladivito Posted December 26, 2009 Author Share Posted December 26, 2009 anyone please help ? Link to comment Share on other sites More sharing options...
21846657 Posted December 26, 2009 Share Posted December 26, 2009 Mate, you have to modify the CSS and change the modules' position accordingly. I can not help without a closer look. Link to comment Share on other sites More sharing options...
ladivito Posted December 27, 2009 Author Share Posted December 27, 2009 Hi...may i know which part of css at global.css ???thanks Link to comment Share on other sites More sharing options...
21846657 Posted December 28, 2009 Share Posted December 28, 2009 I assume you're using the default theme. The CSS of blocksearch is around line 823 and that of blockuserinfo is around line 851 in global.cssBetter adjust their positions firstly in BO >> Modules >> Position; then modify their CSS as less as you can if you feel sour about it. Good luck. Link to comment Share on other sites More sharing options...
ladivito Posted December 28, 2009 Author Share Posted December 28, 2009 Hi,i didnt install blocksearch and blockuserinfo at alli just copy both block code and paste at /themes/prestashop/header.tplhere is the code as attachmentplease teach me how to do it.....thanks a lots header.txt Link to comment Share on other sites More sharing options...
21846657 Posted December 28, 2009 Share Posted December 28, 2009 No. You can not get them worked by simply copying the tpl codes because their functions are missing. I'd suggest you to install the modules and follow my previous posts. Indeed there are quite a few steps. :vampire: If you still don't want to install the two modules, you have to re-write a module for the function you need. I don't think this is your point. Link to comment Share on other sites More sharing options...
ladivito Posted December 28, 2009 Author Share Posted December 28, 2009 Hi....then i'll install both of the module.....what i have to change at the line 823 and 851 ?i read at it but cannot get the point...plz help ~ thanks Link to comment Share on other sites More sharing options...
21846657 Posted December 29, 2009 Share Posted December 29, 2009 You did it. Congratulations! Link to comment Share on other sites More sharing options...
ladivito Posted December 29, 2009 Author Share Posted December 29, 2009 Hi......lolyes...just did it.....after test i think should be ok Link to comment Share on other sites More sharing options...
ladivito Posted December 29, 2009 Author Share Posted December 29, 2009 global.css /* global layout */ #page { width: 967px; margin: 0 auto 2px auto; text-align:left; } h1#logo { float: left; width: 0%; margin-top:0.5em; } #header { float: left; width: 967px; text-align: right; /* block top search */ #header #search_block_top { /* background: #e5e6e7 url('../img/block_search_bg.jpg') no-repeat top right; */ height: 28px; width: 330px; float: left; } #header #search_block_top p { padding: 0.4em 0 0.4em 0; } #header #search_block_top label, #header #search_block_top input{ float:left; } #header #search_block_top label { background: transparent url('../img/icon/searchicon.gif') no-repeat 0 0; float: left; width: 19px; height: 18px; display: block; } #header #search_block_top input#search_query { width: 10.5em; } /* block top user information */ #header #header_user { width: 100%; text-align: right; /* clear: left; */ margin: 0.6em 0.6em 0 0; } #header_user p { color: #595a5e; } #header_user span { font-weight: bold; } #header_user ul { margin-top: 0.3em; } #header_user li { float: right; line-height: 2em; margin-left: 0.5em; white-space: nowrap; } #header_user #shopping_cart, #header_user #your_account { font-size: 0.9em; } #header_user #shopping_cart a, #header_user #your_account a { background-repeat: no-repeat; background-position: top left; padding: 2px 0 4px 26px; height: 20px; text-decoration: none; } #header_user #shopping_cart a { background-image: url('../img/icon/cart.gif'); } #header_user #shopping_cart span.ajax_cart_quantity { padding-right:0.5em; } #header_user #your_account a { background-image: url('../img/icon/my-account.gif'); } Link to comment Share on other sites More sharing options...
ladivito Posted December 29, 2009 Author Share Posted December 29, 2009 /modules/blockuserinfo/blockuserinfo.tpl <!-- Block user information module HEADER --> {if $logged} {l s='Welcome back' mod='blockuserinfo'}, {$customerName}({l s='Log me out' mod='blockuserinfo'}) {else} {l s='Welcome' mod='blockuserinfo'}, {l s='Log in here' mod='blockuserinfo'} {/if} {l s='Cart:'} {if $cart_qties > 0}{$cart_qties}{/if}{l s=' package' mod='blockuserinfo'}{l s=' packages' mod='blockuserinfo'} {if $cart_qties > 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, 4)}{else}{convertPrice price=$cart->getOrderTotal(true, 4)}{/if}{/if} {l s='(empty)' mod='blockuserinfo'} <!-- {l s='Cart:' mod='blockuserinfo'} {if $cart_qties > 0}{$cart_qties}{/if}{l s='product' mod='blockuserinfo'}{l s='products' mod='blockuserinfo'} {if $cart_qties > 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, 4)}{else}{convertPrice price=$cart->getOrderTotal(true, 4)}{/if}{/if} {l s='(empty)' mod='blockuserinfo'} {l s='Your Account' mod='blockuserinfo'} --> <!-- /Block user information module HEADER --> Link to comment Share on other sites More sharing options...
Recommended Posts