Jump to content

Admin Cart gives error 500 when trying to use it


Recommended Posts

Hello folks. 

im bit new to this Prestashop and i have a problem that i cant solve.

in admin panel side, when i try to access Cart (orders-cart) it gives me this error:

Exeption tab:

PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException

in src/Core/Localization/Locale.php (line 171)

    public function getPriceSpecification($currencyCode)

    {

        $currencyCode = (string) $currencyCode;

        $priceSpec = $this->priceSpecifications->get($currencyCode);

        if (null === $priceSpec) {

            throw new LocalizationException(

                'Price specification not found for currency: "' . $currencyCode . '"'

            );

        }

        return $priceSpec;

LOGS tab:

 

DEBUG13:57:49 doctrine SELECT name FROM psrf_module WHERE active = 1

CRITICAL13:57:49 php Uncaught Exception: Price specification not found for currency: ""

CRITICAL13:57:49requestUncaught PHP Exception PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException: "Price specification not found for currency: """ at /home/santaspb/public_html/src/Core/Localization/Locale.php line 171

 

Any idea what is wrong with it? using 1.7.6.0 version (updating did not solve it so rolled back to previous) language is finnish and currencies Euro

 

Share this post


Link to post
Share on other sites

I had the same issue, resolved it by following this: https://github.com/PrestaShop/PrestaShop/issues/14595 I had to create another currency and disable the default, then re-enable the deault, and making the new currency inactive. Secondly I edited the database currency table precision 6 to 2 decimal places. 

Edited by jetx
typo (see edit history)

Share this post


Link to post
Share on other sites
  • 9 months later...

This problem happened to me, after moving a store to another server through a module.
Apparently there was a conflict with the currency.


The solution that worked for me was to edit the ps_configuration table, in PS_CURRENCY_DEFAULT: (put the value of the default currency)

 

I hope I can serve someone else.

Edited by aaeq16 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites
  • 8 months later...

I have the same problem, after migrate from 1.6.

I found out that there where two entry of PS_CURRENCY_DEFAULT in ps_configuration. I null the one but the problem still persist.

Share this post


Link to post
Share on other sites

ok I found the solution.

I was getting the error:

Price specification not found for currency: ""
[PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException 0]

when I was trying to view the order page, after I reorder so the first would be the oldest.

I find out that in column ID_currency there was several values 0, that didn't exist.
I change the value to 1 (my default currency) and the problem solved.

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 2 weeks later...
On 1/11/2021 at 8:18 AM, lordshop said:

ok I found the solution.

I was getting the error:

Price specification not found for currency: ""
[PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException 0]

when I was trying to view the order page, after I reorder so the first would be the oldest.

I find out that in column ID_currency there was several values 0, that didn't exist.
I change the value to 1 (my default currency) and the problem solved.

Hi, i'm having the same issue, in which table did you changed this value?

Share this post


Link to post
Share on other sites

 

9 hours ago, gustavoTorres said:

Hi, i'm having the same issue, in which table did you changed this value?

hello, the table you should check is ps_orders try to run

SELECT `id_order`,`reference`,`id_currency` FROM `ps_orders` WHERE `id_currency`=0

 

Share this post


Link to post
Share on other sites
  • 1 month later...
On 1/20/2021 at 8:25 AM, lordshop said:

 

hello, the table you should check is ps_orders try to run


SELECT `id_order`,`reference`,`id_currency` FROM `ps_orders` WHERE `id_currency`=0

 

and do you know how to give the order to make the massive change through the database in the orders?

Share this post


Link to post
Share on other sites
On 2/21/2021 at 2:25 PM, juanrojas said:

and do you know how to give the order to make the massive change through the database in the orders?

You can edit them one by one or with an SQL update. Please note that if you are not familiar with SQL update you can make serious damage to your database. Backup first.

UPDATE ps_orders SET `id_currency`=1 WHERE `id_currency`=0

=1     :You need to be sure to put your correct ID_Currency. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More