Drupal Commerce Blog

What's happening in the world of Drupal Commerce.

Beta release for Commerce Discount 7.x-1.0

Commerce Discount improves Commerce 1.x by providing a custom entity type for managing Product and Order level discounts, including more complicated discounts like free shipping upgrades and BOGO offers. The module makes it easier for merchants to create promotions that would otherwise require the use of the Rules UI or even custom code, tasks that are similarly beyond the reach of most casual Drupal users.

Even as we've worked to improve the user experience even further in Commerce 2.x by making Promotions a core module, we continue to work to do to improve the experience for 1.x users. Today, after a month of focused contrib time at Commerce Guys team and review from end users like Thomas Jonas at the University of Minnesota, we're proud to announce the release of a long overdue beta version for the module.

Discounts overview table
The new default discounts overview table (click to enlarge).

The biggest improvements in the beta release since the last tagged alpha release are performance improvements and fixes to the discount compatibility system. The performance improvements came primarily in the form of making better use of caches, depending less on slower parts of the Entity API, and preventing the unnecessary deletion / recreation of discount line items during price calculation.

Discount compatibility saw the most comprehensive bug fixes and user interface improvements. Introduced during the alpha phase, the feature allows merchants to identify when discounts can be "stacked" ... for example, saying a 10% off coupon is compatible with free shipping but not a clearance sale. Unfortunately, the initial process resulted in inconsistent compatibility performance, so the feature has not been usable thus far.

Discount compatibility settings
Discount compatibility settings form.

With the beta release, discount compatibility is fully functioning thanks to some real heavy lifting from András Cz?vek, and I've updated the user interface to accommodate it. The discount overview table now groups enabled discounts above disabled discounts, sorts them by their order of application to a product line item or order, and only shows discounts of one type at a time. The last change reflects the fact that discount compatibility only works within a single type (i.e. Product discount compatibility is only checked against other Product discounts on the same line item).

For more information on how the system works, read the discount compatibility documentation. You can also review a complete list of changes in the project's release notes.

Ryan Szrama
Posted: Oct 25, 2017
骚虎视频_骚虎app