You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Volume prices only working when Item Total is less than 0.
In this example the item master price is $20.
Here a discount of $2 should be applied to the order but it isn't.
Now, when the discount is greater than the master price (item total is less than 0) everything works
The text was updated successfully, but these errors were encountered:
But I don't really understand what are these of lines for:
old_copy_price = instance_method(:copy_price)
define_method(:copy_price) do
old_copy_price.bind(self).call
return unless variant
if changed? && changes.keys.include?('quantity')
vprice = variant.volume_price(quantity, order.user)
if price.present? && vprice <= variant.price
self.price = vprice and return
end
end
self.price = variant.price if price.nil?
end
Volume prices only working when Item Total is less than 0.
In this example the item master price is $20.
Here a discount of $2 should be applied to the order but it isn't.
Now, when the discount is greater than the master price (item total is less than 0) everything works
The text was updated successfully, but these errors were encountered: