The admin panel hangs at the input of opencart
Logon error in admin panel opencart
πŸ’Ό Creation of modern websites of any complexity. | πŸ‘Œ WEB-UKRAINE.COM

The admin panel hangs at the input of opencart

5/51 rating

Recently, very often the situation is that when you try to enter the admin panel of the online store on the opencart page freezes and then issues a variety of errors, for example, you may receive a 500 or 504 error, that is, the timeout has worked and the connection has been reset.

What is the reason for the error in logging in to the admin panel of Opencart?

It's simple, if you have several types of currencies in the store, then you want the exchange rate to be updated automatically, there is a special function that updates the exchange rate from the Yahoo service at every login to the store admin area. You can either enable automatic updating or turn it off.

If you have automatic updating of currencies in opencart is turned on then your store tries to update the exchange rate when entering the admin panel and refers to the above service, which just causes this error.

If you do not need to automatically update the exchange rate, you change the exchange rate yourself, the simplest solution is to turn off currency updates in the admin panel of opencart. But since you can not enter the admin panel to disable it, just go to any other section, and after you go to the settings and turn off the update, for example, you can go to the category page like this:

Since the example specifies a completely different token, you will be asked to authorize again, after authorization, you will immediately go to the category section, after you go to the settings and in the localization section turn off the Automatic currency update, the page will probably hang again, but you will not be affected by the settings you can already log in as usual.

But what if automatic currency updates are important to you?

In this case, there are several options for fixing this situation, and now we will look at each of the methods how to fix the error in entering the admin panel in opencart.

1. And so, we will consider the first variant of the decision of problems with an input in the admin panel:

Our task is to make changes to the file /admin/model/localisation/currency.php, we need to add return to the call request. (PS: return returns the result of the function's operation to the place where it was called.)

And so we opened the above file and find in it about 104 lines:

and immediately under this line we insert:

That is, we completely disable automatic currency updates. (For those to whom the automatic update still needs this method is not suitable).

Please note - that in some versions the code may differ slightly, for example the above function updateCurrencies can be without $force = false, but it's not important and return is still inserted under this function.



2. Now let's look at the second option for solving the problems of entering the admin panel of the store.

In this example, we specify the time when, in the case of a freeze, the update from Yahoo breaks and skips the update attempt and immediately proceeds to the administrative panel of the store. For this method, open the same file /admin/model/localisation/currency.php and in it we find the line:

And immediately after it we insert:

3. Well, the most recent third option will not be editing and adjusting for the Yahoo service, but completely changing the automatic updating of the opencart exchange rates from Yahoo to the CBRF. That is now Opencart will be updated from the courses of the Central Bank of Russia.

This method was kindly provided by one of the users of the Russian-language forum Opencart.

And so, in order to update the currency exchange rates with the CBRF in opencart, you will need all the same /admin/model/localisation/currency.php, only we will not change some parts of the code in it but delete everything completely and replace it with it all the contents of the code below:

Now every time you enter the administrative panel of the store, the site will update the exchange rate from the XML file that is generated by the central bank of Russia.

PS: Note, to use this method, you must have PHP modules such as curl and simplexml on your hosting.

Well, that's all, now you know how to overcome the error in entering the admin panel associated with updating the exchange rate. Good luck to you.

You may also like

No Comment

You can post first response comment.

Leave a Reply

Π’ΠΈΠ±Π΅Ρ€Ρ–Ρ‚ΡŒ спосіб спілкування
Звязатися Π· Π½Π°ΠΌΠΈ!
Ми Π³ΠΎΡ‚ΠΎΠ²Ρ– Π΄ΠΎ Π΄Ρ–Π°Π»ΠΎΠ³Ρƒ.