I’m placing swfs in product pages of a oscommerce site.
I trying to send the whole info of a certain product to the shopping cart.
ORIGINAL CODE IS:
<form name="cart_quantity" action="http://www.shop.com/product_info.php&action=add_product" method="post"><input type="hidden" name="products_id" value="26">
<input type="hidden" name="id[3]" value="9">
The issue is that I need to pass the two hidden vars ( products_id and id[3] - wich is atrributes of the product ( may be size, color or whatever )
I’m making my first test with 50% success.
My flash code is follow:
boton.onRelease = function(){
products_id="26";
id[3]=9;
getURL("http://www.shop.com/product_info.php?products_id=24&action=add_product", "", "POST");
}
// Possibility two /////////////////////////////
sendVars = new LoadVars();
sendVars.products_id="26";
sendVars.id[3]=9;
boton2.onRelease = function(){
sendVars.send("http://www.shop.com/product_info.php?products_id=24&action=add_product", "POST");
}
Ok, products_id does pass OK
but id[3] value doesn’t pass.
May be the [3] is the problem, but I can`t change that
i MUST pass the hidden value id[3]
HELP!
UPDATED 2 hours later:
i made a few tests more:
tryed this:
products_id=“26&id[3]=9”;
tryed this:
products_id=“26&id=[,9]”;
tryed this:
products_id=“26&id=(,9)”;
tryed this:
products_id=“26”;
id="[,9]";
BUT NEVER SUCCEDDED