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.15 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.36 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.14 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.35 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.13 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.34 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.12 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.33 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.11 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.10 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.32 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.9 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.31 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.8 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.30 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.7 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.29 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.6 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.28 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.5.5 app/controllers/workarea/storefront/check_pricing_override.rb