Most upgrades are automatically applied, but sometimes you may need to update custom templates, or status configuration, to take advantage of new features or improvements. Those changes are discussed here.

If you're using Resource Products, a new commerce.resourceproduct.image_field system setting allows you to connect an image TV to the Commerce products table.

If you have a custom product type that does not inherit the fields from comProduct, look at core/c../c../model/commerce/comproduct.class.php around line 299 for the field definition used in the standard commerce form.

For custom product types that fetch information from a different table/source look at comresourceproduct.class.php around line 118 for the new getImage() method you can also override in your product type. Make sure to also update your synchronise method.

Shipping Methods (Shipments)

In v0.11 we also refactored the built-in shipping methods to base calculations on the order shipments, instead of the full order. This applies to both the pricing and availability.

This was announced in 0.8 and is now complete. While it should be backwards compatible, please verify any custom shipping methods still work as expected.

Continuing off-site payments with POST redirect

If the client for some reason finds themselves back on the checkout while the transaction isn't confirmed/failed/cancelled yet, there was previously a redirect link to continue. This however does not work when the gateway requires a POST-style redirect (e.g. Adyen).

To correct this, the frontend/checkout/pending-transaction.twig was updated in 0.11 to allow such transactions to continue as well. Around line 7, change the following:

Configurable email header and footer

0.11 introduces 2 new settings, commerce.email_header_url and commerce.email_footer_text, which automatically adds an image heading and the email footer text from a setting, without having to change the email templates.

If you have a custom emails/wrapper.twig template, you'll want to add the following to support the new header image around line 116 (instead of the previously commented out code):

Shipping method pre-selected in cart

Commerce will now pre-select the first available shipping method for an order, potentially as soon as the cart. To show the shipping method correctly, you may want to update your frontend/checkout/cart/totals.twig template around line 78.

This functionality looks at the sort order of the shipping methods, so make sure you have them in the right order under Configuration > Shipping methods.

Taxed shipping costs

0.11 now applies tax rules to the shipping costs. Because of this we're reordered a few elements in frontend/checkout/cart/totals.twig and frontend/checkout/partial/summary.twig to make sure the numbers are in the order people would expect.

In frontend/checkout/cart/totals.twig, the subtotal block was removed from the {% if order.discount != 0 %} conditional around line 5 and the related {% else %} around line 32, to be placed ahead of that entire conditional around line 4 instead.

The shipments block around line 78 was moved to after the subtotal block, and before the discount conditional, around line 13.

In frontend/checkout/partial/summary.twig, the shipments block was moved from around line 84 to around line 65 (before the {% if order.tax != 0 %} conditional), and an extra check was added to show the fee inclusive or exclusive of VAT, like so:

As Commerce 0.11 has had quite a few shipping-related template tweaks, it may be worthwhile to grab the default templates and to re-apply any tweaks you made if you get stuck following these instructions.

Item-specific links

When an order item is created, it sets the item's link value to the result of product->getLink. But in frontend/checkout/cart/items.twig it was still delegating to product->getLink (item.product.link) instead of the saved value (item.link).

0.11 ships with a new ItemData module that can set the link on standard products (which don't normally have that, as a single product could be used on different resources; vs a resource product type that has the 1-1 connection). This 0.11 module can be used to set the item's link without the product having an associated link, so this issue finally became obvious.

If you plan to use the item-specific links, edit your theme's frontend/checkout/cart/items.twig template to have:

(0.11.1) New AcceptTerms module

A new AcceptTerms module was added in 0.11.1 which, when enabled, requires the following code to be added to the frontend/checkout/payment-method.twig template. Where is up to you, but usually right before the submit button (line 45) is a good place.

(0.11.4) Note: get_product now looks at the first valid product

Previously the commerce.get_product snippet only looked at the very first product ID listed. If that product was removed or invalid, it would not return any product at all. Now, the snippet will use all product IDs to find the first option that still exists.

In normal usage, this should not cause any changes in behaviour, but it's worth double checking your catalog to make sure it will still behave the way you expect it to.