View Single Post
  #22  
Old 10-15-2011, 09:30 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Add special handling charge to cart totals

Because your code assigns new value to $handling_special with each loop without adding the old one to the cart. You need to also include in the foreach code to add the value to cart if any then go to the next one. Something like

foreach ($int_hdl as $handling_special) {

$handling_special = field_value;
cart_total += $handling_special;

}
}


replace cart_total with the actual cart total field (or the field you are adding value to)
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote