Skip to content

Commit

Permalink
fix(fulfilment): export phonenumber and weight
Browse files Browse the repository at this point in the history
INT-330
  • Loading branch information
joerivanveen committed Jan 16, 2024
1 parent dff8649 commit 655172a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Model/Sales/MagentoOrderCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class MagentoOrderCollection extends MagentoCollection
*/
private $orders = null;

/**
* @var \Magento\Sales\Model\Order
*/
private $order;

/**
Expand Down Expand Up @@ -332,7 +335,7 @@ private function setMagentoOrdersAsExported(): void
}

/**
* @return int
* @return int weight in grams
*/
private function getTotalWeight(): int
{
Expand All @@ -345,10 +348,10 @@ private function getTotalWeight(): int
continue;
}

$totalWeight += $this->helper->convertToGrams($product->getWeight() * $item->getQtyShipped());
$totalWeight += $product->getWeight() * $item->getQtyOrdered();
}

return $totalWeight;
return $this->helper->convertToGrams($totalWeight);
}

/**
Expand Down Expand Up @@ -426,7 +429,8 @@ public function setShippingRecipient(): self
->setStreet($streetParts->getStreet())
->setNumber((string) $streetParts->getNumber())
->setNumberSuffix((string) $streetParts->getNumberSuffix())
->setBoxNumber((string) $streetParts->getBoxNumber());
->setBoxNumber((string) $streetParts->getBoxNumber())
->setPhone($this->order->getShippingAddress()->getTelephone());

return $this;
}
Expand Down

0 comments on commit 655172a

Please sign in to comment.