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.13 app/controllers/workarea/storefront/check_pricing_override.rb
workarea-storefront-3.4.12 app/controllers/workarea/storefront/check_pricing_override.rb