Skip to content

Commit

Permalink
solved fixed price calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Emipro authored and Amol Chaudhari committed Feb 15, 2019
1 parent cbf2c01 commit ee8402f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/code/Magento/Catalog/Block/Product/View/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
*/
class Options extends \Magento\Framework\View\Element\Template
{
/**
* Option type percent
*/
protected static $typePercent = 'percent';

/**
* @var Product
*/
Expand Down Expand Up @@ -160,7 +165,8 @@ public function hasOptions()
*/
protected function _getPriceConfiguration($option)
{
$optionPrice = $option->getPrice(true);
$option->getPriceType() == self::$typePercent ? $optionPrice = $option->getPrice(true) :
$optionPrice = $this->pricingHelper->currency($option->getPrice(true), false, false);
$data = [
'prices' => [
'oldPrice' => [
Expand Down

0 comments on commit ee8402f

Please sign in to comment.