Post by cechmaster » Fri Feb 25, 2011 2:15 am

tjonnyc wrote:Also having a problem with 2X the item quantity added.

I checked the settings in Admin -> Extensions -> Modules -> Cart

AJAX: Enabled
Cart: Disabled

But... 1.) The right-sidebar cart *still* shows up (even though it's disabled)... and 2.) Made no difference whatsoever - still adds 2X products to the cart.

Any ideas?
What I did to get it to work was:
1. Installed "Cart in Header" by following harryo's instructions
2. Enable cart sidebar module
3. navigate to (your_theme_folder) -> template -> module -> and backup and edit cart.tpl
4. remove all html (for me it was line 1-38) (or remove everything from and including <div id="module_cart" class="box"> to the last <?php } ?>)

The cool animation should work and the cart sidebar will not show up.
I'm not sure about the X2 - it doesn't happen to me. Try a fresh install. You probably have some duplicate code or something. IDK

Newbie

Posts

Joined
Tue Feb 15, 2011 6:13 am

Post by kdmp » Thu Mar 03, 2011 12:56 pm

will this, or is there a new version coming, for 1.4.9.3?

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by celestial » Fri Mar 04, 2011 1:34 am

Chones wrote:This is simpler and works with 1.4.9.3
http://craigmurray.me.uk/opencart-mods/ ... -opencart/
Super Excelent, one question??, multilanguage?? please

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by Chones » Fri Mar 04, 2011 2:03 am

Not at the moment I'm afraid. Sorry. I'll rewrite one day.

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by Liniver » Tue May 24, 2011 2:57 am

Hi

I have a problem. Opencart v 1.4.9.3.

When I View my error-log I find a whole bunch of these:

2011-05-23 19:38:02 - PHP Notice: Undefined index: HTTP_REFERER in /www/webvol2/g4/fivyyp74eolozj6/americandy.se/public_html/catalog/controller/checkout/cart.php on line 29

I'm guessing it has something to do with the cart in header? I'm grateful for any help I can get..

Line 29 in cart.php:

Code: Select all

	$this->redirect(html_entity_decode($_SERVER['HTTP_REFERER']));
And my header.tpl:

Code: Select all

<?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, #header .div6, #headerlogo, #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">
    <?php if (!$logged) { ?>
    <a href="<?php echo str_replace('&', '&', $login); ?>" style="background-image: url('catalog/view/theme/default/image/rightlist.png');"d="tab_login"><?php echo $text_login; ?></a><a href="<?php echo str_replace('&', '&', $login); ?>" style="background-image: url('catalog/view/theme/default/image/rightlist.png');"><?php echo $text_account; ?></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('&', '&', $cart); ?>" style="background-image: url('catalog/view/theme/default/image/cart.png');">&nbsp;<?php echo $items_number; ?><?php echo $text_items; ?>&nbsp;</a></div>
    <div style="clear:both;"></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 } ?>
        <div class="switcher">&nbsp;&nbsp; | &nbsp;&nbsp;</div>
        <?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) { ?>
              <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']; ?>" />&nbsp;&nbsp;</a>
              <?php } ?>
          </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="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('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_my_account; ?></a>
      <?php } ?>
      <!--<a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_my_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>
      
      <a href="<?php echo str_replace('&', '&', $contact); ?>" id="tab_contact"><?php echo $text_contact; ?></a></div>
      
      <div class="center">
        <div id="search">
         
          <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 } ?>
            <a onclick="moduleSearch();" class="button" style="margin-left:170px;"></a>
            
          </div>
           
        </div>
      </div>
      <div id="breadcrumb">
        
      </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_account').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (route == 'product/latest') {
			$('#tab_product').addClass('selected');	
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else if (route == 'information/contact') {
			$('#tab_contact').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 = location.protocol + "//" + location.host + "/" + pathArray[1] + '/';
		
	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>

Newbie

Posts

Joined
Sat Feb 19, 2011 3:23 am

Post by Liniver » Mon May 30, 2011 9:43 pm

*bump* :ponder:

Newbie

Posts

Joined
Sat Feb 19, 2011 3:23 am
Who is online

Users browsing this forum: No registered users and 6 guests