*/ class Mage_Sales_Helper_Reorder extends Mage_Core_Helper_Data { const XML_PATH_SALES_REORDER_ALLOW = 'sales/reorder/allow'; public function isAllow() { return $this->isAllowed(); } /** * Check if reorder is allowed for given store * * @param Mage_Core_Model_Store|int|null $store * @return bool */ public function isAllowed($store = null) { if (Mage::getStoreConfig(self::XML_PATH_SALES_REORDER_ALLOW, $store)) { return true; } return false; } public function canReorder(Mage_Sales_Model_Order $order) { if (!$this->isAllowed($order->getStore())) { return false; } if (Mage::getSingleton('customer/session')->isLoggedIn()) { return $order->canReorder(); } else { return true; } } }