Skip to content

Commit 1649b22

Browse files
authored
Merge pull request #41 from ivanhrytsaim/12277-Error-displays-on-category-and-PDP-pages
12277-Error-displays-on-category-and-PDP-pages
2 parents 519802b + 8eb3060 commit 1649b22

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

Model/AbstractDataLayer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ protected function getPrice(Product $product): float
258258
{
259259
$priceInfo = $product->getPriceInfo()->getPrice('final_price')->getAmount();
260260
$price = $priceInfo->getValue();
261-
return $this->formatPrice($price);
261+
return $this->formatPrice((float)$price);
262262
}
263263

264264
/**
@@ -274,7 +274,7 @@ protected function getProductValue($product): float
274274
$value = $priceInfo->getValue();
275275
}
276276

277-
return $this->formatPrice($value);
277+
return $this->formatPrice((float)$value);
278278
}
279279

280280
/**

Model/DataLayer/AbstractOrder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected function getValue(Order $order): float
8888
$orderValue -= $order->getShippingAmount();
8989
}
9090

91-
return $this->formatPrice($orderValue);
91+
return $this->formatPrice((float)$orderValue);
9292
}
9393

9494
/**

Model/DataLayer/BeginCheckout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function get(Quote $quote): array
6464
'event' => 'begin_checkout',
6565
'ecommerce' => [
6666
'currency' => $this->getCurrentCurrencyCode(),
67-
'value' => $this->formatPrice($value),
67+
'value' => $this->formatPrice((float)$value),
6868
'coupon' => $quote->getCouponCode() ?: '',
6969
'items' => $items
7070
],

Model/DataLayer/Cart/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function getValue(QuoteItem $quoteItem): float
5353
if (!$value && ($quoteItemProduct = $quoteItem->getProduct())) {
5454
return $this->getProductValue($quoteItemProduct);
5555
} else {
56-
return $this->formatPrice($value);
56+
return $this->formatPrice((float)$value);
5757
}
5858
}
5959
}

Model/DataLayer/Order/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ protected function getValue(OrderItemInterface $orderItem): float
4545
$value = (float)$orderItem->getPrice();
4646
}
4747

48-
return $this->formatPrice($value);
48+
return $this->formatPrice((float)$value);
4949
}
5050
}

Model/DataLayer/ViewCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function get(Quote $quote): array
6666
'event' => 'view_cart',
6767
'ecommerce' => [
6868
'currency' => $this->getCurrentCurrencyCode(),
69-
'value' => $this->formatPrice($value),
69+
'value' => $this->formatPrice((float)$value),
7070
'items' => $items
7171
],
7272
'items_count' => count($items),

0 commit comments

Comments
 (0)