it is essential for a group-buying site to have the tipping-point groupbuying feature:

STORE will create the deal, the deal should include a time-period with starting and ending date, selling price, discounted price, discount percentage,minimum number of sells, max_num of sells, and a fee (as commission paid to the site that displays the deal)

users will purchase, they will receive the coupon code via email. And also the same email will notify that the deal is not yet fulfilled(it will be fulfilled only when the number of minimum purchases is met).

When minimum number_of_sells is met in given time, users will receive mails that the deal is fulfilled. Else the deal is CANCELED. and the my orders section should indicate the deal's status as either pending, fulfilled, or cancelled.

as for how to charge users for their purchases, here are two possible scenarioes:
users will be charged a small amount(exactly as the commission fee) when they make the purchase. If the deal is cancelled, this amount will be either refunded or transferred into credit points so that they can cash later during their next purchases. If the deal is live, users will be charged the exact amount as indicated in the deal, plus the commission fee(which has already been charged).


when users make their purchase, users will be charged for the money as advertaised in the deal,optionally plus the commission fee(or the commission fee can be left to be calculated in the backend in the admin section, between the store and the site owner). if the deal is cancelled, user will get a refund, optionally minus the commission fee.

either way, it involves two-step payment and should be quite complicated, however, it is an essential feature for a group buying for the commission fee, it might not be neccessary if the site chooses not to charge the store by commission per deal..

Members fund testing for the Drupal project. Drupal Association Learn more


yannisc’s picture

Martindave, I agree with the workflow you describe, however I think this functionality is something for each site owner to implement in accordance to his types of payment. I can't think of a way fits all solution. That is the reason that we have not implemented payment ways either.

It would be best if you or someone could propose a generic solution that would be easy to override by site owners.

farhadhf’s picture

The minimum number_of_sells should be set as a field and must be shown to the user on the deal page (maybe as a progress bar). I'll implement this field and post it here today!
Personally, If the deal is canceled, I need to save the amount payed by the users as their balance to be used future purchases in the website, and allow them to fill a request for refund whenever they want to. But I don't know how to do this... (maybe transfer the amount to userpoints and use a custom module that allows payments via userpoints when available?)

farhadhf’s picture

251.79 KB
2.22 KB

purchase progressbar module is attached.
It provides a field with 2 different formatters (one with ui.progressbar, the other with CSS3) that should be added to the product types containing commerce_sales. You set the minimum number_of_sells on the product and it shows the progress bar with a description on the deal node.
I've also attached an screenshot of the CSS3 progress bar shown on a deal. (node--deal.tpl.php needs to be edited so that it shows the progress bar)

What can we do about saving the payed amount as user balance/point in case of a canceled deal? I'm willing to develop this feature and post it here! But I don't know what's the best solution for implement this feature!


farhadhf’s picture

2.31 KB

Updated the progress bar module.

martindave’s picture

thanks farhadht, I too would like to contribute as you did . unfortunately I am a newbie to drupal, and drupal has been known for its steep learning curve. there are a lot of user_points related modules ..., and this one particular module(commerce userpoints) might be of some use to you:

farhadhf’s picture

Thank you martindave (and welcome to Drupal)!
I think we can use Userpoints Payment Provider. I'll test it tonight If I get home soon! :)

mxa055’s picture

Hi there farhadhf,

could you provide some more details on how the progress_bar module you contributed can be integrated with an existing installation?

farhadhf’s picture

Install the module and add a progress bar field to your product type, on each product instance, set "Minimum purchases needed" value.
In opendeals theme directory, open node--deal.tpl.php and find <div class="soldAmount">, replace the line with:

<div class="soldAmount"><span id="&quot;jDealSoldAmount&quot;"><?php print render($content['product:field_purchase_progress']) ?></span></div>

replace 'field_purchase_progress' with the machine name of the field you added to the product type.

mxa055’s picture

Thanks a lot farhadhf. Worked like a charm!

merchadmin’s picture

I would love to install this module, but I am having trouble with it.

I added a field to Product Types called field_purchase_progress, gave it a filetype of text. I added the change to deal.tpl.php but I do not see a progress bar. Instead, it just shows the value of what I put in the minimum purchases needed box.

Can you please advise further?

yannisc’s picture

Status: Active » Closed (fixed)