OrderItem::Total PHP Method

Total() public method

Get calculated total, or stored total depending on whether the order is in cart
public Total ( )
    public function Total()
    {
        if ($this->Order()->IsCart()) {
            //always calculate total if order is in cart
            return $this->calculatetotal();
        }
        return $this->CalculatedTotal;
        //otherwise get value from database
    }