private function addPrefixToOrderNumberIfNeed($orderNumber) { $prefix = $this->proxyOrder->getOrderNumberPrefix(); if (empty($prefix)) { return $orderNumber; } return $prefix . $orderNumber; }
public function getBillingAddressData() { if ($this->order->getAmazonAccount()->isMagentoOrdersBillingAddressSameAsShipping()) { return parent::getBillingAddressData(); } if ($this->order->getShippingAddress()->hasSameBuyerAndRecipient()) { return parent::getBillingAddressData(); } $customerNameParts = $this->getNameParts($this->order->getBuyerName()); return array('firstname' => $customerNameParts['firstname'], 'lastname' => $customerNameParts['lastname'], 'country_id' => '', 'region' => '', 'region_id' => '', 'city' => 'The Amazon does not supply the complete billing buyer information.', 'postcode' => '', 'street' => array(), 'company' => ''); }
/** * @param Ess_M2ePro_Model_Order_Item_Proxy[] $items * @throws Exception */ protected function mergeItems(array &$items) { foreach ($items as $key => $item) { if ($item->getPrice() <= 0) { unset($items[$key]); } } if (count($items) == 0) { throw new Exception('Every item in order has zero price.'); } parent::mergeItems($items); }
/** * Initialize data for M2E Payment Method */ private function initializePaymentMethodData() { $quotePayment = $this->quote->getPayment(); $quotePayment->importData($this->proxyOrder->getPaymentData()); }
public function getBillingAddressData() { if (!$this->order->isUseGlobalShippingProgram()) { return parent::getBillingAddressData(); } return parent::getAddressData(); }