It should be great to allow setting 0 the line item quantity in some cases. It has no sense for 'add to cart form', but it does for 'cart form', in order to remove that line item.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grisendo’s picture

Status: Active » Needs review
FileSize
6.21 KB

I attach a patch. You can configure if you want this behavior or not (no by default) at admin/commerce/config/commerce_extra

Jerenus’s picture

Checking patch modules/quantity/commerce_extra_quantity.install...
Checking patch modules/quantity/commerce_extra_quantity.js...
Checking patch modules/quantity/commerce_extra_quantity.module...
Hunk #4 succeeded at 76 (offset 1 line).
Hunk #5 succeeded at 132 (offset 2 lines).
Hunk #6 succeeded at 146 (offset 2 lines).
Applied patch modules/quantity/commerce_extra_quantity.install cleanly.
Applied patch modules/quantity/commerce_extra_quantity.js cleanly.
Applied patch modules/quantity/commerce_extra_quantity.module cleanly.

Jerenus’s picture

Status: Needs review » Fixed

Committed manually. Thanks.

  • Jerenus committed 6cda2f6 on 7.x-1.x
    Issue #2506747 by grisendo, Jerenus: Allow zero in...
Jerenus’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.