Active
Project:
Ubercart Sub-Product
Version:
6.x-1.0-rc1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2010 at 14:13 UTC
Updated:
27 Oct 2010 at 19:59 UTC
As well as allowing users to add individual products to their cart, with this module can you also have an 'add all to cart' button so it also works like a product kit?
Thanks
Comments
Comment #1
larowlanWhen the user clicks any of the cart buttons (on any row) any products with a quantity other than zero (regardless of the button clicked) are added to the cart.
There is another issue in the uc_subproduct queue that includes code to theme the table with one button so it is clear that all products are added when the button is pressed.
Comment #2
jdln commentedHi larowlan
Is it possible to have the default quantity as 1 not 0?
Comment #3
larowlanYou need an implementation of hook_form_alter to do this.
So either create a custom module or add it to an existing custom one.
If you need help building a module, you can use the module_builder module (http://drupal.org/project/module_builder) to get you started.
Just add this code, replacing MYMODULE with the machine name of your module.
Comment #4
jdln commentedWorks great. Thanks
If anyone else is struggling with this pm me and ill send you the module files.
Comment #5
giacinlui80 commentedHi jdln
I'm a newbie to drupal and I have the same problem of having the quantity field with the value default to 1 but I can not even create modules. Please Could you kindly pass the custom module you created?
Thanks
Comment #6
jdln commentedHi giacinlui80
What are you struggling with? My recollections a little hazy but I think the module builder worked for me. Its not hard, ive never made a custom module before.