public function calculate(array $product, array $options = array())
    {
        $options += array(
            'status' => 1,
            'store_id' => $product['store_id']
        );

        $components = array();
        $total = $product['price'];

        foreach ($this->price_rule->getTriggered($product, $options) as $price_rule) {
            $this->price_rule->calculate($total, $product, $components, $price_rule);
        }

        return $total;
    }
public function calculate(array $product, array $options = array())
    {
        $options += array(
            'status' => 1,
            'store_id' => $product['store_id']
        );

        $components = array();
        $total = $product['price'];

        foreach ($this->price_rule->getTriggered($product, $options) as $price_rule) {
            $this->price_rule->calculate($total, $product, $components, $price_rule);
        }

        return $total;
    }
public function calculate ( array $ product , array $ options = array ( ) ) { $ options += array ( 'status' => 1 , 'store_id' => $ product [ 'store_id' ] ) ; $ components = array ( ) ; $ total = $ product [ 'price' ] ; foreach ( $ this -> price_rule -> getTriggered ( $ product , $ options ) as $ price_rule ) { $ this -> price_rule -> calculate ( $ total , $ product , $ components , $ price_rule ) ; } return $ total ; }
Calculates the product price
@param array $product
@param array $options
@return int
Calculates the product price