Skip to content

Commit

Permalink
Merge pull request #61 from sbarbat/master
Browse files Browse the repository at this point in the history
Unit prices for products in checkout transaction
  • Loading branch information
stefandoorn authored Oct 2, 2019
2 parents 21faab7 + baae50d commit ee7b109
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TagManager/AddTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function addTransaction(OrderInterface $order): void
'quantity' => $item->getQuantity(),
'variant' => $item->getVariant()->getName() ?? $item->getVariant()->getCode(),
'category' => $item->getProduct()->getMainTaxon() ? $item->getProduct()->getMainTaxon()->getName() : '',
'price' => $item->getTotal() / 100,
'price' => $item->getUnitPrice() / 100,
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/TagManager/CheckoutStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private function createProduct(OrderItemInterface $item): array
'quantity' => $item->getQuantity(),
'variant' => $item->getVariant()->getName() ?? $item->getVariant()->getCode(),
'category' => $item->getProduct()->getMainTaxon() ? $item->getProduct()->getMainTaxon()->getName() : '',
'price' => $item->getTotal() / 100,
'price' => $item->getUnitPrice() / 100,
];
}
}

0 comments on commit ee7b109

Please sign in to comment.