This example shows how to add a field to let customers to choose their own price. But the button in that example is for fast checkout. I am trying to add the customer-chosen price to cart? How do I do this?
The code that I have (google app engine - python) adds the item to the cart but not the price; the price is always zero. This is the code I am using:
self.response.out.write("""
$ <input type="text" name="item_price_1"/>
<div class="product">
<input type="hidden" class="product-title" value="%s">
<input type="hidden" class="product-attr-id" value="id#%s">
<div class="googlecart-add-button" tabindex="0" role="button" title="Add to cart">
</div></div>
And this is the sandbox script:
#sandbox script
self.response.out.write("""<script id='googlecart-script' type='text/javascript' src='https://checkout.google.com/seller/gsc/v2_2/cart.js?mid=1234567890' integration='jscart-wizard' post-cart-to-sandbox='true' currency='USD' productWeightUnits='LB'></script> """)