1 reply [Last post]
shushu.i's picture
Offline
Joined: 11/25/2009
Juice: 23

In my module I don't want to give the user the option to update the quantity. It should always be 1, but still I want it to be seen.
I tried to change the form field type from "textfield" to "markup", so it will just be seen, but this made a problem - it seems that the markup is not passed to the form_values, therefore in uc_cart_update_item_object() I get empty qty, which cause the removal of the item from the cart...

Using "hidden" or "value" works fine, but then it is not shown, which is not what I want.

Looking in uc_hotel's code it seems they use markup and it somehow works for them.

Any idea for a simple solution ?

Regards,
Shushu

esbon's picture
Offline
Joined: 09/28/2010
Juice: 12
Re: hook_cart_display read-only qty

Hi, did you ever find a solution for your problem? I have similar need.