Jump to content

Admin Cart gives error 500 when trying to use it


Crossbones

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

 

Link to comment
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)
Link to comment
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
Link to comment
Share on other sites

  • 8 months later...

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 3
Link to comment
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?

Link to comment
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

 

  • Like 1
Link to comment
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?

  • Like 1
Link to comment
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. 

  • Like 1
Link to comment
Share on other sites

  • 6 months later...
On 1/11/2021 at 4:18 PM, 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.

This solution worked for us also! Thanks @lordshop.

In ps_order table, id_curency column, there was some values set to "0". We changed those values from "0" to "1" because these is shop default curency ID, and the problem was solved: https://ibb.co/qyV4Rzn

Selection_010.png

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 1 month later...
On 1/11/2021 at 6:18 PM, 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.

Thanks a lot, you saved us from lots of trouble.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

Hi, 

It seems that you have a bugged cart wich has an address assigned Id_address 626, and that address is not existing on the database. Here you can either recreate that address in the database or delete the cart with address 626.

Hope I could help, 

Have a nice day, Leo. 

Link to comment
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...