Back to Top

User guide for Laravel eCommerce Group Buy

Laravel Group Buy for Bagisto lets a store sell the same product at a lower price when several customers buy it together.

Bagisto Group Buy module guide: create group deals, set discounted pricing and group size, then qualify or disqualify each group from the admin panel.

Note: Only a signed-in customer can start or join a group. So a guest who opens the product page sees a prompt to log in first.

Note: A group buy cart holds one product only. So if a customer starts or joins a group with other items in the cart, the module removes those items.

Requirements

  1. Bagisto: v2.5.0
  2. PHP: 8.4 or later
  3. Database: MySQL, MariaDB or PostgreSQL

Features

  • Any catalogue product: turn an existing product into a group buy offer without changing its product type.
  • Discounted pricing: set the group buy price alongside the start and end date and time.
  • Group size and quantity limits: decide how many members a group needs, plus the minimum and maximum units one member may order.
  • Per-customer group limit: restrict how many groups a single customer may start, per channel.
  • No overlapping deals: a second offer on the same product must run in a different window.
  • Product type coverage: works with simple, virtual and configurable products, where a deal can run on an individual variant.
  • Storefront widget: shows the offer, the open groups, each group’s progress towards its size, and when the offer expires.
  • Listing badges: product listings mark the items that carry a live group buy offer.
  • Customer account view: customers follow the groups they belong to, with each group’s status and progress.
  • Admin listings: offers, groups and group members each appear in a searchable, sortable and filterable grid.
  • Group lifecycle: statuses of Processing, Qualified, Disqualified and Refunded, set by the admin.
  • Fulfilment hold: optionally block invoices and shipments for an order until its group qualifies.
  • Configuration and access: per-channel settings, granular ACL for every admin action, and translations for all 22 locales Bagisto ships.
  • Database support: runs on MySQL, MariaDB and PostgreSQL, with or without a table prefix.

Installation

Bagisto Version: v2.5.0

Step 1: Extract Package

First, unzip the extension package and merge the packages folder into your project root.

Step 2: Register Service Provider

Next, go to the bootstrap/providers.php file and add the following line under Provider.

Webkul\GroupBuy\Providers\GroupBuyServiceProvider::class,

Step 3: Update the composer.json File

Then open the composer.json file and add the following line under the psr-4 section.

"Webkul\\GroupBuy\\": "packages/Webkul/GroupBuy/src"

Finally, run the commands below to complete the setup.

composer dump-autoload
php artisan group-buy:install

Step-by-Step: Installing the Module

  1. Unzip the package and copy packages/Webkul/GroupBuy into your project root.
  2. Open bootstrap/providers.php and add GroupBuyServiceProvider::class to the returned array.
  3. Open composer.json and add the Webkul\GroupBuy\ namespace under autoload.psr-4.
  4. Run composer dump-autoload from the project root.
  5. Run php artisan group-buy:install, which applies the migrations, publishes the assets and clears the cache.
  6. Reload the admin panel and confirm that Group Buy now appears in the sidebar.

Laravel Group Buy Configuration in Bagisto

Navigate to: Configure>Group Buy>Settings

Bagisto Group Buy module configuration settings in the admin panel

Configure the following settings.

Status: Enable or disable the Group Buy extension.

Group Count: The most groups a single customer may start.

Group Buy works text?: The text on the product page that tells the customer how a group works, up to 250 characters.

Create Invoice for Incomplete Group: Allows an invoice before the group qualifies. Leave it off to hold invoices and shipments until the admin marks the group Qualified.

Note: While the extension stays disabled, the Group Buy admin pages return a 404, and the product page shows no group buy widget.

Step-by-Step: Configuring Group Buy

  1. Log in to the admin panel and open Configure from the sidebar.
  2. Select Group Buy, then open the Settings group.
  3. Turn Status on to enable the extension for the current channel.
  4. Enter a value in Group Count to cap how many groups one customer may start.
  5. Write the customer-facing explanation in Group Buy works text?, keeping it under 250 characters.
  6. Decide whether to allow invoices for incomplete groups, then click Save Configuration.

Creating a Laravel Group Buy Deal

Navigate to: Group Buy>Products>Create Product

Creating a Bagisto Group Buy deal with price, dates and group size in the admin panel

Configure the following fields.

Search Product: Type the name of the catalogue product, then pick it from the results. A configurable product lets the deal run on one variant.

Product Name: The module fills this in from the product you selected.

Group Buy Price: The discounted price a member of a qualified group pays.

Start Date And Time: When the offer becomes available on the product page.

End Date And Time: When the offer expires.

Minimum Quantity: The fewest units a single member may order.

Maximum Quantity: The most units a single member may order.

Group Size: How many members a group needs before it fills.

Visible In Menu: Enable or disable this offer without deleting it.

Note: Two offers on one product cannot overlap. So saving a deal with overlapping dates returns a warning that the group buy product already exists.

The Group Buy Products grid lists every offer with its product name, dates, group size and status. It also supports editing, deleting and mass deletion.

Bagisto Group Buy Products listing showing every group buy deal in the admin panel

Step-by-Step: Creating a Deal

  1. Open Group Buy>Products from the admin sidebar.
  2. Click Create Product to open the deal form.
  3. Type a product name in Search Product, then click Select on the matching row.
  4. Enter the Group Buy Price that members of a qualified group will pay.
  5. Set Start Date And Time and End Date And Time for the offer window.
  6. Fill in Minimum Quantity, Maximum Quantity and Group Size.
  7. Turn Visible In Menu on, then click Save.

Laravel Group Buy on the Storefront

Once the offer runs and a signed-in customer opens the product, the group buy widget appears beside the usual purchase button.

Laravel Group Buy widget on the product page showing the discounted price and create group button

The widget presents the following.

  • The group buy price, together with the Buy button that starts a new group.
  • Existing Groups List, where each open group shows its author, its progress towards the group size, and a join button.
  • Group Expires In, which counts down to the end of the offer.
  • The works text from the configuration, under a How group buy works? heading.
  • A Group Full marker on any group that already reached its size.

Product listings also mark the items that carry a live offer, so customers spot them without opening each product.

Note: Outside the configured window the widget disappears. So the product behaves like any other, with its normal price and Add To Cart button.

Starting or Joining a Group

A customer either starts a group or joins one that is already open. The module records a starter as the group’s author, and a joiner as a member.

Either way, the group buy price applies to the cart line at once. Then the customer checks out as usual, including with a coupon or cart rule that fits the product.

Stock rules still apply. For example, asking for more units than the inventory holds returns the standard message that the quantity is not available.

Note: A full group accepts no more members. Likewise, a customer who already started as many groups as Group Count allows cannot start another.

Step-by-Step: Starting a Group

  1. Sign in to the storefront as a customer, because a guest cannot join a group.
  2. Open a product that carries a live group buy offer.
  3. Read the How group buy works? panel under the offer.
  4. Click Buy – {price} Price & Create Group to start a group, or pick a group from Existing Groups List and join it.
  5. Review the cart, which now holds only that product at the group buy price.
  6. Complete the checkout to confirm your place in the group.

Managing Groups

Navigate to: Group Buy>Groups

This grid shows each group’s name, product, dates, group size and status. Then the admin opens a group to review it and set its status.

Processing: The default state while the group still fills.

Qualified: The group met its conditions, so its orders can move to invoice and shipment.

Disqualified: The group did not meet its conditions.

Refunded: The store refunded the group’s members.

Each group also lists its members. The member grid shows the customer name, the linked order, the order status, the join date, and which member authored the group.

Step-by-Step: Qualifying a Group

  1. Open Group Buy>Groups from the admin sidebar.
  2. Find the group you want to review, then click its edit action.
  3. Check the member list to see how many customers joined and who authored the group.
  4. Set the status to Qualified once the group met its conditions.
  5. Choose Disqualified or Refunded where the group failed or the store returned the money.
  6. Save the group, then invoice and ship the member orders as usual.

Invoices and Shipments

Where Create Invoice for Incomplete Group stays off, the module holds invoices and shipments for an order whose group has not reached Qualified.

This guard matters. Otherwise, a store could ship an order at the discounted price before the group that earned that price came together.

Once the admin marks the group Qualified, the order moves to invoice and shipment as usual.

Customer Account

Navigate to: My Account>Groups

Customers see every group they belong to, with the product, the group’s progress towards its size, and its status. So they can follow whether a group still fills or has qualified.

Laravel Group Buy Conclusion

Laravel Group Buy gives a Bagisto store a social reason to buy, because the discount arrives only when enough customers commit together.

Meanwhile, the admin keeps full control of the price, the window, the group size and the fulfilment hold.

For further reading on extending Bagisto, see the Bagisto developer documentation.

Support

So, that was much about the User Guide of Laravel Group Buy. For any queries or doubts reach out to us at [email protected].

You can also raise a ticket at our HelpDesk System.

Please explore our Laravel Development Services and Quality Bagisto Extensions.

Supported Framework Version – v2.5.x

Current Product Version - v2.5.0

Supported Framework Version - v2.5.0

Blog Version - v2.5.0
  • Version v2.5.0
  • Version v2.4.7
  • Version v2.4.10
  • Version v2.3.12
  • Version v2.2.3
  • Version v1.2.0
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home