hyperlink - Add a cart link (with number of items) in the sidebar in Magento -


i'm faced unique problem unique customer. in magento's account screen, there typically 2 places "my cart" makes appearance; top bar, , in sidebar block. however, i've been tasked removing , placing link (with number of items in cart) in "my account" section of sidebar.

it appears new user, cannot post images. going pose problem.

my account

dashboard
address book
cart (2 items) <---- link here. within area, , showing number of items
orders
product reviews
may tags newsletter subscriptions

now, adding link problem. in fact, it's quite simple , accomplished

<action method="addlink" translate="label" module="checkout"><name>cart</name><path>checkout/cart/</path><label>my cart</label></action> 

within customer.xml file.

the problem stems listing items in cart within area. if site in english, few "if" statements inside of code\core\mage\customer\block\account\navigation.php resolve it. however, translation seems done before additem function called add links menu.

i figure if number of items in cart displayed before additem called, problem solved, php inside of tags gets ignored.

if has solution or clues this, appreciated! taking time read this.

i'm sure won't able accomplish "my cart (%d items)" functionality addlink block action (especially layout file) need call mage::helper('checkout/cart')->getcart()->getitemscount() number of items in our cart.

i recommend using if statements, suggest, tapping localisation system using <?php echo $this->__($str) ?> translate strings in template file, adding translation locale csv files if necessary.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -