def update_subtotal
      if self.unit_price.nil?
        self.unit_price = self.variant.on_sale? ? self.variant.sale_price : self.variant.price        
      end      
      self.subtotal = self.unit_price * self.quantity
    end
def update_subtotal
      if self.unit_price.nil?
        self.unit_price = self.variant.on_sale? ? self.variant.sale_price : self.variant.price        
      end      
      self.subtotal = self.unit_price * self.quantity
    end
Methods