public function setItemPriceCalculated(array &$item, $product_model)
    {
        $calculated = $product_model->calculate($item);

        if ($item['price'] != $calculated) {
            $item['original_price'] = $item['price'];
        }

        $item['price'] = $calculated;
    }
public function setItemPriceCalculated(array &$item, $product_model)
    {
        $calculated = $product_model->calculate($item);

        if ($item['price'] != $calculated) {
            $item['original_price'] = $item['price'];
        }

        $item['price'] = $calculated;
    }
public function setItemPriceCalculated ( array & $ item , $ product_model ) { $ calculated = $ product_model -> calculate ( $ item ) ; if ( $ item [ 'price' ] != $ calculated ) { $ item [ 'original_price' ] = $ item [ 'price' ] ; } $ item [ 'price' ] = $ calculated ; }
Adjust an original price according to applied price rules
@param array $item
@param \gplcart\core\models\Product $product_model
Adjust an original price according to applied price rules