public function render(Varien_Object $row) { if ($row->getOrderId()) { return sprintf(' <a href="%s" title="%s">%s</a>', $this->getUrl('adminhtml/sales_order/view/', array('_current' => true, 'order_id' => $row->getOrderId())), Mage::helper('catalog')->__('View Order Detail'), $row->getOrderNumber()); } else { return sprintf('%s', $row->getOrderNumber()); } }
public function render(Varien_Object $row) { if ($row->getOrderId() != '') { $order = Mage::getModel("sales/order")->loadByIncrementId($row->getOrderId()); $orderId = $order->getId(); $url = Mage::helper("adminhtml")->getUrl("adminhtml/sales_order/view", array('order_id' => $orderId)); return "<a href='" . $url . "' target='_blank' >" . $row->getOrderId() . "</a>"; } else { return ''; } }
/** * Return the Order Id Link * */ public function render(Varien_Object $row) { if ($row->getOrderId() != '') { $order = Mage::getModel("sales/order")->loadByIncrementId($row->getOrderId()); $orderId = $order->getId(); $url = Mage::helper("adminhtml")->getUrl("adminhtml/sales_order/view", array('order_id' => $orderId)); $html = '<a href="#popup" onClick="javascript:openMyPopup(\'' . $url . '\')" >' . $row->getOrderId() . '</a>'; return $html; // return "<a href='". $url . "' target='_blank' >".$row->getOrderId()."</a>"; } else { return ''; } }
public function render(Varien_Object $row) { $collection = Mage::getModel('sales/order_item')->getCollection(); $model = Mage::getModel('sales/order_item'); $model->load($row->getOrderId(), 'order_id'); return $model->getQtyOrdered(); }
public function render(Varien_Object $row) { $orderId = $row->getOrderId(); $orderIncrement = $row->getIncrementId(); $url = Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view', array('order_id' => $orderId)); $content = '<a href=' . $url . '>' . $orderIncrement . '</a>'; return $content; }
/** * Render approval link in each vendor row * @param Varien_Object $row * @return String */ public function render(Varien_Object $row) { $html = ''; if ($row->getEntityId() != '' && $row->getStatus() != Ced_CsMarketplace_Model_Vendor::VENDOR_APPROVED_STATUS) { $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId()); $url = $this->getUrl('*/*/massStatus', array('vendor_id' => $row->getEntityId(), 'status' => Ced_CsMarketplace_Model_Vendor::VENDOR_APPROVED_STATUS, 'inline' => 1)); $html .= '<a href="javascript:void(0);" onclick="deleteConfirm(\'' . $this->__('Are you sure you want to Approve?') . '\', \'' . $url . '\');" >' . Mage::helper('csmarketplace')->__('Approve') . '</a>'; } if ($row->getEntityId() != '' && $row->getStatus() != Ced_CsMarketplace_Model_Vendor::VENDOR_DISAPPROVED_STATUS) { if (strlen($html) > 0) { $html .= ' | '; } $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId()); $url = $this->getUrl('*/*/massStatus', array('vendor_id' => $row->getEntityId(), 'status' => Ced_CsMarketplace_Model_Vendor::VENDOR_DISAPPROVED_STATUS, 'inline' => 1)); $html .= '<a href="javascript:void(0);" onclick="deleteConfirm(\'' . $this->__('Are you sure you want to Disapprove?') . '\', \'' . $url . '\');" >' . Mage::helper('csmarketplace')->__('Disapprove') . "</a>"; } return $html; }
public function render(Varien_Object $row) { $links = ''; if ($row->getCustomerId()) { $links .= '<a href="' . $this->getUrl('adminhtml/customer/edit', array('id' => $row->getCustomerId())) . '" title="' . $this->__('View Customer') . '">' . $this->__('View Customer') . '</a><br/>'; } $links .= '<a href="' . $this->getUrl('adminhtml/sales_order/view', array('order_id' => $row->getOrderId())) . '" title="' . $this->__('View Order') . '">' . $this->__('View Order') . '</a>'; return $links; }
public function render(Varien_Object $row) { if (empty($row['history_id'])) { return ''; } if ($row['commission_type'] == MW_Credit_Model_Transactiontype::BUY_PRODUCT) { $url = Mage::helper('adminhtml')->getUrl('affiliate/adminhtml_affiliatemember/edit', array('id' => $this->getRequest()->getParam('id'), 'orderid' => $row->getOrderId())); return '<a href="' . $url . '">' . Mage::helper('affiliate')->__('View') . '</a>'; } }
/** * Return the Order Id Link * */ public function render(Varien_Object $row) { if ($row->getVendorId() != '') { $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId()); $url = $this->getUrl('adminhtml/sales_order/view', array('order_id' => $order->getId())); return "<a href='" . $url . "' target='_blank' >" . $this->__('View') . "</a>"; } else { return; } }
public function render(Varien_Object $row) { $realOrderIds = array(); if (is_array($row->getOrderId()) && count($row->getOrderId())) { foreach ($row->getOrderId() as $orderId) { if (!isset(self::$_orderIdMapper[$orderId])) { $order = Mage::getModel('sales/order')->load($orderId); if ($order->getId()) { self::$_orderIdMapper[$orderId] = $order->getIncrementId(); } unset($order); } if (isset(self::$_orderIdMapper[$orderId])) { $realOrderIds[] = sprintf('<a target="_blank" href="%s">%s</a>', Mage::getModel('adminhtml/url')->getUrl('adminhtml/sales_order/view', array('order_id' => $orderId)), self::$_orderIdMapper[$orderId]); } } } return implode(', ', $realOrderIds); }
/** * <p>Ship Order Without Tracking.</p> * <p>Preconditions:</p> * <p>1.Order is created.</p> * <p>2.The order is open in admin * <p>Steps:</p> * <p>1. Click 'Ship' button.</p> * <p>2. Fill products and quantity to ship.</p> * <p>3. Fill tracking information.</p> * <p>4. Click 'Sumbit Shipment' button.</p> * <p>Expected result:</p> * <p>OrderShipped message is sent out.</p> * * @test */ public function shipFullOrderWithTracking() { //Data $product1 = self::$_preconditionsData->getProduct1(); $sku1 = $product1['general_sku']; $product2 = self::$_preconditionsData->getProduct2(); $sku2 = $product2['general_sku']; $shipQty = self::FULL_ORDER_QTY; $shipment = $this->loadDataSet('SalesOrder', 'products_to_ship', array('ship_product_sku' => $sku1, 'ship_product_qty' => $shipQty, 'product_2' => array('ship_product_sku' => $sku2, 'ship_product_qty' => $shipQty))); $trackingData = array('carrier' => self::TRACKING_CARRIER, 'number' => self::TRACKING_NUMBER); //Steps createShipmentAndAddTracking() $this->_createShipmentAndAddTracking($trackingData, $shipment); //Verify $expectedMsgs = array(array("topic" => OrderManagement::ORDER_SHIPPED, 'message.orderNumber' => self::$_preconditionsData->getOrderId(), 'message.shipment.shipmentId' => '!\\d+!', 'message.shipment.shippingFees.amount' => '0', 'message.shipment.trackingDetails.array.0.trackingNumbers.array.0' => self::TRACKING_NUMBER, 'message.shipment.trackingDetails.array.0.carrier.string' => self::TRACKING_CARRIER, 'message.shipment.trackingDetails.array.0.service' => null, 'message.shipment.trackingDetails.array.0.serviceType.com.x.ordermanagement.v2.ShippingServiceType' => 'MERCHANT_SHIPPED', 'message.shipment.shippingMethod.string' => 'Flat Rate - Fixed', 'message.sourceId' => 'Magento', 'message.referralSource' => null, 'message.orderLines.array.0.orderNumber.string' => self::$_preconditionsData->getOrderId(), 'message.orderLines.array.0.quantity' => $shipQty, 'message.orderLines.array.0.productSku' => $sku1, 'message.orderLines.array.0.status' => 'SHIPPED', 'message.orderLines.array.1.orderNumber.string' => self::$_preconditionsData->getOrderId(), 'message.orderLines.array.1.quantity' => $shipQty, 'message.orderLines.array.1.productSku' => $sku2, 'message.orderLines.array.1.status' => 'SHIPPED')); $msgs = $this->_get2dXMessages(); $this->verifyXMessage($expectedMsgs, $msgs); }
public function render(Varien_Object $row) { $status_field = Mage::getStoreConfig('rewardpoints/default/status_used', Mage::app()->getStore()->getId()); //rewardpoints_linker //$order_id = $row->getData($this->getColumn()->getIndex()); $order_id = $row->getOrderId(); $points_type = array(Rewardpoints_Model_Stats::TYPE_POINTS_GP, Rewardpoints_Model_Stats::TYPE_POINTS_FB, Rewardpoints_Model_Stats::TYPE_POINTS_PIN, Rewardpoints_Model_Stats::TYPE_POINTS_TT); if (in_array($order_id, $points_type) && $row->getRewardpointsLinker()) { $product = Mage::getModel('catalog/product')->load($row->getRewardpointsLinker()); //if ($product_name = Mage::helper('catalog/output')->productAttribute($product, $product->getName(), 'name')){ if ($product_name = $product->getName()) { return Mage::helper('rewardpoints')->__('Related to product: %s', $product_name); } //return Mage::helper('rewardpoints')->__('Related to product: %s', 'tata'); } return Mage::helper('rewardpoints')->__('- not relevant -'); }
/** * <p>Credit Memo Full Order Return To Stock.</p> * <p>Preconditions:</p> * <p>1.Order is created.</p> * <p>2.Invoice is created * <p>3.The invoice of the order is open in admin * <p>Steps:</p> * <p>1. Click 'Credit Memo' button.</p> * <p>2. Fill product and quantity to credit for.</p> * <p>3. Click 'Refund Offline' button.</p> * <p>Expected result:</p> * <p>Order Update message is sent out.</p> * <p>Stock Item Updated message is send out.</p> * * @test * */ public function creditMemoFullOrderReturnToStock() { //Data $product1 = self::$_preconditionsData->getProduct1(); $sku1 = $product1['general_sku']; $qty1 = self::FULL_ORDER_QTY; $product2 = self::$_preconditionsData->getProduct2(); $sku2 = $product2['general_sku']; $qty2 = self::FULL_ORDER_QTY; $orderId = self::$_preconditionsData->getOrderId(); $creditMemoData = array('product_1' => array('return_filter_sku' => $sku1, 'return_to_stock' => ReturnToStock::YES, 'qty_to_refund' => $qty1), 'product_2' => array('return_filter_sku' => $sku2, 'return_to_stock' => ReturnToStock::NO, 'qty_to_refund' => $qty2)); //Steps $this->_refundOffline($creditMemoData); //Verify $expectedMsgs = array(array("topic" => OrderManagement::ORDER_RETURN, 'message.orderNumber' => $orderId), array("topic" => Inventory::STOCK_ITEM_UPDATED, 'message.stockItems.0.sku' => $sku1, 'message.stockItems.0.quantity' => $product1['inventory_qty'])); $msgs = $this->_get2dXMessages(); $this->verifyXMessage($expectedMsgs, $msgs); }
public function render(Varien_Object $row) { $now = date("Y-m-d H:i:s"); $data = $row->getData($this->getColumn()->getIndex()); $htmlOut = ''; $isDate = ITwebexperts_Payperrentals_Helper_Date::isFilteredDate($data); if (!$isDate || $isDate && strtotime($data) < strtotime($now)) { $button = "<button id=" . $row->getEntityId() . " onclick=\"showLateFeePopup('popup_form_policy',this.id)\")'>Charge Fee</button>"; $lateFee = ITwebexperts_Payperrentals_Helper_LateFeesandReturns::calculateLateFeePriceForOrder($row->getOrderId(), null, null, $now); if ($lateFee > 0) { $lateFee = Mage::helper('core')->currency($lateFee); $htmlOut = $button . '<br />' . $lateFee; } else { $htmlOut = ''; } } return $htmlOut; }
public function assignData($data) { if (!$data instanceof Varien_Object) { $data = new Varien_Object($data); } if ($this->getConfigData('paypage_enabled')) { $info = $this->getInfoInstance(); $info->setAdditionalInformation('paypage_enabled', $data->getPaypageEnabled()); $info->setAdditionalInformation('paypage_registration_id', $data->getPaypageRegistrationId()); $info->setAdditionalInformation('paypage_order_id', $data->getOrderId()); $info->setAdditionalInformation('cc_vaulted', $data->getCcVaulted()); $info->setAdditionalInformation('cc_should_save', $data->getCcShouldSave()); } if ($this->getConfigData('vault_enable')) { $info->setAdditionalInformation('cc_vaulted', $data->getCcVaulted()); $info->setAdditionalInformation('cc_should_save', $data->getCcShouldSave()); } return parent::assignData($data); }
public function render(Varien_Object $row) { return '<a href="' . $this->getUrl('adminhtml/sales_order/view', array('order_id' => $row->getOrderId())) . '" target="_blank" title="' . $this->__('View Order') . '">' . $this->__('View Order') . '</a>'; }
/** * Authorise AUTHENTICATED transaction * @param Varien_Object $trn * @param float $amount Amount to be authoprised * */ public function authorise($trn, $amount) { $invoice = Mage::registry("current_invoice"); if (!is_null($invoice)) { if ($trn->getTrnCurrency() != $invoice->getOrderCurrencyCode()) { $amount = Mage::app()->getStore()->roundPrice($invoice->getBaseGrandTotal()); } } $data = array(); $data['VPSProtocol'] = $trn->getVpsProtocol(); $data['TxType'] = self::REQUEST_TYPE_AUTHORISE; $data['ReferrerID'] = $this->getConfigData('referrer_id'); $data['Vendor'] = $trn->getVendorname(); $data['VendorTxCode'] = substr(time(), 0, 30) . substr($trn->getVendorTxCode(), 0, 10); $data['Amount'] = $this->formatAmount($amount, $trn->getTrnCurrency()); $data['Description'] = '.'; $data['RelatedVPSTxId'] = $trn->getVpsTxId(); $data['RelatedVendorTxCode'] = $trn->getVendorTxCode(); $data['RelatedSecurityKey'] = $trn->getSecurityKey(); $result = $this->requestPost($this->getUrl('authorise', false, $this->_getIntegrationCode($trn->getIntegration()), $trn->getMode()), $data); if ($result['Status'] != 'OK') { Sage_Log::log($result['StatusDetail']); Mage::throwException(Mage::helper('sagepaysuite')->__($result['StatusDetail'])); } $data['Currency'] = $trn->getTrnCurrency(); $actionId = $this->saveAction($trn->getOrderId(), $data, $result); $trn->setAuthorised(1)->save(); return $actionId; }
public function renderExport(Varien_Object $row) { return Mage::helper('mageworx_customerplus')->displayPrices($row->getData('base_discount_amount'), $row->getData('discount_amount'), $row->getOrderId()); }
/** * @param Varien_Object $row * @return mixed */ public function render(Varien_Object $row) { return '<a href="' . Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view', array('order_id' => $row->getOrderId())) . '">' . $row->getIncrementsId() . '</a>'; }
/** * Authorise AUTHENTICATED transaction * @param Varien_Object $trn * @param float $amount Amount to be authoprised * */ public function authorise($trn, $amount) { $data = array(); $data['VPSProtocol'] = $trn->getVpsProtocol(); $data['TxType'] = self::REQUEST_TYPE_AUTHORISE; $data['ReferrerID'] = $this->getConfigData('referrer_id'); $data['Vendor'] = $trn->getVendorname(); $data['VendorTxCode'] = substr(time(), 0, 30) . substr($trn->getVendorTxCode(), 0, 10); $data['Amount'] = $this->formatAmount($amount, $trn->getTrnCurrency()); $data['Description'] = '.'; $data['RelatedVPSTxId'] = $trn->getVpsTxId(); $data['RelatedVendorTxCode'] = $trn->getVendorTxCode(); $data['RelatedSecurityKey'] = $trn->getSecurityKey(); $result = $this->requestPost($this->getUrl('authorise', false, $this->_getIntegrationCode($trn->getIntegration()), $trn->getMode()), $data); if ($result['Status'] != 'OK') { Ebizmarts_SagePaySuite_Log::w($result['StatusDetail']); Mage::throwException($result['StatusDetail']); } $this->saveAction($trn->getOrderId(), $data, $result); $trn->setAuthorised(1)->save(); }
public function renderExport(Varien_Object $_item) { return Mage::helper('mageworx_customerplus')->displayPrices($_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount(), $_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount(), $_item->getOrderId()); }
public function render(Varien_Object $row) { $link = '<a href=' . Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view/order_id/' . $row->getOrderId() . '') . '>View</a>'; return $link; }
/** * Returns the url to the order view page * * @param Varien_Object $row * @return string */ public function render(Varien_Object $row) { $url = Mage::getModel('adminhtml/url')->getUrl('*/sales_order/view/', array('order_id' => $row->getOrderId())); return sprintf('<a href="%s">%s</a>', $url, $row->getOrderIncrementId()); }
public function render(Varien_Object $row) { $urlModel = Mage::getModel('adminhtml/url'); $href = $urlModel->getUrl('adminhtml/sales_order/view', array('_current' => false, 'order_id' => $row->getOrderId())); return sprintf('<a href="%s">%s</a>', $href, $row->getOrderIncrementId()); }