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

http post (standard html hidden variables)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-14-2004, 11:23 AM
 
xcart_uf1 xcart_uf1 is offline
 

Newbie
  
Join Date: Jun 2004
Posts: 2
 

Default http post (standard html hidden variables)

Having spent several hours trying to figure this out I would like to ask for help .... I hope the information provided isn't overkill!

It appears that XCART intercepts the standard HTML variable passing and prevents it from working normally.
Is this assumption correct and if so is there a work around?

Reason for my assumption:

Added text field to product.tpl to allow user to change value.
<input type="text" name="extra0" value="43" size=5>

The HTML code is within the <form> </form> parameters.

Modified the cart.php by adding the following code:
x_session_register("test0");
$tt0=$_POST['extra0'];
$smarty->assign("test0", $tt0);

Modified the cart.tpl file by adding the following code:
{$test0}

The value on the resulting web page is blank.

I modifed the code in cart.php to the following:
$tt0=99;

And the value 99 displays on the resulting web page correctly.

I tried the HTML variable passing code in another application (not xcart) and it works fine.

Your help is greatly appreciated. Thanks!
Reply With Quote
  #2  
Old 06-15-2004, 08:35 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

X-Cart uses a mechanism to make like globals is on, so you could easily use: $extra0 to retrieve the value vs $_GET['extra0'] or $_POST['extra0']

hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 06-18-2004, 10:28 AM
 
xcart_uf1 xcart_uf1 is offline
 

Newbie
  
Join Date: Jun 2004
Posts: 2
 

Default Passing variables

Thanks Boomer for the suggestion.

I thought I had tried all of the ways to pass the variables.

I finally modified the way I approached the problem and eliminated
the need to pass the variables.

Thanks Again!
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 03:50 PM.

   

 
X-Cart forums © 2001-2020