Commerce Commerce 1.x Upgrades v1.4

Product matrix: description template & control over automatic updates

The matrix now as a new matrix option to set a description template, to use that to automatically fill product descriptions from the row and column.

You can now also set (per matrix) if you want SKUs, names, and descriptions to be automatically updated when editing the matrix options, rows, or columns. This is on by default for the SKU and name, in line with the previous behavior pre-1.4.

When disabled, new products are still created based on the templates, but you can edit the products manually.

Product matrix now translatable

The product matrix now supports internationalisation. Rows and columns now have translatable names and descriptions, which will propagate to the individual products.

Twig filters to look up product matrix data

If you’d like to render detailed information from the product matrix, for example in the cart, that is now easily possible with a few new twig filters.

For example, in the cart:

{% if item.product.matrix > 0 %}
    {{ item.product.matrix|matrix('column_name') }}: {{ item.product.column|matrix_column('name') }}
    <br>
    {{ item.product.matrix|matrix('row_name') }}: {{ item.product.row|matrix_row('name') }}
{% endif %}

Last used address automatically selected + skipping steps enabled

As of 1.4, the last billing and shipping address used by a logged-in customer will be automatically selected in the checkout. In addition, when first moving into the checkout, the customer will also be able to skip past any steps that are complete.

If you do not want the last address to be automatically selected, set the commerce.checkout_autoselect_user_address system setting to no.

If you do not want users to skip past completed steps in the checkout, for example because a selection is required on a shipping method step, set the commerce.checkout_allow_skipping_steps system setting to no.

New: Price Labels

The pricing in Commerce has been extended to support a new price-specific label that can optionally be shown and incorporated in the cart.

At the moment this is only implemented in the Quantity Price Type, allowing you to set a different label for certain quantities the customer orders.

To implement this in your cart template, use something along these lines:

{% if item.price_label %}
    <br>
    <small class="c-cart-price-label">{{ item.price_label }}</small>
{% endif %}

New: datefield grid filter

Grid filters can now use a new datefield type to filter results on dates.