很简单。
将相应的销售订单历史记录块 app\code\core\Mage\Sales\Block\Order\History.php 文件覆盖到您的本地代码池中
只需按当前商店 ID 过滤您的收藏。
$store_id = Mage::app()->getStore()->getId();
$orders = Mage::getResourceModel('sales/order_collection')
->addFieldToSelect('*')
->addFieldToFilter('customer_id', Mage::getSingleton('customer/session')->getCustomer()->getId())
->addFieldToFilter('state', array('in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()))
->addFieldToFilter('store_id',$store_id)
->setOrder('created_at', 'desc')
;
请注意上面代码中的这些行
/*Current Store View ID*/
$store_id = Mage::app()->getStore()->getId();
/*Filtering the order collection by current store id*/
->addFieldToFilter('store_id',$store_id)