Hello,
Love this module. I have a question: On my product pages where I have my "Notify" button as a cart link for products that are out-of-stock, how may I also create a hyperlink that I'd like to display in the product's body that achieves the same functionality?
Here is an illustration of what I need to do:
Hello World
This is my widget.
It is green.
It is currently out of stock. PLEASE CLICK HERE to be notified once it comes back in stock!
...
..
..
...
<Notify Cart Button> <Add to Wish List Cart Button>
end of product page
I've looked at the generated cart form, and mine looks something like this:
<form action="/link/to/product" accept-charset="UTF-8" method="post" id="uc-product-add-to-cart-form-###" class="ajax-cart-submit-form uc-aac-cart">
<input type="hidden" name="form_build_id" id="form-51e53325a949b3f2587434839c9a7b3a" value="form-51e53325a949b3f2587434839c9a7b3a" />
<input type="hidden" name="form_token" id="edit-uc-product-add-to-cart-form-###-form-token" value="81682d8ed71cc5ece67196d623769628" />
<input type="hidden" name="form_id" id="edit-uc-product-add-to-cart-form-###" value="uc_product_add_to_cart_form_###" />
<input type="hidden" name="product-nid" id="edit-product-nid" value="###" />
<input type="submit" name="op" id="edit-notify" value="Notify when back in stock" class="form-submit stock-notify" />
<input type="submit" name="op" id="edit-wishlist" value="Add to wish list" class="form-submit" />
<input type="hidden" name="aac_nid" id="edit-aac-nid" value="###" />
</form>
Hoops I don't know how to jump through:
1) I don't know how to re-populate the token values
2) If I were to simply duplicate the entire form and stash it in my body, now I have two forms with the same ID that I don't think will pass validation.
3) I don't know how to change from an input type submit to a simple <a href></a>
My current bright idea: Is it possible to use javascript to "push" the form through? I have absolutely no clue how to do this, but I imagine it might be something like...
<a href="#?this.form.id(uc-product-add-to-cart-form-###).submit;">Click here to be added to our Notification List for this product</a>
Is anything like this possible?
Thank you very much in advance!!
Regards,
BigMike
Comments
Comment #0.0
BigMike commented.
Comment #1
BigMike commentedAnyone?
Comment #2
BigMike commentedAnyone*2?
Comment #2.0
BigMike commented.