X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Help tracking down $add_product[price] (https://forum.x-cart.com/showthread.php?t=49936)

sgpark 09-29-2009 05:21 AM

Help tracking down $add_product[price]
 
Wondering if anyone can tell me exactly how the form 'orderform' passes the value for price to cart.php when adding a product to cart. I don't seem to see a field/element named 'price' that would hold the price value.

This is a store in development, X-Cart 4.2.2 Gold.

Any help would be much appreciated.

rogue 09-29-2009 06:53 AM

Re: Help tracking down $add_product[price]
 
In the file cart.php I see the line
Code:

        $add_product["price"] = abs(doubleval(isset($price) ? $price : 0));
at line 226. Is this what you are looking for?

And just below there is the call to func_add_to_cart.

sgpark 09-29-2009 07:04 AM

Re: Help tracking down $add_product[price]
 
Thanks for your help, but I think the problem is occurring before cart.php. What I'm having difficulty finding is where the form passes the field value to cart.php. Right now, it is passing $0 as the price, which means it's either not passing the price at all or is passing $0 as a default value. So the price isn't even making it to cart.php.


All times are GMT -8. The time now is 03:30 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.