Hi,
I'm using ubercart as a cart only connected with a flash site.
I found out that the following lines are fine to go directly to cart (the following code refers to product contained in node 18):
<html>
<body>
<form action="/my_site/node/18" accept-charset="UTF-8" method="post" id="uc-product-add-to-cart-form-18">
<label for="edit-attributes-2">Size: </label>
<select name="attributes[2]" class="form-select" id="edit-attributes-2" >
<option value="5">46</option>
<option value="6">48</option>
<option value="7">50</option>
<option value="8">52</option>
<option value="9">54</option>
<option value="10">56</option>
</select>
<label for="edit-attributes-3">Length: </label>
<select name="attributes[3]" class="form-select" id="edit-attributes-3" >
<option value="12">Long</option>
<option value="11">Regular</option>
<option value="13">Short</option>
</select>
<input type="hidden" name="qty" id="edit-qty" value="1" />
<input type="submit" name="op" id="edit-submit" value="Add to cart" class="form-submit" />
<input type="hidden" name="form_id" id="edit-uc-product-add-to-cart-form-18" value="uc_product_add_to_cart_form_18" />
</form>
</body>
</html>However this is fine for non authenticated users only.
As soon as one user log into my drupal site with username and passwd, I'd need the following string as well in order to add a product to the cart:
<input type="hidden" name="form_token" id="edit-uc-product-add-to-cart-form-18-form-token" value="c2548dcac25acd9c340027ea3bbf0939" />P.S: the value "c2548dcac25acd9c340027ea3bbf0939" changes for every product and every user.
I thought of instructing the flash/asp site to inquire the ubercart product page just before adding it to the cart to get that variable value.
Has anyone found an easier workaround?
cheers





Joined: 01/16/2008