File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,11 @@ public function mapByProduct(ProductInterface $product): array
82
82
} catch (NoSuchEntityException $ noSuchEntityException ) {
83
83
}
84
84
85
- $ productData ['price ' ] = $ this ->priceFormatter ->format ((float )$ product ->getFinalPrice ());
85
+ $ productData ['price ' ] = $ this ->priceFormatter ->format ((float ) $ product ->getPriceInfo ()->getPrice (FinalPrice::PRICE_CODE )->getValue ());
86
+ if ($ product ->getCustomOption ('simple_product ' ) && $ product ->getCustomOption ('simple_product ' )->getProduct ()) {
87
+ $ simpleProduct = $ product ->getCustomOption ('simple_product ' )->getProduct ();
88
+ $ productData ['price ' ] = $ this ->priceFormatter ->format ((float ) $ simpleProduct ->getPriceInfo ()->getPrice (FinalPrice::PRICE_CODE )->getValue ());
89
+ }
86
90
87
91
$ productData = $ this ->attachCategoriesData ($ product , $ productData );
88
92
$ productData = $ this ->parseDataLayerMapping ($ product , $ productData );
You can’t perform that action at this time.
0 commit comments