Prestashop: problems with product combinations

Created on 15 Oct 2019  路  4Comments  路  Source: PrestaShop/PrestaShop

The Prestashop version is 1.7.6.1, the default language is Romanian and the default currency is RON. When the product does not have combinations everything works fine, when the combinations are added there is thrown an 500 error: An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Object of class Currency could not be converted to string").
Firefox_Screenshot_2019-10-14T21-54-26 412Z

The issue can be found in the file src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Forms/form_combination.html.twig (line 32) ( {{ default_currency }}) and anytime the default currency is requested in the file (for the price).

The php file that is generated from the twig file contains the following text "($context["default_currency"] ?? $this->getContext($context, "default_currency"))". When the text is replaced with "RON" everything works fine again (at least until the cache is erased and / or debug mode is off).

1.7.6.1 BO Bug Combinations No change required Products

Most helpful comment

First of all, sorry for my english.

I solve this issue updating some fields in my database, specifically in ps_currency_lang.

image

image

Obviously this depend on your languages and currencies. I hope this can helped somebody.

All 4 comments

Hi @supravirtual,

I did not manage to reproduce the issue with PS1.7.6.1.
I attached a screen record
https://drive.google.com/file/d/1w3lVysDqQjbY80Re0zaqB1duNtYlpNBC/view
Could you please provide us with more info? We need more details to understand how we can reproduce your issue:

  • server setup and configuration
  • PrestaShop version (source)
  • debug mode report
  • PHP error logs
  • apache error log
  • javascript console log

Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/

Thanks!

I believe i found the bug. I have the same problem on a shop.
I have English and Norvegian languages installed on the shop but set active only norvegian.
I keep english only for admin setup.
When i set my user language to display English i have the same situation reported by @supravirtual and when i switch my user language to NO is working correctly.

PS Version is 1.7.6.1

First of all, sorry for my english.

I solve this issue updating some fields in my database, specifically in ps_currency_lang.

image

image

Obviously this depend on your languages and currencies. I hope this can helped somebody.

Was this page helpful?
0 / 5 - 0 ratings