Class PricingCurrencyHelper


  • public class PricingCurrencyHelper
    extends Object
    Author:
    Chad Harchar (charchar)
    • Constructor Detail

      • PricingCurrencyHelper

        public PricingCurrencyHelper()
    • Method Detail

      • setAllowedCurrencyForLocale

        public void setAllowedCurrencyForLocale​(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo,
                                                com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext)
        If there's no currency set for the incoming price context, determine the currency based on the context info's locale. Verify that the determined currency is an "allowed" currency for the application, otherwise use the default currency.
        Parameters:
        contextInfo - The context against which to check locale
        priceContext - The price context on which to set the currency