0

On product details page, there is QTY textbox present, but that follows the "Add to Cart" button. Whatever quantity I add to it, will be accounted for "Adding the product to cart in that particular quantity"

But what i want is a similar textbox, that follows the "Add to Wishlist" button. How do I accomplish the task of adding the product to wishlist in the quanitity specified in a textbox?????

Thanks in Advance

1 Answer 1

1

The default add to wishlist link does this already by working with the quantity options used for add to cart. It will submit the add to cart from but update the url to be that of the wish list and not the add to cart.

productAddToCartForm.submitLight(this, this.href); return false;

But if you are not working on a page that has an add to cart form then simply supply the input field with name qty and the default controller will take it from here.

You can also simply add the value via the url it wanted:

/wishlist/index/add/product/554/form_key/QOTCSV8HqoLA0K3T/qty/7

This will add 7 of the product 554 to the user's wishlist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.