/** * Get url for reorder action * * @param Mage_Sales_Order $order * @return string */ public function getReorderUrl($order) { if (!Mage::getSingleton('customer/session')->isLoggedIn()) { return $this->getUrl('sales/guest/reorder', array('order_id' => $order->getId())); } return $this->getUrl('sales/order/reorder', array('order_id' => $order->getId())); }
/** * generates the OPS order id in dependency to the config * * @param Mage_Sales_Order $order * @param $useOrderIdIfPossible if false forces the usage of quoteid (for Kwixo pm etc.) * * @return string */ public function getOpsOrderId($order, $useOrderIdIfPossible = true) { $config = $this->getConfig(); $devPrefix = $config->getConfigData('devprefix'); $orderRef = $order->getQuoteId(); if ($config->getOrderReference($order->getStoreId()) == Netresearch_OPS_Model_Payment_Abstract::REFERENCE_ORDER_ID && $useOrderIdIfPossible === true) { $orderRef = self::DELIMITER . $order->getIncrementId(); } return $devPrefix . $orderRef; }