When you use one of those handlers under the "no results behavior" views section, they just don't get displayed at all, when your view is empty.

Actually we are only checking for empty content, but this settings was wrong in views (see #1677784: $empty argument of the area handler render() is FALSE for the empty area.), so it worked kind of magic until views get fixed.

So now we need to check for the correct value which mean we want to check the 'empty content' for regular case and 'empty option' ("Display even if view has no result") used for 'no results behavior' case.

Files: 
CommentFileSizeAuthor
#7 1719454-line_item_summary-empty_option-7.patch6.19 KBbojanz
PASSED: [[SimpleTest]]: [MySQL] 3,570 pass(es).
[ View ]
#4 1719454-line_item_summary-empty_option-4.patch1.54 KBtheo_
PASSED: [[SimpleTest]]: [MySQL] 3,570 pass(es).
[ View ]
#1 1719454-line_item_summary-and-order_total-views-handler.patch1.57 KBtheo_
PASSED: [[SimpleTest]]: [MySQL] 3,589 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.57 KB
PASSED: [[SimpleTest]]: [MySQL] 3,589 pass(es).
[ View ]

Here is the patch

Status:Needs review» Reviewed & tested by the community

Good.

Title:Line item summary & Order total views handlers not displayed since views get fixedAllow the Order Total area handler to render to empty Views
Component:Developer experience» Views integration
Assigned:theo_» Unassigned
Category:bug» feature
Status:Reviewed & tested by the community» Fixed

I was waiting for a new release of Views to come out to pursue this, and though I talked it over with bojanz in Paris, I can't remember the result of our conversation. However, looking at this again today, I don't see a reason to change the current behavior of the line item summary handler (it's meaningless if there are no line items in the result set) and I actually need to update the order total area handler to not try to render when a valid order couldn't be loaded. I can see why that might need to be displayed in the empty text area if perhaps some filter prevented results from appearing but a valid order argument was found.

So, I'll commit half of this and this some. : D

Oh, I also removed the unset($form['empty']); from the options form for the order total handler. If we're going to support it, we may as well make the option available again (even if it's never used ; ).

Commit: http://drupalcode.org/project/commerce.git/commitdiff/4b4fe4d

StatusFileSize
new1.54 KB
PASSED: [[SimpleTest]]: [MySQL] 3,570 pass(es).
[ View ]
new4.63 KB
new6.29 KB

The issue is back on kickstart.

The fact is that we want to display the Line item summary in any case to have a consistent design.

How it used to & should be :
kickstart_v2_cart_block.png

How it is actually :
kickstart_v2_cart_block_broken.png

That's why we need bring back the empty option on Line item summary.

Status:Fixed» Needs review

Status:Needs review» Reviewed & tested by the community

Per bojanz.

My concerns:

  • I prefer there be nothing in my checkout prior to adding anything to my cart.
  • I prefer the empty, non-zero-currency, non-linking to an empty checkout link way

Patch does what it sets out to do.

StatusFileSize
new6.19 KB
PASSED: [[SimpleTest]]: [MySQL] 3,570 pass(es).
[ View ]

Rerolled. rszrama and I agreed that Commerce shouldn't be unsetting $form['empty'] anywhere.

Status:Reviewed & tested by the community» Fixed

And done.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.