Hello,
Every 7 days, I encountered the same error at log level which is the following error:
AH01071: Got error 'PHP message: PHP Fatal error: Access level to ProductController :: $ quantity_discounts must be protected (as in class ProductControllerCore) or weaker in /htdocs/xxx.com/override/controllers/front/ProductController.php on line 229 \ n ', referer: https://xxx.com/index.php?category_rewrite=our-products&controller=category
renaming the file to ProductController.old and then renaming it back to initial, it no longer has the 500 error.
I do not understand why every 7 days there is the same mistake?
Thanks in advance ,
Regards ,
Same here, I changed private to protected and works fine
Same here, I changed private to protected and works fine
hello, I do not order you, you tell me what? thank you in advance, best regards
Hi @jasonchemama,
Could you please provide us with more info? We need more details to understand how we can reproduce your issue:
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!
Hi @jasonchemama,
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
- screenshots
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!
hello, here are the infos




@jasonchemama, you have an override of the Productcontroller.phpwith a fatal error.

You check this override is provided by each module & check the issue with module author.
Thanks to check & feedback.
@jasonchemama, you have an override of the
Productcontroller.phpwith a fatal error.
You check this override is provided by each module & check the issue with module author.
Thanks to check & feedback.
can you see in the file? here is the file: thanks in advance
net2ftp-1563802959.zip
@jasonchemama, I couldn't extract your file.
There was an error with this zip file.
Thanks to check & feedback.
@jasonchemama, I couldn't extract your file.
There was an error with this zip file.
Thanks to check & feedback.
here is line 229

@jasonchemama, this is your file overrode?
Thanks!
@jasonchemama, this is your file overrode?
Thanks!
I do not understand you, what is it? thanks in advance
@jasonchemama, the screenshot provided in your previous comment, is from your override file Productcontroller.php?
Thanks!
@jasonchemama, the screenshot provided in your previous comment, is from your override file
Productcontroller.php?Thanks!
Yes, Thanks
Hey!
If we see the first post the error is
/htdocs/xxx.com/override/controllers/front/ProductController.php
So that override controller has $quantity_discounts (in my case in line 28), I changed
private $quantity_discounts;
to
protected $quantity_discounts;
Can you try to do this?
Regards
Edit: in original file located in controllers / front / ProductController.php that attribute has been declared as protected
Hey!
If we see the first post the error is
/htdocs/xxx.com/override/controllers/front/ProductController.php
So that override controller has $quantity_discounts (in my case in line 28), I changed
private $quantity_discounts;
to
protected $quantity_discounts;Can you try to do this?
Regards
Edit: in original file located in controllers / front / ProductController.php that attribute has been declared as protected
I can not find line 28 to change.

Regards
Line 28 in /htdocs/xxx.com/override/controllers/front/ProductController.php remember in folder override attribute $quantity_discounts.
Regards
I do not understand you. I'm sorry, I'm a beginner. What do I do with that?
I do not understand you. I'm sorry, I'm a beginner. What do I do with that?
Don't worry, go to /htdocs/xxx.com/override/controllers/front/ProductController.php look for the following line:
private $quantity_discounts
and change it to
protected $quantity_discounts
@jasonchemama,
Your issue is not a PrestaShop's core bug but a customization problem (override/controllers/front/ProductController.php)
I close the issue, feel free to open a new one when needed.
Thanks!
Yes it works, thank you very much
Have a good day
cordially