Sha256: 0a091deed31b88db75c6dc0072df06c029e9d64796af0366f995d43a6fabde6e

Contents?: true

Size: 444 Bytes

Versions: 62

Compression:

Stored size: 444 Bytes

Contents

module Workarea
  module Storefront
    module CheckPricingOverride
      def check_pricing_override
        return if current_admin.present?

        override = Pricing::Override.find_or_initialize_by(id: current_order.id)

        if override.has_adjustments?
          flash[:error] = t('workarea.storefront.flash_messages.order_custom_pricing')
          redirect_to cart_path
          return false
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.4.27 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.4 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.26 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.3 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.25 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.2 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.24 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.1 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.23 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.22 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.0 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.21 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.0.beta.1 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.20 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.19 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.18 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.17 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.16 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.15 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.14 app/controllers/workarea/storefront/check_pricing_override.rb