If you set the block title and have the block set to hide when the cart is empty the block title displays all the time. The standard ubercart cart block exhibits the correct behaviour when it is set to hide when empty.
If I set no title the block will display without a title when an item is added to it until I navigate to another page whereupon the hard-coded block title will appear (which is 'Shopping Cart').
Comments
Comment #1
erik seifert commentedThis is issue to Ajax Cart. I need this block on every page, because i must do a reload if no block is showing ( javascript issue ). But the next idea is to make only a empty placeholder and fill this with cart content.
* goes on feature list
Comment #2
mroscar commentedwell... there might be some solution when hide the block of the screen.. just a thought
Comment #3
vincentdemers commentedGot it working by using this snippet in the block display rules
Comment #4
mroscar commentedsmart move...lol ..thnks...
Comment #5
luisteran commentedHi,
I have the same problem, but I don't understand your solution. Where exactly did you add your code.
Thanks.
Comment #6
wintervanilla commentedGood solution... works for me!
@luisteran - when you are configuring the block, under "Page specific visibility settings" - select the PHP option and paste the code snippet from #3 in there. and save.
Cheers,
Andrew
Comment #7
Rob_Feature commentedWhew, good (albeit not ideal) fix for this.
Seems like this could easily be handled in the module by, instead of calling the 'empty' template, it just didn't display the block. Ah well, good enough for now.
Comment #8
Starminder commented#3 works, but I noticed now you have to refresh the page to get the cart to show, wheras before it would populate immediately. I kind of need to best of both worlds! :)
Comment #9
Anonymous (not verified) commentedSame problem here... I've tried the php code provided in #3 but I have to refresh the page to display the cart...
Comment #10
tunicMoving this to 6.x-2-x branch because 6.x-1.0 branch is not developped anymore
6.x-2.x branch does not have this option. As #8 states if you just do not add block when empty you will lost AJAX updating. To solve this module will have to inject some code to page when cart is empty, code that will retrieve the whole block code from site using AJAX when first product is added.
This is not a quick feature becasue some changes or addings are needed.
Comment #11
tunicPostponing until this feature is demanded by (lot of) users.
Comment #12
vasyok commentedThanks, vincentdemers!
It's work!
Comment #13
carrierawks commentedI would like to see this be a part of the module.
For now I used #3 (vincentdemers) answer, thanks!!! :-)