Page 1 of 1

Adding $Totalquantities ???

Posted: Tue Jul 31, 2007 8:02 pm
by zunskigraphics
Ok here is the deal...

I have a shopping cart that when clicking "view cart" you see all the products and the quantities of those products.

I need to create php code to add those quantities together and output that into another "input text box". (basically add the quantities of all products together and "echo" that number in another field or "input text box".)


I am using Cartweaver, and would post the code, but I don't want to do anything unethical. If I see some sort of direction in the code, I'm sure I can manipulate it.

my guess would be something like this:
(obviously this doesn't work)

Code: Select all

if ($Totalquantity >= 12;   // This line is the variable of the input text box. Is that possible?
     $Product["DiscountAmount"] =.1 * $Product["Price"] ;   //  This line just takes a discount off once that number is figured
}

I hope this makes sense and thanks in advance!!!

L

Posted: Tue Jul 31, 2007 8:17 pm
by zunskigraphics
Just thought of something that might help.


The product and quantities of each product are referred to as

Code: Select all

["Quantity"]  and $Product.