Magento 产品url不起作用,无法单击

Magento 产品url不起作用,无法单击,magento,Magento,我有以下代码在magento的主页上显示产品。显示产品,但我无法单击它并转到产品页面。 谁能告诉我出了什么问题吗 <?php //Almost Gone Section asort($catalog); reset($catalog); $almostGoneId = key($catalog); $almostGoneStock = $catalog[$almostGoneId]; $almostGone = Mage::getModel('

我有以下代码在magento的主页上显示产品。显示产品,但我无法单击它并转到产品页面。 谁能告诉我出了什么问题吗

 <?php

    //Almost Gone Section
    asort($catalog);
    reset($catalog);
   $almostGoneId = key($catalog);
   $almostGoneStock = $catalog[$almostGoneId];
   $almostGone = Mage::getModel('catalog/product')->load($almostGoneId);


   $_categories = $almostGone->getCategoryIds();
   $_catarray = array();
   foreach ($_categories as $cat) 
   {
    $category = Mage::getModel('catalog/category')->load($cat);
    $_catarray[$category['url_path']] = $category['level'];
    }
   arsort($_catarray);
   $_depth = reset($_catarray);
   $_uri = key($_catarray);

   $url = $this->getUrl($_uri).$almostGone['url_key'].'';
   $almost_gone_price = $almostGone['special_price'];
   ?>
   --><div id="almost_gone" class="product-display-block">
    <div class="display-block">

    <div class="product_display_image">
    <img src="<?php echo $this->helper('catalog/image')-   >init($almostGone, 'image')
   - >constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(718) ?>" alt="<?    php   echo $almostGone['name'] ?>">
        </div>
        <div class="transparent_title">
            <!-- <span>Almost Gone, Huge Savings</span> --><span    class="display_model">Hurry, Almost Gone Only <?php echo str_replace(".00", "",$_coreHelper->currency($almost_gone_price,true,false)); ?></span>
        </div>
    </div>
    <div class="display_info gone-info">
        <span>Grab A Bargain Today, Only </span><span class="red"><?php echo    *emphasized text*$almostGoneStock ?></span><span> Left</span>
    </div>
    <div class="gone-na">
        <img src="<?php echo $this->getSkinUrl('images/home/gone-na.png') ?>">
    </div>`enter code here`
    <a href="<?php echo $url; ?>"><div class="link-hover"></div></a>
      </div>

-->
helper('catalog/image')->init($almostgene,'image'))
->仅约束(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->调整大小(718)->“alt=”“>
快点,快走了
今天就去买便宜货,只剩一点了
getSkinUrl('images/home/gone na.png')?>“>
`在这里输入代码`

您的产品url在哪里

$url=$product->getProductUrl()
//可能是这样的

<a href="<?php echo $url;?>"><img src="<?php echo $this->helper('catalog/image')-   >init($almostGone, 'image')
   - >constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(718) ?>" alt="<?    php   echo $almostGone['name'] ?>"></a>

如果您没有使用