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)
-   -   POSTing exta variables to cart.php (https://forum.x-cart.com/showthread.php?t=62957)

AdamL56 03-13-2012 05:08 PM

POSTing exta variables to cart.php
 
I'm simply trying to add variables at the end of the query string for the cart.php page and then access them in php. I've tried to do this (for different reasons) when both adding a product to cart and when updating the cart and haven't had any luck with either.

eg.
Code:

cart.php?mode=add&productid=555&amount=1&avariable=Y


so I want to access avariable in php. I read that x-cart will automatically assign extra POST data to variables. I've tried both echo $avariable; and echo $_POST['avariable']; and haven't had luck with either.

I can see with firebug that avariable is being POSTed to cart.php but for some reason I am unable access it. Is there a trick to this or something I'm missing?

PhilJ 03-13-2012 05:26 PM

Re: POSTing exta variables to cart.php
 
echo $_GET['avariable'];

{$smarty.get.avariable}


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

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