Currency not published issue

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi to all,

I'm working to configure a site and decided to not publish the currency on products and also disable cart as intended to use nopCommerce initially as a catalog.
Unticked published in Configuration/Currency and for every product shown I got an error in the following call in CurrencyService due to targetCurrencyCode is not initialized (null):

        public virtual decimal ConvertCurrency(decimal amount, Currency sourceCurrencyCode, Currency targetCurrencyCode)
        {
            decimal result = amount;
            if (sourceCurrencyCode.Id == targetCurrencyCode.Id) here is the issue
                return result;
            if (result != decimal.Zero && sourceCurrencyCode.Id != targetCurrencyCode.Id)
            {
                result = ConvertToPrimaryExchangeRateCurrency(result, sourceCurrencyCode);
                result = ConvertFromPrimaryExchangeRateCurrency(result, targetCurrencyCode);
            }
            return result;
Any suggestions?
Thank you in advance.
12 years ago
At east one currency should be published. If you want to have a catalog mode, then just go to Admin area > Configuration > Access Control List and disable the following permissions:
"Public store. Display Prices", "Public store. Enable shopping cart", and "Public store. Enable wishlist"
12 years ago
Tank you so much Andrei.
The issue is that nopCommerce is so versatile and complete that it takes time and knowledge to teach.

Great application.

Ciao.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.