Page 2 of 2

Re: Refreshing Cart Sub Total in Header

Posted: Mon Dec 07, 2009 5:00 pm
by tpsvca
Hello,

I'm just install cart on header, according your instructions, but have one prob:
Notice: Undefined variable: text_items_count in /var/www/opencart/catalog/view/theme/ebeddingshop/template/common/header.tpl on line 107
Notice: Undefined variable: text_subtotal in /var/www/opencart/catalog/view/theme/ebeddingshop/template/common/header.tpl on line 109: 0,00€

My code in common/header.tpl looks like:

Code: Select all

<div class="middle">
  <?php echo $this->cart->countProducts(); ?>&nbsp;
  <a href="<?php echo $items_count; ?>" class="subtotal"><?php echo $text_items_count; ?></a>
  <br />
  <a href="<?php echo $cart; ?>" class="subtotal"><?php echo $text_subtotal; ?></a>:&nbsp;<?php echo $subtotal; ?><?php echo $text_checkout;?>
</div>
Look like scrip can load the old texts from header.php like $text_home, but can't load new variables like $text_subtotal

Re: Refreshing Cart Sub Total in Header

Posted: Mon Dec 07, 2009 5:29 pm
by tpsvca
SOLVED! thank you :) Just one proposition: When you writing module, give us in readme.txt the changes you have made in the core's files. O0
tpsvca wrote:Hello,

I'm just install cart on header, according your instructions, but have one prob:
Notice: Undefined variable: text_items_count in /var/www/opencart/catalog/view/theme/ebeddingshop/template/common/header.tpl on line 107
Notice: Undefined variable: text_subtotal in /var/www/opencart/catalog/view/theme/ebeddingshop/template/common/header.tpl on line 109: 0,00€

My code in common/header.tpl looks like:

Code: Select all

<div class="middle">
  <?php echo $this->cart->countProducts(); ?>&nbsp;
  <a href="<?php echo $items_count; ?>" class="subtotal"><?php echo $text_items_count; ?></a>
  <br />
  <a href="<?php echo $cart; ?>" class="subtotal"><?php echo $text_subtotal; ?></a>:&nbsp;<?php echo $subtotal; ?><?php echo $text_checkout;?>
</div>
Look like scrip can load the old texts from header.php like $text_home, but can't load new variables like $text_subtotal

Re: Refreshing Cart Sub Total in Header

Posted: Wed Sep 08, 2010 2:42 am
by anmgra
harryo40 wrote:Hi all,
Did you finally manage to resolve the updating of your cart in the header?
If not, take a look at the store i have done www.next2nowt.com & if what i have working (cart updating in header) is what your looking at then maybe i could help you guys out ;)
If its not what your looking at doing then ive read this post wrong...lol
cheers
h
can you share how you got the ajax thing to work?

Re: Refreshing Cart Sub Total in Header

Posted: Fri Oct 29, 2010 4:53 am
by harryo40
Anmgra wrote.....
can you share how you got the ajax thing to work?
The latest version for OC1.4.9.1 is available to download from here.....
http://www.opencart.com/index.php?route ... ion_id=716
I have also started a new thread in the forum called 'Cart In header' which can be viewed here.....
http://forum.opencart.com/viewtopic.php?f=112&t=22043 for people to post any question, issues or problems with it ;)
cheers
harryo