Skip to content

Commit ee8402f

Browse files
EmiproAmol Chaudhari
authored andcommitted
solved fixed price calculation
1 parent cbf2c01 commit ee8402f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/Catalog/Block/Product/View/Options.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*/
2121
class Options extends \Magento\Framework\View\Element\Template
2222
{
23+
/**
24+
* Option type percent
25+
*/
26+
protected static $typePercent = 'percent';
27+
2328
/**
2429
* @var Product
2530
*/
@@ -160,7 +165,8 @@ public function hasOptions()
160165
*/
161166
protected function _getPriceConfiguration($option)
162167
{
163-
$optionPrice = $option->getPrice(true);
168+
$option->getPriceType() == self::$typePercent ? $optionPrice = $option->getPrice(true) :
169+
$optionPrice = $this->pricingHelper->currency($option->getPrice(true), false, false);
164170
$data = [
165171
'prices' => [
166172
'oldPrice' => [

0 commit comments

Comments
 (0)