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:

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):

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
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3512231-if-no-shipping--8.patch | 11.04 KB | grevil |
| 2025-03-11 15_10_37-Warenkorb _ Bilderrahmen-passt.de_.png | 7.54 KB | grevil | |
| 2025-03-11 15_10_01-Warenkorb _ Bilderrahmen-passt.de_.png | 9.81 KB | grevil |
Issue fork commerce_cart_estimate-3512231
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
Comment #3
grevil commentedOk, 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.
Comment #4
grevil commentedComment #5
grevil commentedComment #6
grevil commentedAll done, please review!
Comment #7
anybodyThanks @grevil! Really nice and useful additions.
Works very well, so let's set this RTBC for final maintainer checkup :)
Comment #8
grevil commentedStatic patch for the time being.