Install

Works with Drupal: 7.x

Using Composer to manage Drupal site dependencies

Downloads

Download commerce-7.x-1.4.tar.gztar.gz 354.77 KB
MD5: 18bf64b33ecb54e91d38a840f563a879
SHA-1: 381bd1277931f4e64d964c0d7803cb7b7545b690
SHA-256: 08feb83a5c8754bad9974198a8c035a6f1e90597e3ef9506e335fc5f424f1252
Download commerce-7.x-1.4.zipzip 482.08 KB
MD5: 5720bde4e68ef9239b074514b40e304a
SHA-1: bf09e882cb897389c037a1d2a09478bb2ba7ea37
SHA-256: d9dc9e03a2bc7adced7e46b00e38310261c963b0bab2a5bab8176019d36301c7

Release notes

Drupal Commerce now depends on Drupal >= 7.15.

Drupal Commerce 1.4 is a maintenance release incorporating 87 patches from 40 contributors around the world. These patches add a variety of new features to the core of Drupal Commerce and make it more performant and suited to international usage. The release notes summarize some of the main changes in the new version and includes a full changelog for the curious.

New features

The Add to Cart form and checkout form have both seen improvements. Most notable on the checkout form is the new setting to allow copying of fields from one customer profile to another. This feature was a part of the Commerce Shipping module but was moved to core and designed to work server side across multiple checkout pages and even between customer profile types that may have different fields. The Account information checkout pane was also updated to support e-mail address verification through double entry.

We included a variety of Views integration improvements, including adding a missing handler, updating area handlers for Views 3.5, supporting redirect destinations on our entity operation links, and adding a node filter to only show product display nodes.

Finally, we added a few features to make it simpler for site builders to build product pricing rules. Foremost among these is a new Price comparison condition that supports multi-currency price comparisons and accepts input in major currency unit decimal values instead of minor unit integer values (i.e. compare in Dollars or Euros instead of Cents). We also added a read only computed property allowing you to use the generic Data comparison condition against these major unit decimal values.

Performance

The primary performance improvements involve lowering Drupal Commerce's memory footprint. We reduced the number of times we build the full array of entity information and reduced the number of Rules loaded into memory during tax calculation.

Previously, the Cart module duplicated some queries during shopping cart order loading, so a small static cache was moved earlier in the cart loading process to stop them.

Finally, some operations (like creating a new product type or deleting a tax rate) require menu items to be rebuilt, but instead of doing so immediately (and potentially multiple times on a single page request), we are delaying the rebuild by using the 'menu_rebuild_needed' variable instead of directly calling menu_rebuild(). Contributed modules that followed Drupal Commerce's lead in directly calling menu_rebuild() should also be updated to use this variable instead.

Internationalization

With every new release, Drupal Commerce becomes better suited for use in more countries - thanks especially to the contributions of community members from these countries doing testing and providing valuable feedback. Drupal Commerce 1.4 includes currency format updates and RTL support in our CSS files. To improve product translation and management, plach contributed a fresh integration to the latest development in the Entity Translation module, and OnkelTem ensured the product language property is properly exposed to the Entity API and Rules.

Additionally, we found a need for 0% VAT rates to actually be applied and displayed in some instances, so the tax calculation code and inline documentation has been updated accordingly. Developers building sites requiring VAT should check out the Commerce European Union VAT module for additional assistance in getting taxes right.

Notable bug fixes

Two bug fixes deserve special mention for the amount of discussion they've generated. The first is a long standing incompatibility with the Display Suite module caused by the fact that both modules depend on hook_entity_info_alter(). Sites using Display Suite to add view modes to product display node types were not finding the related view modes in the product type settings, because Drupal Commerce's implementation of the hook was being invoked first. To fix this, we're taking advantage of Drupal 7's hook_module_implements_alter() to ensure that commerce_product_reference_entity_info_alter() will be called last when that hook is invoked to solve the incompatibility.

Additionally, we have implemented a fix to prevent the payment checkout pane from being submitted if there are errors elsewhere on the page. The checkout form was designed to validate and submit checkout pane forms independently, but there are cases where checkout pane submission should be dependent on the validation and submission of other panes on the form. As an immediate fix to the most pressing use case, we added a check to the payment checkout pane to prevent it from attempting payment if there are any form errors on the page. This will prevent duplicate payment attempts when the payment checkout pane is used on a single page checkout form.

Updating from previous versions

When updating to Drupal Commerce 1.4, remember to run update.php. There are a few schema updates that must be performed to accommodate a minor API change - entity IDs and revision IDs will default to NULL both in code and in the database.

Sites that have customized the checkout form through form alteration or theming may also need to accommodate a minor update to the way error messages are displayed. Instead of appearing above checkout panes, error messages related to the contents of a checkout pane will now be displayed inside the checkout pane's fieldset or container div.

Finally, as part of the update to our Entity Translation integration, Drupal Commerce 1.4 depends on Drupal >= 7.15. For reference, Drupal 7.16 was a security release, so sites have good reason to update Drupal core regardless.

Changes since 7.x-1.3 (87 commits):

  • #1518084 by jsacksick, bojanz: add a computed property to price fields called amount_decimal that allows comparisons against the currency specific decimal value for a price field amount; currently read only.
  • #1719454 by theo_, bojanz: allow the line item summary area handler to display in the no results area and simplify our empty text area handler code.
  • #1612502 by cvangysel, vasike: disable customer profile checkout panes when their related customer profile reference fields are deleted.
  • #1723826 by OnkelTem: expose the product language to Views if Locale is enabled.
  • #1495570 by plach: update the Entity Translation integration to work with the upcoming release.
  • #1665060 by John Pitcairn, vasike: filter empty tokens out of the checkout completion message.
  • #1783462 by vasike: add a rendered product display formatter for the product reference field.
  • #1791226 by joachim: use hook_field_widget_form_alter() to attach the VAT inclusive select list to price fields.
  • #1679408 by vasike: display checkout pane related error messages inside the checkout pane fieldset / container div instead of above it.
  • #1799638 by rszrama: show the HK$ symbol before a formatted price in HKD instead of putting the code after.
  • #1796528 by cvangysel: when rebasing the unit price of line items edited through the line item manager widget, use the base price component type from the existing components array instead of always defaulting to base_price.
  • #1637674 by andyg5000, cvangysel: add the option for address copying checkout panes to make copying the default behavior, requiring customers to uncheck a box to use a different address.
  • #1804518 by rszrama: add an update function for the revision_id column on the commerce_product table in conjunction with the previous commit.
  • #1804518 by Damien Tournoud: remove the default values and allow NULL values for revision_id columns in our base entity tables.
  • #1131884 by rszrama: prevent execution of the customer profile pane manager widget when its element is covered by a limit of validation errors.
  • #1482038 by rszrama: when creating product view modes based on product referencing entities, only look for active reference fields and entity types.
  • #1677694 by theo_, bojanz, rszrama: remove the outdated custom breadcrumb functions, leaving the deprecated functions in place but benign.
  • #1632254 follow-up by pounard: wrap a call to rules_config_load_multiple() to avoid making the call if there are no named entities to load.
  • #1632254 by rszrama: only load the necessary rules components during tax calculation.
  • #1631836 by marcin.wosinek, rszrama: move the static cart order IDs cache from commerce_cart_order_load() to commerce_cart_order_id().
  • #1705316 by pounard: use commerce_order_uri() if possible to determine the path for the commerce-order:customer-url token.
  • #1802424 by rymo: fix the parameters documented for hook_commerce_payment_order_paid_in_full().
  • #1410990 by rszrama: clarify some documentation pertaining to tax rate calculation callbacks and allow 0% tax rates to still proceed to calculation.
  • #1801964 by joachim, rszrama: provide a better example for hook_commerce_product_type_info().
  • #1233226 by rszrama, Antoine_k: pass the proper arguments to commerce_payment_transaction_access() where we were passing an order object instead of a transaction object; note: the patch was accidentally included and pushed in the previous commit, 94cd7a2.
  • #1595602 by benjy, rszrama: add CVV validation support for JCB and Diners Club credit cards, whose numbers start with a 3 but use 3-digit CVVs instead of the 4-digit CVV used by American Express.
  • #1728242 by rszrama, rlmumford: check to ensure we can load an order from a Views result item before attempting to render an order balance field.
  • #1791276 by joachim: link to the duplicate product if unique SKU validation fails for product inserts and updates.
  • #1797062 by ivam.santos: remove IP address checking when determining anonymous cart order IDs, as the return value of ip_address() is unreliable - it may change based on your proxy server configuration and not actually represent the client IP address.
  • #1719454 by theo_, rszrama: allow the order total area handler to be displayed on empty Views where there may be no results for the View but a valid order could still be loaded from the arguments.
  • #1739600 by AndyF: use LANGUAGE_NONE instead of an empty string for the default language of pre-calculated prices.
  • #1558380 by helior: add a price comparison condition that can safely compare price field values of different currencies.
  • During the cart refresh, cast the expected line item unit price's data value to an array in case it is NULL before initializing it to include an empty components array with a union.
  • #1415670 by manatwo, andyg5000, rszrama: prevent payment attempts if previous checkout panes on the current checkout page generate form errors; display a warning message above the pane letting customers know payment has not processed.
  • #1689538 by rszrama: use NULL instead of just '' for our various entity IDs and revision IDs; this was inconsistent before, and core actually requires NULL over ''.
  • #1787728 by jsacksick: add the view mode and language code to a product's display_context array when its fields are rendered into another entity.
  • #1797304 by acrazyanimal: increase the weight of the delete checkbox on customer profile manager widgets.
  • #1742642 by rszrama: add a default return value of FALSE to commerce_line_item_access() in the event that the user does not have administer line items permission and the site does not have the Order module enabled.
  • #1783786 by joachim: group order statuses by state in the order status Views filter options list.
  • #1783830 by joachim, rszrama: fix reference field Views relationship definition help text.
  • #1760154 by Damien Tournoud: update the HUF currency format to match the Microsoft style guidelines for Hungary; comma for the decimal separator, space for thousands.
  • #1558082 by joachim: add the option to require double entry of the e-mail address for anonymous users during checkout.
  • #1792178 by Jorrit: standardize Views relationship strings to match similar strings in Views itself.
  • #1567090 by Berdir: do not wrap every entity passed through hook_entity_view() in the Product Reference module unless we determine it actually has a product reference field that may be liable to inject product fields into the entity's display.
  • #1672118 by vasike, rszrama: limit the product fields shown on a node type manage display page to those attached to bundles that the product reference field actually allows to be referenced.
  • Remove t() from the parameters on a call to format_plural().
  • #1783750 by joachim: remove an outdated part of the commerce_order_statuses() doc block.
  • #1777592 by vasike: fix the checkout pane settings title callback to not double escape checkout pane names in its return value.
  • #1773682 by blazey, rszrama: add the commerce_product_reference dependency to commerce_checkout.info.
  • #1764482 by rszrama: remove the unused Peruvian Inti from the currency array.
  • #1759494 by rszrama, andyg5000: change the AJAX refresh code for profile copying to use an alterable commands array similar to the Add to Cart form.
  • Clean up some behavior attaching code in .js files.
  • #1715436 by bojanz: clear Commerce entity related static caches when modules are enabled.
  • #1570058 by helior, rszrama: add an extra class to injected product fields to indicate the field is empty for the current visible product.
  • #1031494 by vasike, rszrama: add Views filter handlers to the node table to filter by nodes that are product displays or to filter by node type using only product display node types as options.
  • #1705862 by rszrama, hadsie: initialize the payment details array in the pane values array on payment checkout pane form submission.
  • #1701344 by bobbyaldol: code clean-up removing a double semi-colon in a test file.
  • #1694604 by googletorp: only add product related extra fields to entity bundles containing product reference fields that actually have product field injection enabled.
  • #1691190 by OnkelTem: add the product language property to the product entity property info.
  • #1230830 by vasike, Damien Tournoud: implement hook_module_implements_alter() to ensure the Product Reference module's hook_entity_info_alter() executes at the end of the invocation chain to accommodate other entity info altering modules like Display Suite.
  • #1678396 by generalredneck, rszrama: add a Views relationship from the uid column of the commerce_payment_transaction table to the users table.
  • #1664166 by Simon Georges: sort currencies by currency code to properly alphabetize currencies that may be altered into the currencies array.
  • #1662538 by amateescu, joachim: properly designate entity properties that are computed and don't map directly to schema columns in the entity tables.
  • #1662764 by rszrama: add documentation to hook_commerce_tax_type_info() for the round_mode property.
  • #1571376 by tim.plunkett: update uninstallation to use the new field bundle settings variables instead of the old single variable from pre Drupal 7.14.
  • #1343192 by rszrama: unset product_select element input when building the Add to Cart form if we detect that an attribute form element has been changed resulting in a potentially new set of #options for the product_select element.
  • #1308472 by rszrama: add the wrapper div around pre-existing prefixes and suffixes on injected field content arrays to support modules like Field Collection that already sets a prefix and suffix, thereby avoiding our initial wrapper div that was coming in through an array union.
  • Support adding destination parameters to the edit / delete operations links on the Order table's operations links Views field.
  • #1434868 by sheise: use filter_fallback_format() instead of hard-coding 'plain_text' into the checkout completion pane's display.
  • Added an optional parameter to the Payment module's checkout page redirect functions to let callers indicate in the order log why the redirect occurred.
  • #1621506 by joshmiller: add a little more description to the order balance comparison condition's Value parameter.
  • #1379258 by rszrama: use instanceof instead of getPluginName() to check the class of a object in the callback for the action to enable a payment method.
  • #1430894 by rszrama: ensure we have a commerce_price property info array for the commerce_product entity before adding it to the entity's property info array.
  • #1597946 by rszrama, vasike: prevent warnings on the product add form when using Entity Translation for the Commerce Product entity.
  • #1620014 by bojanz, rszrama: add the product status extra field and support showing the title and status extra fields in other view modes besides the product's non-existent full view mode.
  • #1608810 by navid.kashani: add RTL support to our CSS files.
  • #1644320 by googletorp: add a Views field handler for order e-mail addresses.
  • #1643996 by Simon Georges: prevent notices when rebuilding the checkout form with the payment pane on it via an AJAX refresh when the user hasn't supplied payment information yet.
  • #1029002 by kotnik, rszrama: allow single product Add to Cart forms to optionally show attribute field widgets via a new Add to Cart form display formatter setting.
  • #1588790 by Summit, rupertj, davidwhthomas: fix a warning on the Add to Cart form when the first attribute field on the product type was not used by any products represented on the form.
  • #1588226 by theo_, bojanz: add an API function to retrieve an array of node types that have product reference fields.
  • #1621786 by joshmiller: add help text to the line item types admin page.
  • #1621736 by joshmiller: fix a couple typos in the Order API documentation.
  • #1410022 by helior, rszrama: add customer profile copying support to checkout panes, e.g. to indicate 'My billing information is the same as my shipping information.'
  • #1599336 by vasike: fix some incorrectly encoded i's on a few comments.
  • #1574746 by bojanz: set the menu_rebuild_needed variable instead of using menu_rebuild() directly.
  • Remove the trailing currency code from the PLN format.
Created by: rszrama
Created on: 22 Oct 2012 at 00:08 UTC
Last updated: 2 Aug 2018 at 04:56 UTC
New features
Bug fixes
Insecure

Other releases