public function getPrice flag false if flag this- getPriceType percent

1
2
3
4
5
6
7
8
9
public function getPrice($flag=false)
{
if ($flag && $this->getPriceType() == 'percent') {
$basePrice = $this->getProduct()->getFinalPrice();
$price = $basePrice*($this->_getData('price')/100);
return $price;
}
return $this->_getData('price');
}