Closed (works as designed)
Project:
Ubercart
Version:
6.x-2.0-rc3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
7 Mar 2009 at 20:20 UTC
Updated:
24 Mar 2011 at 18:07 UTC
This is a common request in the UC forums and a feature of many ecommerce sites that I'd love to see, where you can easily add a menu item (often to simple text links in an upper right secondary menu) that shows a link to the cart and the number of items in the user's cart.
Features:
- Create a menu item that can be added to any menu that will display text followed by the number of items in the user's cart, ie. "Your cart (3)"
- Add '(#)' after text in menu item name, (ideally) so user can manage as usual menu item and adjust text
Comments
Comment #1
rszrama commentedDo you think it is necessary to allow multiple menu items? That would probably be a bit overcomplex for the simple feature... just curious.
Comment #2
rszrama commentedComment #3
stephthegeek commentedI think just one would be a million times better than none :)
Comment #4
rszrama commentedComment #5
willvincent commentedThis won't work with page caching, because the page cache and/or menu cache would have to be regenerated on each page load to ensure the number of items listed is always current -- which defeats the purpose of caching pages in the first place.
So while a menu item can certainly be added that links to the cart, the inclusion of the number of items in it can only really apply to authenticated users.
Comment #6
rszrama commentedGood call; will make sure to account for that - totally spaced on that when dreaming it up. : P
Comment #7
stephthegeek commentedDoh, this one too... what *is* the solution for getting around caching with these? It's bad enough with the cart block not working for anonymous users.
Comment #9
rszrama commentedFor anonymous users on cached sites, you can use JS to update the menu item text and cart block contents. It would just require a simple AJAX callback that could return the appropriate info. The AJAX cart module is supposed to do this, but I don't believe it's fully working for 2.x yet.
Comment #10
NPC commentedWas this dropped or somehow implemented? Subscribing.
Comment #11
mertskeli commentedThere is items_count which can be used for that. Check the cart block code.