Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

SD-892 Fix CC issues

Krzysztof Kalisz0fadab6212b6
diff --git a/frontend/app/helpers/spree/orders_helper.rb b/frontend/app/helpers/spree/orders_helper.rb
index ae4b2e3b99..1af823ff16 100644
--- a/frontend/app/helpers/spree/orders_helper.rb
+++ b/frontend/app/helpers/spree/orders_helper.rb
@@ -3,11 +3,12 @@ module Spree
def order_just_completed?(order)
flash[:order_completed] && order.present?
end
+
def order_has_free_shipping?(order)
- order.promotions
- .joins(:promotion_actions)
- .where(spree_promotion_actions: { type: 'Spree::Promotion::Actions::FreeShipping'})
- .exists?
+ order.promotions.
+ joins(:promotion_actions).
+ where(spree_promotion_actions: { type: 'Spree::Promotion::Actions::FreeShipping' }).
+ exists?
end
end
end