Problem/Motivation

This is a follow-up issue to #3512001: Allow to modify the "There are no shipping rates available for this address." error message.

Currently, if no shipping rates apply to the current order and address given, and we estimate the tax rates and shipping methods, for the current order, the applying rate is simply omitted (as there isn't one).
But this shows an incorrect total summary, as there shouldn't be a total summary at all. Instead, something along the lines of "Could not calculate the total order summary" should be displayed.

(Note, that this case was also possible before #3512001: Allow to modify the "There are no shipping rates available for this address." error message).

A rate applies to the current order, and the "total_order_summary" gets adjusted correctly:
screenshot

No rate applies to the current order. The "total_order_summary" still gets displayed even if no rate applies (ommiting the "Shipping Cost" ("Versandkosten") section entirely and therefore showing an incorrect total order summary, as none should be shown instead):
screenshot2

Steps to reproduce

Proposed resolution

If no rates apply, show a different template with a message along the lines of "Could not calculate the total order summary"

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

grevil created an issue. See original summary.

grevil’s picture

Status: Active » Needs work

Ok, I tried to explain my thoughts for most of the changes in the MR and added a few questions. This is not final yet.

The tests are still failing, and the template needs some more love. Furthermore, I added a few questions in the MR.

grevil’s picture

Title: If no shipping rates apply to the current order, an incorrect order summary should not get displayed » If no shipping rates apply to the current order, no order summary get displayed
grevil’s picture

Title: If no shipping rates apply to the current order, no order summary get displayed » If no shipping rates apply to the current order, no order summary should be displayed
grevil’s picture

Status: Needs work » Needs review

All done, please review!

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @grevil! Really nice and useful additions.

Works very well, so let's set this RTBC for final maintainer checkup :)

grevil’s picture

StatusFileSize
new11.04 KB

Static patch for the time being.