Skip to content

Conversation

@gelanivishal
Copy link
Contributor

@gelanivishal gelanivishal commented Jul 25, 2018

Original Pull Request

#15276

Description

Method name \Magento\Catalog\Model\Product\Option\Type::_getChargableOptionPrice contained typo.

Renamed it to _getChargeableOptionPrice.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

* @param boolean $isPercent Price type - percent or fixed
* @param float $basePrice For percent price type
* @return float
* @deprecated 102.0.4 typo in method name
Copy link
Contributor

Choose a reason for hiding this comment

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

This is incorrect module version for 2.1 release line

* @param float $basePrice For percent price type
* @return float
*/
protected function _getChargeableOptionPrice($price, $isPercent, $basePrice)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would make sense to remove underscore, if renaming method anyway.

@gelanivishal
Copy link
Contributor Author

@ishakhsuvarov I have performed requested changes.

$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

* @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

$_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 = $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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants