Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public function getOptionPrice($optionValue, $basePrice)
{
$option = $this->getOption();

return $this->_getChargableOptionPrice($option->getPrice(), $option->getPriceType() == 'percent', $basePrice);
return $this->_getChargeableOptionPrice($option->getPrice(), $option->getPriceType() == 'percent', $basePrice);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method _getChargeableOptionPrice does not exist

}

/**
Expand Down Expand Up @@ -389,14 +389,26 @@ public function getProductOptions()
}

/**
* Return final chargable price for option
*
* @param float $price Price of option
* @param boolean $isPercent Price type - percent or fixed
* @param float $basePrice For percent price type
* @return float
* @see _getChargeableOptionPrice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method _getChargeableOptionPrice does not exist

*/
protected function _getChargableOptionPrice($price, $isPercent, $basePrice)
{
return $this->getChargeableOptionPrice($price, $isPercent, $basePrice);
}

/**
* Return final chargeable price for option
*
* @param float $price Price of option
* @param boolean $isPercent Price type - percent or fixed
* @param float $basePrice For percent price type
* @return float
*/
protected function getChargeableOptionPrice($price, $isPercent, $basePrice)
{
if ($isPercent) {
return $basePrice * $price / 100;
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function getOptionPrice($optionValue, $basePrice)
foreach (explode(',', $optionValue) as $value) {
$_result = $option->getValueById($value);
if ($_result) {
$result += $this->_getChargableOptionPrice(
$result += $this->_getChargeableOptionPrice(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method _getChargeableOptionPrice does not exist

$_result->getPrice(),
$_result->getPriceType() == 'percent',
$basePrice
Expand All @@ -237,7 +237,7 @@ public function getOptionPrice($optionValue, $basePrice)
} elseif ($this->_isSingleSelection()) {
$_result = $option->getValueById($optionValue);
if ($_result) {
$result = $this->_getChargableOptionPrice(
$result = $this->_getChargeableOptionPrice(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method _getChargeableOptionPrice does not exist

$_result->getPrice(),
$_result->getPriceType() == 'percent',
$basePrice
Expand Down