css - How to apply <span> tag to My Cart top link in magento? -
i have changed texts cart shopping bag in top links through below code.
public function addcartlink() { $parentblock = $this->getparentblock(); if ($parentblock && mage::helper('core')->ismoduleoutputenabled('mage_checkout')) { $count = $this->getsummaryqty() ? $this->getsummaryqty() : $this->helper('checkout/cart')->getsummarycount(); if ($count == 1) { $text = $this->__('my shopping bag (%s)', $count); } elseif ($count > 0) { $text = $this->__('my shopping bag (%s)', $count); } else { $text = $this->__('my shopping bag'); } $parentblock->removelinkbyurl($this->geturl('checkout/cart')); $parentblock->addlink($text, 'checkout/cart', $text, true, array(), 50, null, 'class="top-link-cart"'); } return $this; }
now, want apply tag shopping cart quantity. so, should shopping bag 0. 0 (quantity) should in red color. should do?
sorry, stupid question.
can added directly.
public function addcartlink() { $parentblock = $this->getparentblock(); if ($parentblock && mage::helper('core')->ismoduleoutputenabled('mage_checkout')) { $count = $this->getsummaryqty() ? $this->getsummaryqty() : $this->helper('checkout/cart')->getsummarycount(); if ($count == 1) { $text = $this->__('my shopping bag <span>(%s)</span>', $count); } elseif ($count > 0) { $text = $this->__('my shopping bag <span>(%s)</span>', $count); } else { $text = $this->__('my shopping bag'); } $parentblock->removelinkbyurl($this->geturl('checkout/cart')); $parentblock->addlink($text, 'checkout/cart', $text, true, array(), 50, null, 'class="top-link-cart"'); } return $this; }
Comments
Post a Comment