View Single Post
  #3  
Old 03-05-2007, 03:06 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

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

i know the following works in 4.0.x but dont know about 4.1.x

in minicart.php change
Code:
$MINICART["total_items"] = ((!empty($cart["products"]) and is_array($car t["products"]))?count($cart["products"]):0) + ((!empty($cart["giftcerts"]) and i s_array($cart["giftcerts"]))?count($cart["giftcerts"]):0);
to
Code:
$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"];
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote