I want to move languages and search so that they are not in the side column, but at the top of the tpl_main_page (not header).
I tried copying the code from sideboxes/tpl_search.php but it is ignored - what should I do?
I want to move languages and search so that they are not in the side column, but at the top of the tpl_main_page (not header).
I tried copying the code from sideboxes/tpl_search.php but it is ignored - what should I do?
If you take a look at the language/currency links in header mod, this explains how to put content from those sideboxes in the header. The same approach will work for putting this content in the main area of the page. And a similar approach should also work for the search bar (though putting this in the main body of the page sounds a little odd).
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
... you can also turn on the search bar in the header by enabling search_header in Admin->Tools->Layout Boxes Controller.
Granted, this assumes that your template contains the code that can be thus enabled. Some "purchased" templates are missing that component, in which case you'll have to do manual coding.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Where are you referring to by
Can you give me a full pathname? I saw no header module in /includes/modules/
The only aspect of the header with whih I am familiar are in /templates/[templatename]/common/tpl_header.php and I saw no references to language/currency links there
Hi,
I'm looking to move my currencies and shopping basket out of their sideboxes and into the Header, but I've searched and searched but can't find out how to do the 'includes' coding.
Please help...
Jamie
Jamie
Here's what I found out so far
link to english:
<a href="<? echo zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=en¤cy=USD', $request_type); ?>">english</a>
link to hebrew:
<a href="<? echo zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=he¤cy=ILS', $request_type); ?>">hebrew</a>
these links change both the language and currency, if you want to change one, just omit the part you don't want like "¤cy=XXX" part
Here's a snippet of code that I have used recently on a site to place the shopping cart in the headerYou would need to style the items to have them appear as you wish. In the above example I used a background image for the shopping cart and styled the checkout link to look like a button.PHP Code:<ul id="cart">
<?php
// replace by image
echo '<li><a class="imgButton" href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . HEADER_TITLE_CART_CONTENTS . '</a></li>' . "\n";
$num_items = $_SESSION['cart']->count_contents();
echo '<li>' . $num_items . ($num_items != 1 ? HEADER_CART_ITEMS : HEADER_CART_ITEM) . '</li>' . "\n";
$header_cart = $currencies->format($_SESSION['cart']->show_total());
echo '<li>' . $header_cart . '</li>' . "\n";
if ($num_items > 0) {
echo '<li class="button"><a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . HEADER_TITLE_CHECKOUT . '</a></li>';
}
?>
</ul>
To put language links in the header there is an add-in module available.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)