Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Changing the number of items in mini cart to the actual # of items in minicart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 11-15-2008, 04:22 AM
 
info@dustinframpton.com info@dustinframpton.com is offline
 

Member
  
Join Date: Oct 2008
Posts: 22
 

Default Re: Changing the number of items in mini cart to the actual # of items in minicart

I tried this but it doesnt work for me....i get an error " Parse error: syntax error, unexpected $end in /home/trendytt/public_html/minicart.php on line 65"

my gift certifictes module is disabled.....any ideas?

Quote:
if ( !defined('XCART_START') ) { header("Location: home.php"); die("Access denied"); }

x_session_register ("cart");

$MINICART["total_cost"] = price_format(0);
$MINICART["total_items"] = 0;

if (!empty($cart)) {

if (!empty($cart["total_cost"])) {
if (!empty($active_modules["Fast_Lane_Checkout"]))
$MINICART["total_cost"] = $cart["display_subtotal"];
else
$MINICART["total_cost"] = $cart["total_cost"];
}

$MINICART["total_items"] = 0;

if (!empty($cart["products"]) and is_array($cart["products"])) {
foreach ($cart["products"] as $_tmp)
$MINICART["total_items"] += $_tmp["amount"];
}
if (!empty($cart["giftcerts"]) and is_array($cart["giftcerts"]))
$MINICART["total_items"] +=$cart["giftcerts"];

$smarty->assign("minicart_total_cost", $MINICART["total_cost"]);
$smarty->assign("minicart_total_items", $MINICART["total_items"]);
?>
__________________
4.1.11
Reply With Quote
  #12  
Old 07-13-2009, 04:44 PM
  pairodimes's Avatar 
pairodimes pairodimes is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 50
 

Default Re: Changing the number of items in mini cart to the actual # of items in minicart

Seems to work in 4.2.x as well
__________________
------
Brian

Portland web design / development
X-Cart 4.1.9 (a few carts)
X-Cart 4.2.0 (1 cart so far)
Reply With Quote
  #13  
Old 07-17-2010, 09:49 AM
 
kgoel kgoel is offline
 

Advanced Member
  
Join Date: May 2010
Posts: 82
 

Default Re: Changing the number of items in mini cart to the actual # of items in minicart

I have problem in using 4.3.1 version. It does not change the item number and total unless I refresh the page. This is teh case for all browsers
__________________
Version 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:31 PM.

   

 
X-Cart forums © 2001-2020