Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Перенести кнопки на панель ниже


Recommended Posts

Дефолтный шаблон - хочу перенести кнопочки на место поиска (поиск уже сместила ниже)

Кто подскажет как это реализовать...

на фото результат моих эксперитментов

вот коды:

header.tpl

<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/stylesheet.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
DD_belatedPNG.fix('img, #header .div3 a, #content .left, #content .right, .box .top');
</script>
<![endif]-->
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/thickbox/thickbox-compressed.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/thickbox/thickbox.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tab.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript"><!--
function bookmark(url, title) {
	if (window.sidebar) { // firefox
    window.sidebar.addPanel(title, url, "");
	} else if(window.opera && window.print) { // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} else if(document.all) {// ie
   		window.external.AddFavorite(url, title);
	}
}
//--></script>
</head>
<body>
<div id="container">
<div id="header">
  <div class="div1">
    <div class="div2">
      <?php if ($logo) { ?>
      <a href="<?php echo str_replace('&', '&', $home); ?>"><img src="<?php echo $logo; ?>" title="<?php echo $store; ?>" alt="<?php echo $store; ?>" /></a>
      <?php } ?>
    </div>
    <div class="div3"><a href="<?php echo str_replace('&', '&', $special); ?>" style="background-image: url('catalog/view/theme/default/image/special.png');"><?php echo $text_special; ?></a><a onclick="bookmark(document.location, '<?php echo addslashes($title); ?>');" style="background-image: url('catalog/view/theme/default/image/bookmark.png');"><?php echo $text_bookmark; ?></a><a href="<?php echo str_replace('&', '&', $contact); ?>" style="background-image: url('catalog/view/theme/default/image/contact.png');"><?php echo $text_contact; ?></a><a href="<?php echo str_replace('&', '&', $sitemap); ?>" style="background-image: url('catalog/view/theme/default/image/sitemap.png');"><?php echo $text_sitemap; ?></a></div>
   
    <div class="div5">
	
	<div class="div4"><a href="<?php echo str_replace('&', '&', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>
      <?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?>
      <a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a><a href="<?php echo str_replace('&', '&', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a></div>
	
	
	
      <div class="left"></div>
      <div class="right"></div>
      <div class="center">
       
	   
	   
	   
	   
	   
	   
      </div>
    </div>
  </div>
  <div class="div6">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
	  <?php if (isset($common_error)) { ?>
	  <div class="warning"><?php echo $common_error; ?></div>
	  <?php } ?>
     
 <div id="search">
          <div class="div8"><?php echo $entry_search; ?> </div>
          <div class="div9">
            <?php if ($keyword) { ?>
            <input type="text" value="<?php echo $keyword; ?>" id="filter_keyword" />
            <?php } else { ?>
            <input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
            <?php } ?>
            <select id="filter_category_id">
              <option value="0"><?php echo $text_category; ?></option>
              <?php foreach ($categories as $category) { ?>
              <?php if ($category['category_id'] == $category_id) { ?>
              <option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select>
          </div>
          <div class="div10">  <a onclick="moduleSearch();" class="button"><span><?php echo $button_go; ?></span></a> <a href="<?php echo str_replace('&', '&', $advanced); ?>"><?php echo $text_advanced; ?></a></div>
        </div>

	 <!--<div id="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo str_replace('&', '&', $breadcrumb['href']); ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
      </div>-->
	  
	  
	  
      <div class="div7">
        <?php if ($currencies) { ?>
        <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="currency_form">
          <div class="switcher">
            <?php foreach ($currencies as $currency) { ?>
            <?php if ($currency['code'] == $currency_code) { ?>
            <div class="selected"><a><?php echo $currency['title']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($currencies as $currency) { ?>
              <a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
              <?php } ?>
            </div>
          </div>
          <div style="display: inline;">
            <input type="hidden" name="currency_code" value="" />
            <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
          </div>
        </form>
        <?php } ?>
        <?php if ($languages) { ?>
        <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="language_form">
          <div class="switcher">
            <?php foreach ($languages as $language) { ?>
            <?php if ($language['code'] == $language_code) { ?>
            <div class="selected"><a><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />  <?php echo $language['name']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($languages as $language) { ?>
              <a onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $('#language_form').submit();"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />  <?php echo $language['name']; ?></a>
              <?php } ?>
            </div>
          </div>
          <div>
            <input type="hidden" name="language_code" value="" />
            <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
          </div>
        </form>
        <?php } ?>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript"><!-- 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>
<script type="text/javascript"><!--
$('#search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

function moduleSearch() {	
	pathArray = location.pathname.split( '/' );
	
	url = '<?php echo HTTP_SERVER; ?>';
		
	url += 'index.php?route=product/search';
		
	var filter_keyword = $('#filter_keyword').attr('value')
	
	if (filter_keyword) {
		url += '&keyword=' + encodeURIComponent(filter_keyword);
	}
	
	var filter_category_id = $('#filter_category_id').attr('value');
	
	if (filter_category_id) {
		url += '&category_id=' + filter_category_id;
	}
	
	location = url;
}
//--></script>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
	$(this).find('.option').slideUp('fast');
}); 
//--></script>

и css

html {
	overflow: -moz-scrollbars-vertical;
	margin: 0;
	padding: 0;
}
* {
	font-family: Arial, Helvetica, sans-serif;
}
body {
	margin: 0px;
	padding: 0px;
	text-align: center;
}
body, td, th, input, textarea, select, a {
	font-size: 12px;
}
form {
	padding: 0;
	margin: 0;
	display: inline;
}
input, textarea, select {
	margin: 3px 0px;
}
a, a:visited {
	color: #1B57A3;
	text-decoration: underline;
	cursor: pointer;
}
a:hover {
	text-decoration: none;
}
a img {
	border: none;
}
p {
	margin-top: 0px;
}
/* layout */
#container {
margin: 0 10px 0 10px;
        text-align: left;
}
#header .div2 {
	float: left;
	padding-top: 15px;
	padding-left: 15px;
}
#header .div3 {
	float: right;
	padding-top: 7px;
	height: 38px;
}
#header .div3 a {
	margin-left: 15px;
	padding: 1px 0px 2px 20px;
	background-repeat: no-repeat;
	background-position: left center;
}
#header .div4 {
	width: 510px;
	clear: left;
	float: left;
	height: 32px;
	padding-left: 14px;
}
#header .div4 a {
	float: left;
	margin-right: 2px;
	width: 100px;
	height: 18px;
	padding-top: 9px;
	padding-bottom: 9px;
	background: url('../image/tab_1.png') no-repeat;
	text-align: center;
	color: #333333;
	text-decoration: none;
	font-size: 14px;
	font-weight: bold;
	position: relative;
	z-index: 1;
}
#header .div4 a.selected {
	background: url('../image/tab_2.png') no-repeat;
	color: #FFF;
	padding-bottom: 10px;
	z-index: 3;
}
#header .div5 {
	clear: both;
}
#header .div5 .left {
	background: url('../image/header_1_left.png') no-repeat;
	width: 9px;
	height: 40px;
	float: left;
}
#header .div5 .right {
	background: url('../image/header_1_right.png') no-repeat;
	width: 9px;
	height: 40px;
	float: right;
}
#header .div5 .center {
	background: url('../image/header_1_center.png') repeat-x;
	height: 40px;
	margin-left: 9px;
	margin-right: 9px;
}
#header .div6 {
	clear: both;
	margin-bottom: 10px;
}
#header .div6 .left {
	background: url('../image/header_2_left.png') no-repeat;
	width: 5px;
	height: 32px;
	float: left;
}
#header .div6 .right {
	background: url('../image/header_2_right.png') no-repeat;
	width: 5px;
	height: 32px;
	float: right;
}
#header .div6 .center {
	background: url('../image/header_2_center.png') repeat-x;
	height: 32px;
	margin-left: 5px;
	margin-right: 5px;
	padding-left: 5px;
	padding-right: 5px;
}
#header .div7 {
	float: right;
	padding-top: 2px;
}
#header .div8 {
	float: left; margin-top: 6px;
}
#header .div9 {
	float: left;
}
#header .div10 {
	float: left; 
	margin-top: 2px;	
}
#search {
	color: #FFF;
	font-weight: bold;
}
#search select {
	border: 1px solid #0A5391;
	padding: 1px;
}
#search a {
	color: #FFF;
}
#search input {
	border: 1px solid #0A5391;
	padding: 2px;
}
#breadcrumb {
	float: left;
	padding-top: 7px;
	padding-bottom: 11px;
	height: 13px;
	margin-bottom: 10px;
	color: #000000;
}
.switcher {
	float: right;	
	margin-top: 3px;
	margin-left: 10px;
}
.switcher a {
	text-decoration: none;
	display: block;
}
.switcher .selected {
	background: #FFFFFF url('../image/switcher.png') repeat-x;
}
.switcher .selected a {
	border: 1px solid #CCCCCC;
	background: url('../image/arrow_down.png') 116px center no-repeat;
	color: #666666;
	padding: 2px 5px 2px 5px;
	width: 121px;
}
.switcher .selected a:hover {
	background: #F0F0F0 url('../image/arrow_down.png') 116px center no-repeat;
}
.switcher .option {	
	position: absolute;
	z-index: 3;
	border-left: 1px solid #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 1px solid #CCCCCC;
	background-color: #EEEEEE;
	display: none;
	width: 131px;
}
.switcher .option a {
	color: #000;
	padding: 3px 5px 3px 5px;
}
.switcher .option a:hover {
	background: #FFC;
}
.switcher img {
	position: relative;
	top: 1px;
}
#column_left {
	float: left;
	width: 180px;
	margin-right: 10px;
	clear: left;
}
#column_right {
	float: right;
	width: 180px;
	margin-left: 10px;
	clear: right;
}
#content {
	margin-left: 190px;
	margin-right: 190px;
	margin-bottom: 10px;
}
#content .top .left {
	background: url('../image/content_top_left.png') no-repeat;
	width: 5px;
	height: 32px;
	float: left;
}
#content .top .right {
	background: url('../image/content_top_right.png') no-repeat;
	width: 5px;
	height: 32px;
	float: right;
}
#content .top .center {
	background: url('../image/content_top_center.png') repeat-x;
	margin-left: 5px;
	margin-right: 5px;
}
#content .top h1, .heading {
	padding: 8px 0px 8px 7px;
}
#content h1, .heading {
	color: #000000;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	text-transform: uppercase;
	margin: 0px;
}
#content .middle {
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF;
	padding: 10px 10px 1px 10px;
	min-height: 30px;
}
#content .bottom .left {
	background: url('../image/content_bottom_left.png') no-repeat;
	width: 5px;
	height: 5px;
	float: left;
}
#content .bottom .right {
	background: url('../image/content_bottom_right.png') no-repeat;
	width: 5px;
	height: 5px;
	float: right;
}
#content .bottom .center {
	background: url('../image/content_bottom_center.png') repeat-x;
	height: 5px;
	margin: 0 5px 10px 5px;
}
.box {
	margin-bottom: 10px;
	background: url('../image/box_top.png') no-repeat;
}
.box .top {
	padding: 8px 0px 8px 7px;
	color: #000000;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	text-transform: uppercase;
}
.box .top img {
	float: left;
	margin-right: 5px;
}
.box .middle {
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF;
	padding: 10px;
}
.box .bottom {
	height: 5px;
	background: url('../image/box_bottom.png') no-repeat;
}
.success {
	padding: 5px 0px;
	margin-bottom: 10px;
	background: #E4F1C9;
	border: 1px solid #A5BD71;
	font-size: 11px;
	font-family: Verdana, Geneva, sans-serif;
	text-align: center;
}
.warning {
	padding: 5px 0px;
	margin-bottom: 10px;
	background: #FFDFE0;
	border: 1px solid #FF9999;
	font-size: 11px;
	font-family: Verdana, Geneva, sans-serif;
	text-align: center;
}
.wait {
	padding: 5px 0px;
	margin-bottom: 10px;
	background: #FBFAEA;
	border: 1px solid #EFEBAA;
	font-size: 11px;
	font-family: Verdana, Geneva, sans-serif;
	text-align: center;
}
.required {
	color: #FF0000;
	font-weight: bold;
}
.error {
	color: #FF0000;
	display: block;
}
.help {
	cursor: pointer;
}
.tooltip {
	border: 1px solid #FDDA5C;
	background: #FBFF95;
	padding: 5px;
	font-size: 11px;
	width: 250px;
}
.clear { /* generic container (i.e. div) for floating buttons */
	overflow: hidden;
	width: 100%;
}
.button {
	padding-left: 8px;
	display: inline-block;
	margin-right: 5px;
	background: url('../image/button_left.png') top left no-repeat;
	text-decoration: none;
	color:#FFF;
}
.button span {
	color: #FFF;
	display: block;
	padding: 4px 12px 5px 5px;
	background: url('../image/button_right.png') top right no-repeat;
}
.buttons {
	background: #F8F8F8;
	border: 1px solid #DDDDDD;
	padding: 5px;
	margin-bottom: 10px;
}
.buttons input {
	padding: 0px;
	margin: 0px;
}
.buttons table {
	width: 100%;
	border-collapse: collapse;
}
.buttons table td {
	vertical-align: middle;
}
.content {
	background: #F7F7F7;
	border: 1px solid #DDDDDD;
	padding: 10px;
	margin-top: 3px;
	margin-bottom: 10px;
}
.list {
	margin-bottom: 10px;
	width: 100%;
}
.list td {
	text-align: center;
	vertical-align: top;
	padding-bottom: 10px;
}
.sort {
	margin-bottom: 10px;
	background: #F8F8F8;
	height: 30px;
	width: 100%;
}
.sort .div1 {
	float: right;
	margin-left: 5px;
	padding-top: 6px;
	padding-right: 9px;
}
.sort .div2 {
	text-align: right;
	padding-top: 9px;
}
.sort select {
	font-size: 11px;
	margin: 0;
	padding: 0;
}
.pagination {
	display: inline-block;
	width: 100%;
	background: #F8F8F8;
	margin-bottom: 10px;
}
.pagination .links, .pagination .results {
	padding: 7px;
}
.pagination .links {
	float: left;
}
.pagination .links a {
	border: 1px solid #CCCCCC;
	padding: 4px 7px;
	text-decoration: none;
	color: #000000;
}
.pagination .links b {
	border: 1px solid #CCCCCC;
	padding: 4px 7px;
	text-decoration: none;
	color: #000000;
	background: #FFFFFF;
}
.pagination .results {
	float: right;
}
.tabs {
	width: 100%;
	height: 31px;
	margin-bottom: 0px;
}
.tabs a {
	float: left;
	display: block;
	padding: 6px 15px 7px 15px;
	margin-right: 2px;
	border-top: 1px solid #DDDDDD;
	border-bottom: 1px solid #DDDDDD;
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF url('../image/tab_3.png') repeat-x;
	color: #000000;
	font-weight: bold;
	font-size: 13px;
	text-decoration: none;
	z-index: 1;
	position: relative;
	top: 1px;
}
.tabs a.selected {
	background: #FFFFFF url('../image/tab_3.png') repeat-x;
	border-bottom: 0px;
	padding-bottom: 8px;
	z-index: 3;
}
.tab_page {
	border: 1px solid #DDDDDD;
	background: #FFFFFF;
	padding: 10px;
	display: block;
	z-index: 2;
	margin-bottom: 10px;
}
#footer {
	width: 100%;
	clear: both;
	padding-top: 5px;
	border-top: 1px solid #DDDDDD;
}
#footer .div1 {
	float: left;
	text-align: left;
}
#footer .div2 {
	float: right;
	text-align: right;
}
#category ul {
	margin-top: 0px;
	margin-bottom: 0px;
	margin-left: 8px;
	padding-left: 12px;
	list-style: url('../image/bullet_1.png');
}
#information ul {
	margin-top: 0px;
	margin-bottom: 0px;
	margin-left: 8px;
	padding-left: 12px;
	list-style: url('../image/bullet_2.png');
}
.cart {
	border-collapse: collapse;
	width: 100%;
	border: 1px solid #EEEEEE;
	margin-bottom: 10px;
}
.cart th {
	background: #EEEEEE;
	padding: 5px;
	font-weight: normal;
}
.cart td {
	padding: 5px;
}
.tags, .tags a {
	font-style: italic;
	font-size: x-small;
}
#module_cart .middle {
	padding: 5px;
}
.cart_module_total {
	padding: 0 3px 0 3px;
	font-size: 0.9em; 
	color: #222;
}
.cart_remove {
	margin-top: 3px;
	background: url('../image/list_remove_btn.gif') no-repeat left center transparent;
	padding-right:10px;
	cursor:pointer;
}
.cart_remove_loading {
	margin-top: 3px;
	background: url('../image/ajax_load.gif') no-repeat transparent;
	padding-right:10px;
}
.button_add_small, a.button_add_small:visited {
	margin-top: 3px;
	background: url('../image/button_add_small.png') no-repeat left center transparent;
	padding:5px;
	text-decoration: none;
	cursor:pointer;
}
#content .middle .box {
	float: left;
	margin: 0 6px 10px 6px;
	min-height: 0px;
}
#content .middle .box .middle {
	width: 158px;
	min-height: 0px;
}

Заранее благодарна Вам за помощь

post-10368-0-70364600-1317628862_thumb.png

Надіслати
Поділитися на інших сайтах


Выкладывай пригодится.

Все очень просто - я не туда вставляла кнопки - кнопки встали ровно без вмешательства в css, только активную кнопочку немного уравняла (она по умолчанию смещена чуть вниз)

на фото результат (осталось подобрать дизайн активной кнопочки и выравнять поиск)

post-10368-0-57128600-1317806072_thumb.png

коды:

css:

html {
	overflow: -moz-scrollbars-vertical;
	margin: 0;
	padding: 0;
}
* {
	font-family: Arial, Helvetica, sans-serif;
}
body {
	margin: 0px;
	padding: 0px;
	text-align: center;
}
body, td, th, input, textarea, select, a {
	font-size: 12px;
}
form {
	padding: 0;
	margin: 0;
	display: inline;
}
input, textarea, select {
	margin: 3px 0px;
}
a, a:visited {
	color: #1B57A3;
	text-decoration: underline;
	cursor: pointer;
}
a:hover {
	text-decoration: none;
}
a img {
	border: none;
}
p {
	margin-top: 0px;
}
/* layout */
#container {
margin: 0 10px 0 10px;
        text-align: left;
}
#header .div2 {
	float: left;
	padding-top: 15px;
	padding-left: 15px;
}
#header .div3 {
	float: right;
	padding-top: 7px;
	height: 38px;
}
#header .div3 a {
	margin-left: 15px;
	padding: 1px 0px 2px 20px;
	background-repeat: no-repeat;
	background-position: left center;
}
#header .div4 {
	width: 510px;
	clear: left;
	float: left;
	height: 32px;
	padding-left: 14px;
}
#header .div4 a {
	float: left;
	margin-right: 2px;
	width: 100px;
	height: 18px;
	padding-top: 9px;
	padding-bottom: 9px;
	background: url('../image/tab_1.png') no-repeat;
	text-align: center;
	color: #333333;
	text-decoration: none;
	font-size: 14px;
	font-weight: bold;
	position: relative;
	z-index: 1;
}
#header .div4 a.selected {
	background: url('../image/tab_2.png') no-repeat;
	color: #FFF;
	padding-bottom: 15px;
	z-index: 3;
}
#header .div5 {
	clear: both;
}
#header .div5 .left {
	background: url('../image/header_1_left.png') no-repeat;
	width: 13px;
	height: 41px;
	float: left;
}
#header .div5 .right {
	background: url('../image/header_1_right.png') no-repeat;
	width: 13px;
	height: 41px;
	float: right;
}
#header .div5 .center {
	background: url('../image/header_1_center.png') repeat-x;
	height: 41px;
	margin-left: 13px;
	margin-right: 13px;
}
#header .div6 {
	clear: both;
	margin-bottom: 10px;
}
#header .div6 .left {
	background: url('../image/header_2_left.png') no-repeat;
	width: 11px;
	height: 36px;
	float: left;
}
#header .div6 .right {
	background: url('../image/header_2_right.png') no-repeat;
	width: 11px;
	height: 36px;
	float: right;
}
#header .div6 .center {
	background: url('../image/header_2_center.png') repeat-x;
	height: 36px;
	margin-left: 11px;
	margin-right: 11px;
	padding-left: 11px;
	padding-right: 11px;
}
#header .div7 {
	float: right;
	padding-top: 15px;
	padding-right: 115px;
}
#header .div8 {
	float: left; margin-top: 6px;
}
#header .div9 {
	float: left;
}
#header .div10 {
	float: left; 
	margin-top: 2px;	
}
#search {
	color: #FFF;
	font-weight: bold;
}
#search select {
	border: 1px solid #0A5391;
	padding: 1px;
}
#search a {
	color: #FFF;
}
#search input {
	border: 1px solid #0A5391;
	padding: 2px;
}
#breadcrumb {
	float: left;
	padding-top: 7px;
	padding-bottom: 11px;
	height: 13px;
	margin-bottom: 10px;
	color: #000000;
}
.switcher {
	float: right;	
	margin-top: 3px;
	margin-left: 10px;
}
.switcher a {
	text-decoration: none;
	display: block;
}
.switcher .selected {
	background: #FFFFFF url('../image/switcher.png') repeat-x;
}
.switcher .selected a {
	border: 1px solid #CCCCCC;
	background: url('../image/arrow_down.png') 116px center no-repeat;
	color: #666666;
	padding: 2px 5px 2px 5px;
	width: 121px;
}
.switcher .selected a:hover {
	background: #F0F0F0 url('../image/arrow_down.png') 116px center no-repeat;
}
.switcher .option {	
	position: absolute;
	z-index: 3;
	border-left: 1px solid #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 1px solid #CCCCCC;
	background-color: #EEEEEE;
	display: none;
	width: 131px;
}
.switcher .option a {
	color: #000;
	padding: 3px 5px 3px 5px;
}
.switcher .option a:hover {
	background: #FFC;
}
.switcher img {
	position: relative;
	top: 1px;
}
#column_left {
	float: left;
	width: 180px;
	margin-right: 10px;
	clear: left;
}
#column_right {
	float: right;
	width: 180px;
	margin-left: 10px;
	clear: right;
}
#content {
	margin-left: 190px;
	margin-right: 190px;
	margin-bottom: 10px;
}
#content .top .left {
	background: url('../image/content_top_left.png') no-repeat;
	width: 5px;
	height: 32px;
	float: left;
}
#content .top .right {
	background: url('../image/content_top_right.png') no-repeat;
	width: 5px;
	height: 32px;
	float: right;
}
#content .top .center {
	background: url('../image/content_top_center.png') repeat-x;
	margin-left: 5px;
	margin-right: 5px;
}
#content .top h1, .heading {
	padding: 8px 0px 8px 7px;
}
#content h1, .heading {
	color: #000000;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	text-transform: uppercase;
	margin: 0px;
}
#content .middle {
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF;
	padding: 10px 10px 1px 10px;
	min-height: 30px;
}
#content .bottom .left {
	background: url('../image/content_bottom_left.png') no-repeat;
	width: 5px;
	height: 5px;
	float: left;
}
#content .bottom .right {
	background: url('../image/content_bottom_right.png') no-repeat;
	width: 5px;
	height: 5px;
	float: right;
}
#content .bottom .center {
	background: url('../image/content_bottom_center.png') repeat-x;
	height: 5px;
	margin: 0 5px 10px 5px;
}
.box {
	margin-bottom: 10px;
	background: url('../image/box_top.png') no-repeat;
}
.box .top {
	padding: 8px 0px 8px 7px;
	color: #000000;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	text-transform: uppercase;
}
.box .top img {
	float: left;
	margin-right: 5px;
}
.box .middle {
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF;
	padding: 10px;
}
.box .bottom {
	height: 5px;
	background: url('../image/box_bottom.png') no-repeat;
}
.success {
	padding: 5px 0px;
	margin-bottom: 10px;
	background: #E4F1C9;
	border: 1px solid #A5BD71;
	font-size: 11px;
	font-family: Verdana, Geneva, sans-serif;
	text-align: center;
}
.warning {
	padding: 5px 0px;
	margin-bottom: 10px;
	background: #FFDFE0;
	border: 1px solid #FF9999;
	font-size: 11px;
	font-family: Verdana, Geneva, sans-serif;
	text-align: center;
}
.wait {
	padding: 5px 0px;
	margin-bottom: 10px;
	background: #FBFAEA;
	border: 1px solid #EFEBAA;
	font-size: 11px;
	font-family: Verdana, Geneva, sans-serif;
	text-align: center;
}
.required {
	color: #FF0000;
	font-weight: bold;
}
.error {
	color: #FF0000;
	display: block;
}
.help {
	cursor: pointer;
}
.tooltip {
	border: 1px solid #FDDA5C;
	background: #FBFF95;
	padding: 5px;
	font-size: 11px;
	width: 250px;
}
.clear { /* generic container (i.e. div) for floating buttons */
	overflow: hidden;
	width: 100%;
}
.button {
	padding-left: 8px;
	display: inline-block;
	margin-right: 5px;
	background: url('../image/button_left.png') top left no-repeat;
	text-decoration: none;
	color:#FFF;
}
.button span {
	color: #FFF;
	display: block;
	padding: 4px 12px 5px 5px;
	background: url('../image/button_right.png') top right no-repeat;
}
.buttons {
	background: #F8F8F8;
	border: 1px solid #DDDDDD;
	padding: 5px;
	margin-bottom: 10px;
}
.buttons input {
	padding: 0px;
	margin: 0px;
}
.buttons table {
	width: 100%;
	border-collapse: collapse;
}
.buttons table td {
	vertical-align: middle;
}
.content {
	background: #F7F7F7;
	border: 1px solid #DDDDDD;
	padding: 10px;
	margin-top: 3px;
	margin-bottom: 10px;
}
.list {
	margin-bottom: 10px;
	width: 100%;
}
.list td {
	text-align: center;
	vertical-align: top;
	padding-bottom: 10px;
}
.sort {
	margin-bottom: 10px;
	background: #F8F8F8;
	height: 30px;
	width: 100%;
}
.sort .div1 {
	float: right;
	margin-left: 5px;
	padding-top: 6px;
	padding-right: 9px;
}
.sort .div2 {
	text-align: right;
	padding-top: 9px;
}
.sort select {
	font-size: 11px;
	margin: 0;
	padding: 0;
}
.pagination {
	display: inline-block;
	width: 100%;
	background: #F8F8F8;
	margin-bottom: 10px;
}
.pagination .links, .pagination .results {
	padding: 7px;
}
.pagination .links {
	float: left;
}
.pagination .links a {
	border: 1px solid #CCCCCC;
	padding: 4px 7px;
	text-decoration: none;
	color: #000000;
}
.pagination .links b {
	border: 1px solid #CCCCCC;
	padding: 4px 7px;
	text-decoration: none;
	color: #000000;
	background: #FFFFFF;
}
.pagination .results {
	float: right;
}
.tabs {
	width: 100%;
	height: 31px;
	margin-bottom: 0px;
}
.tabs a {
	float: left;
	display: block;
	padding: 6px 15px 7px 15px;
	margin-right: 2px;
	border-top: 1px solid #DDDDDD;
	border-bottom: 1px solid #DDDDDD;
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF url('../image/tab_3.png') repeat-x;
	color: #000000;
	font-weight: bold;
	font-size: 13px;
	text-decoration: none;
	z-index: 1;
	position: relative;
	top: 1px;
}
.tabs a.selected {
	background: #FFFFFF url('../image/tab_3.png') repeat-x;
	border-bottom: 0px;
	padding-bottom: 8px;
	z-index: 3;
}
.tab_page {
	border: 1px solid #DDDDDD;
	background: #FFFFFF;
	padding: 10px;
	display: block;
	z-index: 2;
	margin-bottom: 10px;
}
#footer {
	width: 100%;
	clear: both;
	padding-top: 5px;
	border-top: 1px solid #DDDDDD;
}
#footer .div1 {
	float: left;
	text-align: left;
}
#footer .div2 {
	float: right;
	text-align: right;
}
#category ul {
	margin-top: 0px;
	margin-bottom: 0px;
	margin-left: 8px;
	padding-left: 12px;
	list-style: url('../image/bullet_1.png');
}
#information ul {
	margin-top: 0px;
	margin-bottom: 0px;
	margin-left: 8px;
	padding-left: 12px;
	list-style: url('../image/bullet_2.png');
}
.cart {
	border-collapse: collapse;
	width: 100%;
	border: 1px solid #EEEEEE;
	margin-bottom: 10px;
}
.cart th {
	background: #EEEEEE;
	padding: 5px;
	font-weight: normal;
}
.cart td {
	padding: 5px;
}
.tags, .tags a {
	font-style: italic;
	font-size: x-small;
}
#module_cart .middle {
	padding: 5px;
}
.cart_module_total {
	padding: 0 3px 0 3px;
	font-size: 0.9em; 
	color: #222;
}
.cart_remove {
	margin-top: 3px;
	background: url('../image/list_remove_btn.gif') no-repeat left center transparent;
	padding-right:10px;
	cursor:pointer;
}
.cart_remove_loading {
	margin-top: 3px;
	background: url('../image/ajax_load.gif') no-repeat transparent;
	padding-right:10px;
}
.button_add_small, a.button_add_small:visited {
	margin-top: 3px;
	background: url('../image/button_add_small.png') no-repeat left center transparent;
	padding:5px;
	text-decoration: none;
	cursor:pointer;
}
#content .middle .box {
	float: left;
	margin: 0 6px 10px 6px;
	min-height: 0px;
}
#content .middle .box .middle {
	width: 158px;
	min-height: 0px;
}

header.tpl:

<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/stylesheet.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
DD_belatedPNG.fix('img, #header .div3 a, #content .left, #content .right, .box .top');
</script>
<![endif]-->
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/thickbox/thickbox-compressed.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/thickbox/thickbox.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tab.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript"><!--
function bookmark(url, title) {
	if (window.sidebar) { // firefox
    window.sidebar.addPanel(title, url, "");
	} else if(window.opera && window.print) { // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} else if(document.all) {// ie
   		window.external.AddFavorite(url, title);
	}
}
//--></script>
</head>
<body>
<div id="container">
<div id="header">
  <div class="div1">
    <div class="div2">
      <?php if ($logo) { ?>
      <a href="<?php echo str_replace('&', '&', $home); ?>"><img src="<?php echo $logo; ?>" title="<?php echo $store; ?>" alt="<?php echo $store; ?>" /></a>
      <?php } ?>
    </div>
  
	
	
	
	
	<div class="div7">валюты<br />
      <?php if ($currencies) { ?>
        <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="currency_form">
          <div class="switcher">
            <?php foreach ($currencies as $currency) { ?>
            <?php if ($currency['code'] == $currency_code) { ?>
            <div class="selected"><a><?php echo $currency['title']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($currencies as $currency) { ?>
              <a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
              <?php } ?>
            </div>
          </div>
          <div style="display: inline;">
            <input type="hidden" name="currency_code" value="" />
            <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
          </div>
        </form>
		
	
		
		
      <!--  <?php } ?>
        <?php if ($languages) { ?>
        <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="language_form">
          <div class="switcher">
            <?php foreach ($languages as $language) { ?>
            <?php if ($language['code'] == $language_code) { ?>
            <div class="selected"><a><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />  <?php echo $language['name']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($languages as $language) { ?>
              <a onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $('#language_form').submit();"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />  <?php echo $language['name']; ?></a>
              <?php } ?>
            </div>
          </div>
          <div>
            <input type="hidden" name="language_code" value="" />
            <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
          </div>
        </form>
        <?php } ?>-->
      </div>
	
	
	
	
	
	
	
	
	
	
	
	
	
   
    <div class="div5">
	
	
	
	
	
      <div class="left">
	  
	  
	  
	  
	  
	  <div class="div4"><a href="<?php echo str_replace('&', '&', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>
      <?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?>
      <a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a><a href="<?php echo str_replace('&', '&', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a></div>
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  </div>
      <div class="right">
	  
	  
	  
	 
	  
	  
	  
	  
	  
	  
	  
	  </div>
      <div class="center">
       
	    
	   
	   
	   
	   
	   
      </div>
    </div>
  </div>
  <div class="div6">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
	  <?php if (isset($common_error)) { ?>
	  <div class="warning"><?php echo $common_error; ?></div>
	  <?php } ?>
     
 <div id="search">
          <div class="div8"><?php echo $entry_search; ?> </div>
          <div class="div9">
            <?php if ($keyword) { ?>
            <input type="text" value="<?php echo $keyword; ?>" id="filter_keyword" />
            <?php } else { ?>
            <input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
            <?php } ?>
            <select id="filter_category_id">
              <option value="0"><?php echo $text_category; ?></option>
              <?php foreach ($categories as $category) { ?>
              <?php if ($category['category_id'] == $category_id) { ?>
              <option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select>
          </div>
          <div class="div10">  <a onclick="moduleSearch();" class="button"><span><?php echo $button_go; ?></span></a> <a href="<?php echo str_replace('&', '&', $advanced); ?>"><?php echo $text_advanced; ?></a></div>
        </div>
		
		
		
		
		  <div class="div3"><a href="<?php echo str_replace('&', '&', $special); ?>" style="background-image: url('catalog/view/theme/default/image/special.png');"><?php echo $text_special; ?></a><a onclick="bookmark(document.location, '<?php echo addslashes($title); ?>');" style="background-image: url('catalog/view/theme/default/image/bookmark.png');"><?php echo $text_bookmark; ?></a><a href="<?php echo str_replace('&', '&', $contact); ?>" style="background-image: url('catalog/view/theme/default/image/contact.png');"><?php echo $text_contact; ?></a><a href="<?php echo str_replace('&', '&', $sitemap); ?>" style="background-image: url('catalog/view/theme/default/image/sitemap.png');"><?php echo $text_sitemap; ?></a></div>
		
		
		
		
		
		
		
		
		
		
		
		

	 <!--<div id="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo str_replace('&', '&', $breadcrumb['href']); ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
      </div>-->
	  
	  
	  
      
    </div>
  </div>
</div>
<script type="text/javascript"><!-- 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>
<script type="text/javascript"><!--
$('#search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

function moduleSearch() {	
	pathArray = location.pathname.split( '/' );
	
	url = '<?php echo HTTP_SERVER; ?>';
		
	url += 'index.php?route=product/search';
		
	var filter_keyword = $('#filter_keyword').attr('value')
	
	if (filter_keyword) {
		url += '&keyword=' + encodeURIComponent(filter_keyword);
	}
	
	var filter_category_id = $('#filter_category_id').attr('value');
	
	if (filter_category_id) {
		url += '&category_id=' + filter_category_id;
	}
	
	location = url;
}
//--></script>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
	$(this).find('.option').slideUp('fast');
}); 
//--></script>

Кстати, кто подскажет как грамотно выровнять поиск - буду благодарна :rolleyes:

...просто когда пробую выровнять, у меня перекашивается контент бокс

Надіслати
Поділитися на інших сайтах


справилась )))

наконец-то начинает что-то нарисовываться...

теперь хочу изменить отображение свитчера (выбор валюты)

вместо старого хочу поставить вот такой:post-10368-0-96540900-1317894559_thumb.png

пример тут: http://sainathchillapuram.com/tf/opencart/blackoc-v15/#

Надіслати
Поділитися на інших сайтах


в PHP я вообще ноль...

... кто подскажет как правильно связать новое отображение выбора валюты с функцией смены валют

у меня будет четыре валюты

вот старый код валют дефолтного шаблона

<?php if ($currencies) { ?>
        <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="currency_form">
          <div class="switcher">
            <?php foreach ($currencies as $currency) { ?>
            <?php if ($currency['code'] == $currency_code) { ?>
            <div class="selected"><a><?php echo $currency['title']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($currencies as $currency) { ?>
              <a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
              <?php } ?>
            </div>
          </div>
          <div style="display: inline;">
            <input type="hidden" name="currency_code" value="" />
            <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
          </div>
        </form>

а вот новый код (в котором надо связать PHP)

<div id="curr">ВАЛЮТА<br />
                        <a title="Евро" onclick="$('input[name=\'currency_code\']').attr('value', 'EUR').submit(); $(this).parent().parent().submit();">€</a>
                                    <a title="Pound Sterling"><b>?</b></a>
                                    <a title="US Dollar" onclick="$('input[name=\'currency_code\']').attr('value', 'USD').submit(); $(this).parent().parent().submit();">$</a>
                        <input type="hidden" name="currency_code" value="" />
      <input type="hidden" name="redirect" value="/index.php?route=common/home" />
    </div>
Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку
×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.