PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Price Field Quantity Read Only

  1. I would appreciate any indication on how to turn the quantity sub-field read only. The Code snippet would be better.

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink
  2. There is an option to hide the Quantity field if you are using the Single Product field. Can you provide more details as to the use case as far as why you want to make it read only rather than simply hide it?

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink
  3. I need to show the items from the shopping cart and just change the shipping and some other options that will change the total amount. If the user needs to change the quantity he will have to go back to the shopping cart. If i don't show the quantity field the total wont be calculated, in fact it is not even shown in the form.

    Would it be too hard to make the field read only?

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink
  4. Gotcha. You would have to use jQuery to do this. You would use jQuery to set the quantity input so that it is disabled. I did a quick search on Google and came up with this:

    http://stackoverflow.com/questions/1362153/how-can-i-use-jquery-to-make-an-input-readonly

    There may be other examples on Google that show how to use jQuery to do this.

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink