1

有谁知道如何(重新)编码某个类别的限制器以显示 href 链接而不是下拉字段?

我的意思是: http ://cl.ly/2T2i2T2g0k3n0i2N0b2c

我想将其重新编码为: http ://cl.ly/2O1e0L1c1i24361t3Z3v

只想将下拉列表转换为一些简单的 html 链接,但是...

我完全有能力做到这一点,但我不是 Magento 专家,我只是认为我不能像源代码中的 www.store.com/category.html?limit=12 那样硬链接它。我需要一个返回类别 url 的函数。

有谁知道如何编码?

4

1 回答 1

1

很容易。

转到 /app/design/frontend/[your-interface]/[your-theme]/template/page/html/pager.phtml 并替换此代码:

    <select onchange="setLocation(this.value)">
    <?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
        <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
            <?php echo $_limit ?>
        </option>
    <?php endforeach; ?>
    </select> <?php echo $this->__('per page') ?>

有了这个:

    <?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
     <a href="<?php echo $this->getLimitUrl($_key) ?>"><?php echo $_limit ?></a> &nbsp;
    <?php endforeach; ?>
    <?php echo $this->__('per page') ?>
于 2011-05-12T13:37:20.820 回答