Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

POSTing exta variables to cart.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-13-2012, 05:08 PM
 
AdamL56 AdamL56 is offline
 

Newbie
  
Join Date: Oct 2010
Posts: 3
 

Default 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?
__________________
X-Cart v. 4.2.2
X-Cart v. 4.4.4
Reply With Quote
  #2  
Old 03-13-2012, 05:26 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: POSTing exta variables to cart.php

echo $_GET['avariable'];

{$smarty.get.avariable}
__________________
xcartmods.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:20 PM.

   

 
X-Cart forums © 2001-2020