This topic is locked

Add to cart quanity by input text

9/24/2012 10:26:28 AM
PHPRunner General questions
L
Luca author

Hi, I'm Luca from Italy,
I'm using PhpRunner 6.1
how I can use a input text to add a custom Qty?
I've used this tutorial to insert a Input text: http://xlinesoft.com/phprunner/docs/add_custom_field_to_form.htm
?????? for unknow code...
Button code:

function OnServer($params,$result,$keys)

{

// Put your code here.

global $dal;

global $strSQL, $conn;

if ($keys['id_riferimento'])

{

// inserisci nel carrello

$test_prefixshopping_cart = $dal ->Table('test_prefixshopping_cart');

$test_prefixshopping_cart->id = $keys ['id_riferimento'];

$test_prefixshopping_cart->Qty = ??????

$test_prefixshopping_cart->UserID = $_SESSION['UserID'];

$test_prefixshopping_cart->Add();

}

$result ["txt"] = "Prodotto inserito";


I view a input text in a Form and I can input a value (1, 2, 30, etc, etc..) but this value can't add to table...
Thanks and best Regards,

Luca

L
Luca author 11/16/2012

Nothing?

Sergey Kornilov admin 11/16/2012

If you simply copied and pasted code from that tutorial you can access your custom field value as $_REQUEST["test"]

$test_prefixshopping_cart->Qty = $_REQUEST["test"];
L
Luca author 11/19/2012



If you simply copied and pasted code from that tutorial you can access your custom field value as $_REQUEST["test"]

$test_prefixshopping_cart->Qty = $_REQUEST["test"];



Nothing, I had already tried following the example, but the field "Qty" is always empty ...

Sergey Kornilov admin 11/19/2012

I guess your code is different from the one in example. Not sure what else it might be.
If you have a valid support contract post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.