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)
-   -   http post (standard html hidden variables) (https://forum.x-cart.com/showthread.php?t=8085)

xcart_uf1 06-14-2004 11:23 AM

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!

B00MER 06-15-2004 08:35 AM

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. ;)

xcart_uf1 06-18-2004 10:28 AM

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!


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

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