Example #1
0
 private function addPrefixToOrderNumberIfNeed($orderNumber)
 {
     $prefix = $this->proxyOrder->getOrderNumberPrefix();
     if (empty($prefix)) {
         return $orderNumber;
     }
     return $prefix . $orderNumber;
 }
Example #2
0
 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' => '');
 }
Example #3
0
 /**
  * @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);
 }
Example #4
0
 /**
  * Initialize data for M2E Payment Method
  */
 private function initializePaymentMethodData()
 {
     $quotePayment = $this->quote->getPayment();
     $quotePayment->importData($this->proxyOrder->getPaymentData());
 }
Example #5
0
 public function getBillingAddressData()
 {
     if (!$this->order->isUseGlobalShippingProgram()) {
         return parent::getBillingAddressData();
     }
     return parent::getAddressData();
 }