Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with product combinations #15946

Closed
supravirtual opened this issue Oct 14, 2019 · 4 comments
Closed

problems with product combinations #15946

supravirtual opened this issue Oct 14, 2019 · 4 comments
Labels
1.7.6.1 Affects versions BO Category: Back Office Bug Type: Bug Combinations Product type: issue about products with combinations No change required Resolution: issue closed because expected as is Old Products Page Concerns the old product page

Comments

@supravirtual
Copy link

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).

@khouloudbelguith
Copy link
Contributor

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!

@khouloudbelguith khouloudbelguith added 1.7.6.1 Affects versions BO Category: Back Office Combinations Product type: issue about products with combinations NMI Status: issue needs more information Old Products Page Concerns the old product page Bug Type: Bug labels Oct 15, 2019
@khouloudbelguith khouloudbelguith added No change required Resolution: issue closed because expected as is and removed NMI Status: issue needs more information labels Oct 15, 2019
@danvaly
Copy link

danvaly commented Oct 25, 2019

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

@khouloudbelguith
Copy link
Contributor

@jnfDev
Copy link

jnfDev commented Nov 28, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.6.1 Affects versions BO Category: Back Office Bug Type: Bug Combinations Product type: issue about products with combinations No change required Resolution: issue closed because expected as is Old Products Page Concerns the old product page
Projects
None yet
Development

No branches or pull requests

4 participants