I found cases where I want a product to stay in the cart and not be removable by the user. For instance, when Product A is added to the cart, I automatically add Product B (via Ubercart conditional actions). In order for Product A to get purchased, Product B must also get purchased. So, I don't want the user to be able to manually remove Product B.
I thought about creating a custom module, but this is basically restricting quantity from going below 1, because it restricts the user from removing the item from the cart. (Then, custom code, or Rules, or Conditional Actions can be used to remove it, if needed, such as when Product A gets removed from the cart).
I'm submitting patches which add a "Is this product removable?" checkbox to the product feature form (see attached screenshot). If unchecked, then the "remove" checkbox on the cart form will not appear.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_restrict_qty.module.patch | 3.55 KB | joelstein | |
| uc_restrict_qty.install.patch | 919 bytes | joelstein | |
| screenshot.png | 28.72 KB | joelstein |
Comments
Comment #1
raulmuroc commentedClosed due to lack of activity.