View Single Post
  #21  
Old 10-15-2011, 07:41 AM
 
Powertrain Powertrain is offline
 

Senior Member
  
Join Date: Mar 2011
Posts: 101
 

Default Re: Add special handling charge to cart totals

Quote:
Originally Posted by cflsystems
func.order.php is the one for orders functions

Thank you Steve

I actually followed instructions and got it to work in Gold 4.4.2 but my situation is a bit different. We have extra field that certain products use (extra charge) and so far it works if one product is added to the cart but if you add two or more products it pulls only one extra field value (extra charge).
It needs to add this field value for each product in the cart.

I played with the code adding foreach ( but no luck. Here is the sample code:

PHP Code:
$int_hdl func_query_first("SELECT * FROM $sql_tbl[extra_field_values] WHERE fieldid=1 AND productid=$product[productid]");
if (!empty(
$int_hdl["value"])) {

foreach (
$int_hdl as $handling_special) {

           
$handling_special field_value;

        }
        } 
I don't know if "foreach" is the right way to go about it but logically value needs to be added for each product. Any suggestions?

Thanks for your help.
__________________
x-cart 4.4.2 Gold
Reply With Quote