我工作的一個Magento站點(Magento的版本1.5.1.0) - 普萊舍注意在回答我是新來的Magento。 我想獲得一個選項,以暢銷書排序我已經設法通過添加本地文件覆蓋核心文件,如下所示:Magento的暢銷書不工作 - 尋求修訂或變通方法
httpdocs /應用程序/代碼/本地/法師/目錄/塊/產品/列表/ Toolbar.php:
public function getAvailableOrders()
{
//return $this->_availableOrder;
//Custom Order list Edit
$this->_availableOrder = array(
'qty_ordered' => $this->__('Best Sellers'),
'entity_id' => $this->__('Latest arrivals'),
'name' => $this->__('Name'),
'price' => $this->__('Price')
);
//Custom Available Order -Edit finish
return $this->_availableOrder;
}
而且的httpdocs /應用程序/設計/前端/默認/ localsite /模板/目錄/產品/列表/ toolbar.phmtl:
<fieldset class="sort-by">
<label><?php echo $this->__('Sort by') ?></label>
<select onchange="setLocation(this.value)">
<option value="<?php echo $this->getOrderUrl('entity_id', 'desc') ?>"<?php if($this->isOrderCurrent('entity_id') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
Newest Products
</option>
<option value="<?php echo $this->getOrderUrl('qty_ordered', 'desc') ?>"<?php if($this->isOrderCurrent('qty_ordered') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
Best Sellers
</option>
<option value="<?php echo $this->getOrderUrl('price', 'asc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>
Lowest Price
</option>
<option value="<?php echo $this->getOrderUrl('price', 'desc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
Highest Price
</option>
<option value="<?php echo $this->getOrderUrl('name', 'asc') ?>"<?php if($this->isOrderCurrent('name') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>
Name A-Z
</option>
<option value="<?php echo $this->getOrderUrl('name', 'desc') ?>"<?php if($this->isOrderCurrent('name') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
Name Z-A
</option>
</select>
</fieldset>
這個工作的意義我現在有暢銷書排序選項,其排列方式與暢銷書排序方式相同在儀表板上。不幸的是,儀表板的暢銷書部分以及我的排序列表完全是錯誤的。
有誰知道如何解決這個或失敗,沒有人知道另一個屬性,我可以通過實現相同的結果 - 如果我去儀表板>報告>產品>產品有序我可以得到我想要的訂單廣泛的日期範圍 - 任何方式在排序選項中重新創建它。
是否有可用的排序選項列表,在某處?
** * ** * ** * ** * ** * ***UPDATE* ** * ** * ** * ** * ** * ***
我現在已經注意到,暢銷書中列出的產品都是舊產品。最近添加的100個左右產品不包含在暢銷書列表中。這些相同的產品也被單獨列出來,如果我在儀表板中或者使用上面的排序選項來排序,那麼它們會將新產品從A到Z,然後是老產品A到Z.任何想法可能會導致這種情況?
任何提示,建議,非常感謝幫助。
@Josh卡斯威爾感謝您對此事的關注,並緩慢回覆對不起 - 我已經回答您的評論更新的問題 - 希望這個新的信息會有所幫助。 – WebweaverD 2012-02-21 16:05:15