Support from Acquia helps fund testing for Drupal Acquia logo

Comments

toby53’s picture

+1 - We could use this too !

toby53’s picture

thanks ! - it works great with the Quantity option

ed.hollinghurst’s picture

Yeh this module looks great but I too would also love to see the checkbox option

no2e’s picture

Category: support » feature
franklca’s picture

+1

Check box with option to use the qty box in the view. Some instances may need qty, some may need check box, some may need both.

Steffan.Hernandez’s picture

This module most definitely needs check boxes with quantity fields!!!!

recrit’s picture

Status: Active » Needs review
FileSize
2.73 KB

the attached patch adds a new settings option to the views handler for "Only allow a quantity of 1 with a checkbox input"

pattison22’s picture

Does anyone have an idea of how the have the checkboxes remain checked after the add to cart button has been hit? Trying to prevent double orders incase the user fails to see the additions in the cart.

Much appreciated!

blueblot’s picture

is it possible to have radiobuttons in stead of checkboxes, limiting the options to 1 choice? In the attached patch you can select more than one checkbox.

thx
blueblot

hcderaad’s picture

Here is a rewritten version of the quantity handler (including a small change to the module), this version can:

- provide numeric and checkbox input elements
- check for stock on form element creation and form validation
- check for already registered cart line items on element creation and form validation
- add a label to the checkbox
- rewrite the checkbox to a disabled textfield (with the elements title) when no stock available
- product field to use as title/label field is configurable
- checking cart line items is configurable

Another note, i think the .info should include cart as a dependency:
dependencies[] = commerce_cart

I hope this might be helpful?

PS attachment extensions should be .inc

garrettc’s picture

I've created a patch from hcderaad's changes in #10.

funkeyrandy’s picture

this is great but is there a way to have both the checkboxes and qty? really need to be able to check an item that should be added to the cart, while ALSO specifying a custom qty in the field...this would really make this module much more useful

thanks!

Summit’s picture

Hi, Yes please for a version with quantity and checkbox in front of it, so using the checkbox to select the product and quantity to select the amount of the product!
Greetings, Martijn

adambinkowski’s picture

Issue summary: View changes

Is there a chance to add checkboxes to dev version? This patch seems to be not actual or i don't know how to use it

micnap’s picture

Rerolled patch from #11 for current version of module.

lauriemustafic’s picture

@micnap thanks for the patch, work perfectly for me.

blasthaus’s picture

In patch #15, looks like the intent was to remove the first line:

<?php

$is_quantity_form = TRUE; // remove this
if(!empty($field->has_rows)) {
  $is_quantity_form = TRUE;
}

?> 
jpamental’s picture

It appears that this won't apply against the latest release (fails at Hunk #5)

I'm going to see if I can manually piece it together but any help would be most welcome in figuring this out as I've lost the checkbox option now. @micnap - any ideas?

jpamental’s picture

Update: seems related to changes in the Stock module from what I can tell. I tried manually updating the .inc file (where Hunk #5 should apply) and ended up with an error message relating to the Commerce Stock module.