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.5.27 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.26 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.45 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.25 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.23 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.44 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.22 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.43 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.21 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.42 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.20 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.41 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.19 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.40 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.18 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.39 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.17 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.38 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.16 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.37 app/controllers/workarea/storefront/check_pricing_override.rb