Intended to make bulk discounts and surcharges that display between the Subtotal and Total easier to apply, the Commerce Bulk Discount module provides a way to add custom price components to orders without using PHP. Once an order bulk discount price component has been created, it can be implemented by creating a Rule triggered by the 'After updating an existing commerce order' event. Logic can be applied via Rules conditions and the bulk discount amount calculated via a Rules action. The calculated amount can be passed into the provided 'Apply bulk discount to order' Rules action which displays the custom discount or surcharge between the order Subtotal and Total fields. See the screencast link below for a demonstration of how to use it.

Commerce Bulk Discount Demo

Sandbox project link

Link to Git repository

Comments

Status:Needs review» Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxcreativepragmatic2067...

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Status:Needs work» Needs review

The following errors are caused by overridden contributed Entity module class EntityDefaultUIController method "hook_menu" not being in lowerCamel format:

  • Public method name "CommerceBulkDiscountUIController::hook_menu" is not in lowerCamel format, it must not contain underscores
  • Public method name "CommerceBulkDiscountTypeUIController::hook_menu" is not in lowerCamel format, it must not contain underscores

Hi,

Add [D7] in issue title, see https://drupal.org/node/1011698.

Title:Commerce Bulk Discount[D7] Commerce Bulk Discount

Cleaning up project application titles.

Status:Needs review» Needs work

Great job. Thank's for a nice video.
Awesome module and great functionality addition for Commerce Discount mechanism.

We have found only one thing, there are was hardcoded language. You should use #language key of commerce_unit_price field if it is possible.

<?php
function commerce_bulk_discount_line_item_title($line_item) {
 
// Extract machine name of bulk discount (or surcharge) from order bulk
  // discount (or surcharge) line item.
 
$machine_name = $line_item->commerce_unit_price[LANGUAGE_NONE][0]['data']['components'][0]['name'];
?>

Kind regards

Status:Needs work» Needs review

I have made the recommended changes. Thank you for your help!

Best regards,

Orville

Status:Needs review» Fixed

I can confirm that the requested revision was made at line 130 of comment_bulk_discount.module. Revised code is:

$machine_name = $line_item->commerce_unit_price[$language][0]['data']['com ponents'][0]['name'];

Status:Fixed» Needs review

"Fixed" means the application was approved - see https://drupal.org/node/532400. This should stay in "needs review" until someone reviews it.

PAReview: Individual user account
It seems you are using a non-individual account.
All user accounts are for individuals. Accounts created for more than one user or those using anonymous mail services will be blocked when discovered (see Get a Drupal.org account).

Can you confirm that the creativepragmatic account is a single user? Please change your account information and enter your realname.

If you prefer, we can also promote this sandbox to a full project without granting you "git vetted user" status.

I am and always have been the sole user of this account. For privacy/security reasons, I am not comfortable leaving my real name anywhere on the web. I am willing to verify my identity if there is a more private way of doing so.

I think that's good enough, thanks!

Status:Needs review» Reviewed & tested by the community

Followed the issues, took a look at the code, looks like this was just in need of a status change.

Great work, thank you!

Status:Reviewed & tested by the community» Needs work
  • It's ok to not use your realname, but you might want to change your git attribution settings. I've privately messaged you a link to where you real name shows up and how to fix it. Also, update the attribution in README.txt.
  • You don't need to require php = 5.x, Drupal 7 already requires 5.2.5.
  • Is commerce_bulk_discount_line_item_add_form_submit() necessary?
  • Can bulk_discount.admin.inc and bulk_discount_type.admin.inc be renamed with commerce_* at the front? That would keep the namespace consistent.

This looks ready to me, just setting to needs work for those questions.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status:Needs work» Needs review

I have implemented all of your question suggestions. Thanks again for your guidance!

Status:Needs review» Reviewed & tested by the community

Thanks for those updates, looks good to me.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status:Reviewed & tested by the community» Fixed

It's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.

Thanks for your contribution, creativepragmatic!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Thanks to kscheirer and all of the other reviewers for your help!

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.