Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yireo/Yireo_GoogleTagManager2
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Nov 12, 2024
2 parents 1428308 + 9833ce1 commit d8d7d56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DataLayer/Mapper/ProductDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ public function mapByProduct(ProductInterface $product): array
} catch (NoSuchEntityException $noSuchEntityException) {
}

$productData['price'] = $this->priceFormatter->format((float)$product->getFinalPrice());
$productData['price'] = $this->priceFormatter->format((float) $product->getPriceInfo()->getPrice(FinalPrice::PRICE_CODE)->getValue());
if ($product->getCustomOption('simple_product') && $product->getCustomOption('simple_product')->getProduct()) {
$simpleProduct = $product->getCustomOption('simple_product')->getProduct();
$productData['price'] = $this->priceFormatter->format((float) $simpleProduct->getPriceInfo()->getPrice(FinalPrice::PRICE_CODE)->getValue());
}

$productData = $this->attachCategoriesData($product, $productData);
$productData = $this->parseDataLayerMapping($product, $productData);
Expand Down

0 comments on commit d8d7d56

Please sign in to comment.