Multi-buy

Contrib type: 
Module
Status: 
Complete and working
Moderation: 
Awaiting moderation

Downloads

Latest version: 
6.x-2.3
Compatibility: 
Ubercart 1.x
Compatibility: 
Ubercart 2.x

Provides two catalog display types that allow buying multiple items with one click. The catalog display types look the same as the default list table and grid formats, but without the add to cart buttons for individual products and with a button at the bottom of the catalog page instead. When the button is pressed all products with positive quantity field values will be added to the cart.
There are several things to note:

  • This module requires this patch to work.
  • It adds a quantity field for each product (just in the multi-buy catalog pages) regardless of whether it's usually a hidden default value).
  • All quantity fields in the multi-buy catalog pages are set to 0 regardless of default quantities set for the products.
  • The multi-buy list table and multi-buy grid formats use all the corresponding settings for the default list table and grid formats.
  • It works with attributes (uc_extra_column for table list for 5.x-1.x?).
  • Attribute option select fields that are required are set to their default option rather than the normal "Please select" option. This is so that standard Drupal form validation doesn't balk when an option isn't selected on products where the quantity is set to 0 (ie the customer doesn't want to purchase the product but the form validation requires an option be selected for it's required attribute(s)). It's not an elegant solution but there were time constraints... For this reason it's recommended to not have "required" attributes (the user still has to select an option anyway, and in this context it produces more sensible possible form values).
  • It supports uc_donation products.
  • Make sure that the "Add to cart" product field is enabled at admin/store/settings/products/edit/fields , and that the "Add to cart form" option is enabled at admin/store/settings/catalog/edit/grid !

Changelog:
5.x-1.0 2008-05-23
- initial release
5.x-1.1 2008-09-03
- added option to display product teaser (multi-buy grid view only)
- removed incorrect functions from uc_multibuy.install (TR: www.ubercart.org/contrib/4937#comment-21995)
5.x-1.2 2008-11-14
- minor styling modification: http://www.ubercart.org/contrib/7395
5.x-1.3 2009-02-17
- added even/odd class to table rows
5.x-1.4 2009-02-18
- added even/odd class to table columns (td)

6.x-2.0 2009-03-04 funded by data-scribe (www.datascribe.biz)
- Initial 6.x release
- Added support for uc_donation
6.x-2.1 2009-03-26
- Fixed compatibility with changes in uc_donation
6.x-2.2 2009-06-09
- Fixed compatibility issue with ubercart 6.x-2.x-rc3.
6.x-2.3 2010-01-11
- Upgraded to work with Ubercart 6.x-2.2
- Fixed some silly edge cases (eg required attributes with checkboxes widget)


PreviewAttachmentSize
uc_multibuy-5.x-1.4.tar.gz9.63 KB
uc_multibuy-6.x-2.2.tar.gz (for Ubercart 6.x-2.0 and 6.x-2.1)9.47 KB
uc_multibuy-6.x-2.3.tar.gz (for Ubercart 6.x-2.2)10.35 KB
TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3467
Re: Multi-buy

The uc_multibuy.install file should be deleted from the tarball - it contains routesearch_install() and routesearch_uninstall(), which aren't part of this module.

<tr>.
Dubs's picture
Offline
Joined: 11/20/2007
Juice: 79
Hi there, Firstly thanks for

Hi there,

Firstly thanks for a great module - invaluable for what I'm doing.

With the release of Ubercart 5.x-1.3, your module doesn't work anymore, even when reapplying the patch.

In the new version of Ubercart, the Catalog display type is missing, and a "View Grid" checkbox has been introduced.

If you get round to adapting your module, that would be great!

Thanks...

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Hi Dubs, I've got it working

Hi Dubs,

I've got it working on 1.3, but I think I manually applied the patch (because I'm using several other patches as well). There are instructions for manually applying patches on drupal.org. If you patch it successfully (on clean uc_catalog.module v1.3 code) could you generate and post an updated patch here? Smiling

Dubs's picture
Offline
Joined: 11/20/2007
Juice: 79
Patch

Hi Oliver,

I've got it working too - I did not apply the patch correctly last time (using GNU32 tools) but it's fine now!

Thanks again, and here is the uc_catalog file for 1.3.

Dubs

AttachmentSize
patched uc_catalog for uc 5.x.1.3.zip 12.01 KB
karimmaguid's picture
Offline
Joined: 09/05/2008
Juice: 8
Hey, Great module. Works

Hey,

Great module. Works great with the patch. I was wondering is there anyway to make the quantity field into a checkbox (so customers can only purchase one of each product)?

janemmm's picture
Offline
Joined: 03/19/2009
Juice: 7
This module is fabulous--Just what I needed

But of course fabulous is not *quite* good enough . . I've spent half a day trying to rearrange the elements in the tapir table . . How would I output my table as:

[quantity=0] [weight] [sell_price] [title] ?

Many thanks for this heretofore-only-dreamed-of functionality.

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Quantity as checkbox

#5: Providing an option to make the quantity field into a checkbox is a great idea and would be fairly easy to implement. However I'm pressed for time so can't afford to do this unless someone wants to fund it!

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Re: This module is fabulous--Just what I needed

#6: Is [quantity=0] [weight] [sell_price] [title] the order you'd like columns to appear in a multibuy table layout?

Update: And are you using 5.x or 6.x?

GreyHawk's picture
Offline
Joined: 03/17/2009
Juice: 174
e-geek -- great module. Had some support(?) questions...

I don't know if I'm simply kludging a solution or not, but put in a support request here.

Your module has already resolved several issues, particularly when combined with complicated requirements and a mix of product attributes, so thank you. Smiling

janemmm's picture
Offline
Joined: 03/19/2009
Juice: 7
Re: Re: This module is fabulous--Just what I needed

#6: Is [quantity=0] [weight] [sell_price] [title] the order you'd like columns to appear in a multibuy table layout?

I'm using D6 with UC2. I sell soap. I want my users to see:

col1 | col2 | col3 | col4
[ 0] 4 oz. bars, $5.95 each. Product Name
[ 0] 4 oz. bars, $5.95 each. Product Name
[ 0] 5 oz. bars, $6.95 each. Product Name
--------------------

[ADD ALL TO ORDER]

melanie_me's picture
Offline
Joined: 03/29/2009
Juice: 109
Re: Multi-buy

Is there any documentation for this contrib? A user guide?

melanie_me's picture
Offline
Joined: 03/29/2009
Juice: 109
A couple questions about multi-buy...

Great contribution! Seriously-this is a life saver!! (And in this economy, proving to be a job-saver as well!)

I have a couple quick questions:

1. I've created a donation product via uc_donation, but I haven't been able to figure out how to add the donation product to the multi-buy display. In the donation content type, there isn't an option for choosing a catalog. Any ideas?

2. I don't need the product title to link back to it's node - how would I go about disabling the link?

Thanks for the help!!

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Re: A couple questions about multi-buy...

Hi Melanie,

I don't remember having any trouble getting donation products to display in the catalog, I don't remember but it might be necessary to manually add the donation content type to the list of content types the catalog vocabulary can use.

I don't think there's an option to make the title not a link, wouldn't take much to make this an option but I don't have time to look at it now unless someone wants to pay me I'm afraid as I'm very busy with other work (paid, university, NFP stuff, children, etc!)

[In reply to a PM asking about teasers not working]: Regarding product teasers, it's been so long since I looked at that that I can't remember how it works, but I seem to remember it might have been a bit of a fudge to get it to work with a custom teaser cck field rather than the one generated by Drupal. Are you using Drupal 5 or 6?

Glad to hear this module is so useful to you! Donations welcome Eye-wink

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Compatibility fix for UC-6.x-2.x-rc3

The new version, 6.x-2.2, fixes a compatibility issue with UC-6.x-2.x-rc3. This updates multi-buy to work with the modified theme_uc_product_price method in rc3 and resolves the error message about invalid operands on line 85 of uc_price.inc when viewing "multi-buy list format" catalogue pages.

bibeksahu's picture
Offline
Joined: 06/09/2009
Juice: 76
Patch to Multi-Buy -- 3-part

This patch does three things:

  • Fix "call-by-reference deprecated" warnings,
  • adds a default quantity box, and
  • adds a checkbox for "view cart after add".

The changes are provided as individual patches in the Issue Tracker. The patch attached here is for convenience sake, putting all three together.

AttachmentSize
uc_multibuy_2_2_threepart_patch.diff 2.9 KB
webbyworker's picture
Offline
Joined: 02/19/2009
Juice: 6
Patch to remove required attribute and amount

Here's a patch from our team member, Aaron Wolfe.

The patch removes the required setting for attributes (in our case, the description) and amount only on the multibuy form. It checks to make sure that both values exist for an item if either value does. This allows these values to remain required in other places like checkout and cart update where they are necessary.

Thanks,
LJ

AttachmentSize
multibuy6.x-2.2_VMI.patch 2.2 KB
garethsprice's picture
Offline
Joined: 08/21/2009
Juice: 2
Changes required to work with Ubercart 2.0-rc6

On line 276, the call to uc_attribute_form_alter must be changed to reference uc_attribute_uc_form_alter

mkrapf's picture
Offline
Joined: 04/13/2009
Juice: 34
ubercart-6.x-2.0

garethsprice - Just wanted to clarify how you got this to work with ubercart-6.x-2.0...

I am assuming that you are using

ubercart-6.x-2.0
current version of Multi-buy
old patch to for new uc_catalog files

I tried this and it isn't working for me. The patch didn't seem to work for the new version of ubercart.

I would appreciate any advice.

Thanks

ckopack's picture
Offline
Joined: 08/27/2009
Juice: 7
Unsure what I need to do to get this working.

First I must say that this is a great tool for shopping carts. Especially for wholesale, so thank you in advance to anyone who is contributing to this.

I opened /module/ubercart/uc_catalog/uc_catalog.module

I copy and pasted the code on the patch section into this file and saved it.

I also installed uc_multibuy into my modules folder then enabled it in my modules. Everything has green and says Multi-buy is apparently on.

I navigate to /admin/store/settings/catalog/edit/multibuy and make sure that everything is checked.

However I'm not really sure where the fields are supposed to show up. I'm assuming they normally are part of the attributes side of things but I'm not seeing them. Any help would be appreciated enormously.

brandonratz's picture
Offline
Joined: 03/18/2009
Juice: 21
Update Multi-Buy for Ubercart 2.0

I've spoken with Oliver who created this module. He can get it updated for Ubercart 2.0 for a fee of 260AU. Anyone want to take up a collection to help pay for it? Message me if so, I can pay for a majority.

mkrapf's picture
Offline
Joined: 04/13/2009
Juice: 34
How much is that in US $'s?

Any takers yet on the contributions? I will donate a bit.

GearedDesign's picture
Offline
Joined: 10/18/2009
Juice: 33
Rounded to nearest USD ($)

$237 (I think)

http://www.x-rates.com/calculator.html

I will contribute.

brandonratz's picture
Offline
Joined: 03/18/2009
Juice: 21
Multi-Buy Contributions

I have private messaged the two posters above. I will collect all I can and then send to Oliver. He said he could have it done in within 2 weeks.

GearedDesign's picture
Offline
Joined: 10/18/2009
Juice: 33
Still unsure if it will work with the UC Node checkout

I have been looking to see if it will work with UC Node Checkout and I don't think it will. So, it will not work for my current use-case. Sorry but I can't fund currently.

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

Is there any update on this? I've tried installing multibuy 6x2.2 with Ubercart 6x2.2 and patching. It's half working. My multibuy product grid doesn't include all the information it should (no quantity, no product teasers).

brandonratz's picture
Offline
Joined: 03/18/2009
Juice: 21
Re: Re: Multi-buy

Multi-Buy appears to be broken in all Ubercart versions above 2 rc3. Oliver would upgrade it but I couldn't afford it without more contribution help.

GreyHawk's picture
Offline
Joined: 03/17/2009
Juice: 174
I would contribute, but can't until the project I'm

working on is complete...and this year, it's something that could benefit from some multi-buy parts, but Multi-Buy alone won't work for the client.

...tho...maybe I can contact Oliver and see if he can help; I ~can~ pay a bounty on my current project, and that may provide folks with something they could use too...etc. etc.

I'll ping Oliver; hopefully, this'll all cascade together nicely into a symphonic harmony (vs. a cacophony of insanity). Smiling

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

Thanks for your replies. Great, let's hope we get somewhere with this, the module would be really useful for me. I already sent a message to Oliver, before you guys replied, to ask what the status was, whether he could work on it and how much he'd ask for. Happy to contribute btw.

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Upgrading to 6.x-2.2

Hi all,

I'm glad so many people have found this module so useful (would be nice if something like this makes it into core).

I've offered to upgrade MultiBuy to work with the latest version of Ubercart (now 6.x-2.2) for a fee (as I'm no longer using it and I'm very busy with other paid and volunteer work). My hourly rate is AU$90, I estimate the job would take no more than 4 hours at most and more likely 2 hours. I can offer a fixed price of AU$270 (3 hours) or charge for the number of hours it takes with a limit at 4 hours. I'd ask for 50% upfront before beginning work. I accept payment through PayPal, or if you happen to live in Australia then I accept direct bank deposit.

Cheers,
Oliver

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

OK, I can donate 150 USD towards this. Can others make up the rest?
Also Oliver, how quickly would you be able to get it done?

brandonratz's picture
Offline
Joined: 03/18/2009
Juice: 21
Re: Re: Multi-buy

I can give $50 USD. AU$270 is ~$240 USD for those who need to know.

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

Can anyone make up the remaining 40 USD?
Oliver, assuming we get the money together, when would you be able to work on this?

calbasi's picture
Offline
Joined: 03/01/2009
Juice: 107
Re: Re: Multi-buy

I could donate 40$ but I need know if it feets my needs... I've performed my product list with Views (because then I can show other fields like weigth, taxonomy terms, stock level, etc.). In other words, I don't use the official catalog module, and I don't know if this module is only a patch of it or it is suitable for Views editing...

Regards

AttachmentSize
Captura.png 32.7 KB

---
calbasi.net
If you can not understand me, it's my poor English skills fault Sticking out tongue

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

calbasi, I don't think the module integrates with views, though that would be nice Smiling
Exactly which fields do you need to be able to add to your form?

calbasi's picture
Offline
Joined: 03/01/2009
Juice: 107
Re: Re: Multi-buy

I don't know for sure. At he moment, stock level and weight (and probably I'll try to put there a price/kg). But I like Views way to make my catalog because I can always edit the "view", and uc_catalog module (and this, I think) are "not configurable" modules... I don't like it (or, better, it don't feet my needs Eye-wink ).

A multibuy module is a pretty addon, and maybe I could "forget" to include stock level, but weight is necessary for me... And for this reason I had thought to get the "fast way" through AJAX cart and not through multibuy module... But I'm still working on it Sticking out tongue

Regards,

Joan

---
calbasi.net
If you can not understand me, it's my poor English skills fault Sticking out tongue

webbyworker's picture
Offline
Joined: 02/19/2009
Juice: 6
Remaining $40 on us

We could do the remaining $40. Oliver originally did a lot of this work for one of our projects. It's time for an upgrade, so we'll need the patch soon. Smiling

Thanks,
Leila

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

Good! I've send a message to Oliver to ask when he'll have time to work on it.

MadOverlord's picture
Offline
Joined: 10/10/2009
Juice: 129
Will contribute

Haven't tried the older version of multibuy (just getting my first drupal site online) but this kind of thing would be damned handy for my site.

What would make it really perfect would be views integration, because then we'd be able to do things like bring up "may we suggest..." related products multibuy forms.

Right now I could see a way to do it using a grievous views hack -- 3 views; the first sets up the form but doesn't close it, the second mungs the fields to be bare amount textfields or checkboxes, and the third closes the form. But much better would be a views module that does the encapsulation and also provides the textfield/checkbox field type.

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Views and time

Hi all,

Yes, I've always wished Ubercart had used views to present their catalog in the first place! The multibuy module doesn't have Views integration. I haven't developed much for Views (only little hacks here and there), but I think the way it would be done with Views 2 (for regular or multibuy type catalog pages) would be to create a Views style. Which I definitely don't have time for right now. Smiling

I can begin work on the update some time in the next couple of days and have it done by Monday 11th Jan if half the payment is deposited into my paypal account (oliver@e-geek.com.au) in the next couple of days. Assuming we're going with the fixed AU$270 price this is AU$135.

Thanks,
Oliver

brandonratz's picture
Offline
Joined: 03/18/2009
Juice: 21
Re: Multi-buy

I will send Oliver my $50 once everyone else can confirm they are sending. This is going to be a mess if a bunch of us send him money, but hopefully we can get it organized.

MadOverlord's picture
Offline
Joined: 10/10/2009
Juice: 129
Re: Re: Multi-buy

I hadn't put myself down for a definite amount, but just sent him US$25.00

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

I've sent $AU115 to Oliver. So we've now paid just over 50% of overall fee (25 USD is 27 AUD).

brandonratz's picture
Offline
Joined: 03/18/2009
Juice: 21
Re: Re: Multi-buy

Ok Great! I will wait to send my $50 USD until its finished then.

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Getting started on upgrade

Hi all,
Thanks very much for your contributions, will get started on it and hopefully finish it today!
Cheers,
Oliver

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Re: Re: Re: Multi-buy

Thanks for the contribution. Smiling Not sure what happened but it's reported as US$23.85 in my paypal account, which is just over AU$25. Is that what it says on your end?

MadOverlord's picture
Offline
Joined: 10/10/2009
Juice: 129
Re: Re: Re: Re: Multi-buy

If it is my contribution you are talking about, I sent you US$25.

You probably received less because of PayPal fees, currency conversions etc.

R

liquidkrep's picture
Offline
Joined: 01/06/2010
Juice: 8
setting up multi-buy

I'm having a lot of issues setting up the multi-buy module in drupal 5 with ubercart 1.x. But I'm willing to pay anyone that can help as soon as possible, preferably in the next couple of hours. I'm in the US,(Arizona) so if anyone can help me out, just PM today and I can pay you today.

oliver coleman's picture
Offline
Bug Finder
Joined: 01/09/2008
Juice: 212
Ding, 6.x-2.3 for UC 6.x-2.2 is ready

Hi all,

Please find attached version 6.x-2.3 for UC 6.x-2.2.

The patch at http://www.ubercart.org/issue/4936/a_hook_catalog_renderers#comment-48652 is also updated for UC 6.x-2.2, there are no functional changes to it so if you've already applied it manually then it should be fine.

Of course, let me know if there are any issues.

Thanks again to all those who have chipped in or are chipping in for this upgrade!
Oliver

MadOverlord's picture
Offline
Joined: 10/10/2009
Juice: 129
Oliver, It would be

Oliver,

It would be extremely helpful if you could take the time to document exactly how multi-buy should be configured, and what the options do.

It took me 30 of random flailing (for example) to determine that you needed to enable the buy-it-now *button* in catalog settings to get the quantity fields to appear.

Also, there appears to be a bug with the multi-buy list table option. I got everything working on grid view, then switched to list view -- It just displays a list of the products, with no quantity fields.

freatida's picture
Offline
Joined: 10/20/2009
Juice: 108
Re: Multi-buy

I'm just getting a list of products for the list table display too. It's the same problem I was having before Oliver's update, I thought it was due to version incompatibility, but the problem is still there.