「マイカート」の代わりにショッピングカートの画像を表示しようとしています-フレーズ。ショッピングカートの画像の上には、カート内に表示されるアイテムの数だけが表示されます。
テキストを変更するには、mage / checkout / block/links.phpを編集する必要があります。
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 Cart (%s item)', $count);
} elseif ($count > 0) {
$text = $this->__('My Cart (%s items)', $count);
} else {
$text = $this->__('My Cart (0 items)');
}
に
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->__('</span></span>%s</span></span>', $count);
} elseif ($count > 0) {
$text = $this->__('<span><span>%s</span></span>', $count);
} else {
$text = $this->__('<span><span>0'</span></span>);
}
これで、商品番号がショッピングカートの画像の中/上に表示されます。私が望んでいたように。問題は次のとおりです。リンクにカーソルを合わせると、アイテム番号の前後のスパンスパンタグが表示されます。
そこでリンクタイトルを変更する方法はありますか?または、トップリンクにショッピングカートの画像を表示するさらに良い方法はありますか?