Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
Release notes
This release includes a variety of improvements related to performance and scalability, PHP 7 support, and more. We've also satisfied a long time feature request by allowing developers to change their product pricing strategy to use code to directly manipulate product prices. (Previously you could only manipulate prices via Rules.) New features also include a "placed" timestamp, cart provider plugins (allowing for sessionless shopping carts), and currency formatting / credit card validation updates all backported from Commerce 2.x.
Please pay attention to the following changes before updating:
We've backported the "placed" timestamp from Commerce 2.x.
Previously, Commerce 1.x only included a created and a changed timestamp on orders. Since Commerce 1.9 we've included a default checkout completion rule that updates the value of the created timestamp to capture the point the order was considered "placed". Unfortunately, this wasn't sufficient for all scenarios, so we've backported the placed timestamp from 2.x to 1.x in this release.
Adding a column to a table is a costly database operation that takes longer the more records you have in the table. If you have a large number of orders in your Drupal Commerce site, we strongly recommend using drush to perform the update.
Additionally, we do not automatically populate this placed timestamp. We do include a drush command, drush coupt, that you can use to copy your orders' created timestamps to the placed timestamp. (This assumes your site has actually been using the default rule.)
Product matching no longer uses EntityFieldQuery by default.
In Commerce 1.10, we changed our SKU based product matching (as used in the autocompletion for product reference fields) to use Drupal's EntityFieldQuery query builder instead of building the query directly using db_select(). This introduced a scalability issue that we resolved in Commerce 1.12, but that change in turn introduced a data loss regression.
As a result, we've reverted this change back to the Commerce 1.9 method, defaulting to using db_select(). For most sites, this is completely fine. However, sites that depended on the EntityFieldQuery (for example, to source product data from a remote or non-SQL database) can still make use of it by setting the following variables in their settings.php files:
// Set to TRUE to make use of EntityFieldQuery for product matching.
$conf['commerce_product_match_products_efq'] = TRUE;
// By default, the options list callback for product matching has no
// limit, but using EntiyFieldQuery also forces a dependency on
// entity_load_multiple() for all potential matches. This can lead to
// memory errors for fields whose default limit hasn't been set,
// though in other cases setting a limit can lead to data loss. Adjust
// this value optionally to achieve the beset performance on your site.
$conf['commerce_product_reference_default_options_list_limit'] = 100;
See https://www.drupal.org/node/2697017#comment-12336086 for more information.
Changes since 7.x-1.13 (52 commits):
- Issue #1804592 by a.ross, andyg5000, mglaman, czigor, roderik, rooby, torgosPizza, Anybody, GoZ: reload an up to date copy of the order being processed through a checkout form during Ajax related form rebuilds and related scenarios to avoid resaving old revisions.
- Issue #2521772 by david_garcia: Support namespaced callbacks
- Issue #2825135 by rszrama, mduvergey: fix a copy / paste error in an old update hook from before the 1.0 release.
- Issue #2888407 by jsacksick, krystalcode, mglaman, rszrama: backport the "placed" timestamp from Commerce 2.x.
- Issue #2454683 by RoSk0, rszrama: Allow to change order total display settings in commerce_order_handler_area_order_total
- Issue #2655184 by acrazyanimal, rszrama: Ensure the latest revision of an order is loaded before checkout routing.
- Issue #2839323 by Kingdutch, rszrama, mglaman: fix some typo, whitespace, and syntax issues in a variety of code comments.
- Issue #2779467 by jsacksick, nicoloye, rszrama: only perform product field injection when the referencing entity's view mode has one or more product fields visible.
- Issue #2922595 by mglaman: do not create a metadata wrapper in commerce_line_items_quantity() if a line item object is passed in.
- Issue #2697017 by rszrama: revert product matching and the options list limit to the Commerce 1.9 implementation and provide a setting to opt-in to the EntityFieldQuery based version introduced in Commerce 1.10.
- Issue #979740 by rszrama, das-peter: disable autocompletion on the Add to Cart form by default to avoid inappropriate products being added to the cart when users go back from a redirect after submitting the form.
- Issue #2920334 by rszrama: Refactor the condition "Order contains products of particular product types" to improve performance.
- Issue #2920337 by rszrama: Refactor the condition "Total product quantity comparison" to improve performance.
- Issue #2844361 by rszrama, torgosPizza: Refactor the condition "Order contains a particular product" to improve performance.
- Issue #2869890 by gcb, rszrama, kingandy: make theme_commerce_line_item_manager() more responsive to alterations.
- Issue #1810110 by stella, Albert Volkman, jsacksick: allow optional CVV fields.
- Issue #2801211 by chishah92: fix an instance where the return value of commerce_round() is not used.
- Issue #2919369 by rszrama: Preserve product ID indexes in the array used to match multiple products with the same attribute values.
- Issue #2919323 by rszrama: Fix dependent attribute option filtering when resolved relative to optional attributes.
- Issue #1286244 by czigor, jantoine, rszrama, davidwhthomas, lakshmisundar, dpolant, jessepinho, mglaman, Dave Kopecek, 3rd_rail, JurgenR, stockliasteroid, Dubs, kopeboy, jsacksick, nelslynn, philsward, GoZ: allow dependent attributes to preserve their default options if a matching product exists on an Add to Cart form.
- Issue #2219483 by rszrama, smccabe: prevent checkout form submission when fields altered onto the form outside of checkout panes fail validation.
- Issue #2852839 by Berdir: translate product extra fields properly during product field injection.
- Issue #2822130 by joelpittet: Avoid rendering the commerce_cart_empty_page theme hook if not needed.
- Issue #2849841 by swickham: grant the site admin user in tests the administer fields permission.
- Issue #2882816 by jefuri, rszrama: define the revision property of an order in hook_entity_property_info() for Rules usage.
- Issue #2316709 by czigor, jcisio: commerce_cart_order_product_line_item_delete's skip_save doesn't work
- Issue #2887385: Fix wrong hook name in commerce_product_pricing.api.php.
- Issue #2887414: Fix a regression introduced in commerce_payment_validate_credit_card_type().
- Issue #2888674 by bojanz: Regenerate the currency list from CLDR
- Issue #2889763 by bojanz: Ensure consistent currency property ordering
- Issue #2256853 by acrollet, dwkitchen: Add Georgian Lari to Currencies
- Issue #2593083 by AndyD328: IQD Missing from currency list
- Issue #2887414 by mglaman, rszrama, bojanz, dhare23: Update our cretdit card number validation logic.
- Issue #2690765 by joelpittet, thePanz, jsacksick: Prevent entity_load_unchanged() from changing orders through order refresh.
- Revert "Issue #2887413 by mglaman, rszrama, bojanz, dhare23: Update our credit card number validation logic"
- Issue #2887414 by mglaman, rszrama, bojanz, dhare23: Update our credit card number validation logic
- Issue #2280057 by jsacksick, maciej.zgadzaj, rszrama, GuGuss: Permit settings.php overrides of payment method configuration.
- Issue #2874437 by jsacksick: Introduce Cart provider plugins.
- Issue #2884259 by cslevy: Order is saved multiple time on update cart
- Issue #2720191 by mbrc: Fix Payment update 7103 which introduced an implicit dependency to the Checkout module.
- Issue #2887395 by rszrama, jsacksick: Allow rules to be completely disabled in price calculation.
- Issue #2887385: Allow hook based price calculation when price pre-calculation is disabled.
- Issue #2821033 by Kartagis: TL symbol placement wrong:
- Issue #2708395 by TimRutherford: Trim product SKUs before matching.
- Issue #2768369 by rpsu, rszrama: Minor dockblock fix for commerce_cart_product_add()
- Issue #2762907 by tomrog, smccabe: fix a pass-by-reference error in commerce_cart_product_add().
- Merge branch '7.x-1.x' of git.drupal.org:project/commerce into 7.x-1.x
- Issue #2759169 by mglaman, fbailey, smccabe: Fix DrupalCI tests
- Issue #2535810 by BR0kEN: Update .travis.yml to use container infrastructure (1.x)
- Issue #2614026 by zaporylie: Payment method instance should be available for CALLBACK_commerce_payment_method_submit_form()
- Issue #2717313 by Sonal.Sangale, mglaman: document the fieldset property in hook_commerce_checkout_pane_info().
- Issue #2713209 by mglaman: Use "minimal" profile in tests