diff -u b/src/Plugin/migrate/source/ubercart/d6/Order.php b/src/Plugin/migrate/source/ubercart/d6/Order.php --- b/src/Plugin/migrate/source/ubercart/d6/Order.php +++ b/src/Plugin/migrate/source/ubercart/d6/Order.php @@ -86,6 +86,7 @@ $row->setSourceProperty('commerce_shipping', $this->moduleHandler->moduleExists('commerce_shipping')); $row->setSourceProperty('adjustments', $this->getAdjustmentData($row)); + $row->setSourceProperty('currency', $this->getUbercartCurrency()); return parent::prepareRow($row); } @@ -102,7 +103,7 @@ $order_id = $row->getSourceProperty('order_id'); $query = $this->select('uc_order_line_items', 'uol') ->fields('uol') - ->fields('uo', ['order_id', 'currency']) + ->fields('uo', ['order_id']) ->orderBy('weight', 'ASC') ->condition('uol.order_id', $order_id); $query->innerJoin('uc_orders', 'uo', 'uol.order_id = uo.order_id'); @@ -123,2 +124,17 @@ + /** + * Gets the Ubercart global currency. + * + * @return string + * The currency. + */ + public function getUbercartCurrency() { + static $currency; + + if (empty($currency)) { + $currency = $this->variableGet('uc_currency_code', 'USD'); + } + return $currency; + } + }