Jump to content

Recommended Posts

I tried to upgrade Prestashop 1.7.5.2
to Prestashop 1.7.6
PHP Version 7.0.33
Software Version Apache

After upgrade I could view home page and catalog pages but when I tried to view a product page, I would get the following shown in Debug mode:

"Fatal error: Access level to ProductController::$quantity_discounts must be protected (as in class ProductControllerCore) or weaker in /override/controllers/front/ProductController.php on line 262"

I went and viewed the file and line 262 is the last line in the file and only shows the symbol  } 

I disabled all third party modules and still wouldn't work. I had to do a rollback to get my site back up and running.

Any help would be appreciated.

Thank You

Share this post


Link to post
Share on other sites
5 hours ago, RDS52 said:

I tried to upgrade Prestashop 1.7.5.2
to Prestashop 1.7.6
PHP Version 7.0.33
Software Version Apache

After upgrade I could view home page and catalog pages but when I tried to view a product page, I would get the following shown in Debug mode:

"Fatal error: Access level to ProductController::$quantity_discounts must be protected (as in class ProductControllerCore) or weaker in /override/controllers/front/ProductController.php on line 262"

I went and viewed the file and line 262 is the last line in the file and only shows the symbol  } 

I disabled all third party modules and still wouldn't work. I had to do a rollback to get my site back up and running.

Any help would be appreciated.

Thank You

In Prestashop 1.7.6 frontend Product Controller /controllers/front/ProductController.php have $quantity_discounts variable as protected.

line 52 protected $quantity_discounts;

but in PrestaShop 1.7.5.2 frontend Product Controller /controllers/front/ProductController.php have the same variable as private. 

line 50 private $quantity_discounts;

By default after upgrade product file will be replaced and would be fine. So it seems that your override file /override/controllers/front/ProductController.php

still have that variable with private $quantity_discounts;

Please check your override file /override/controllers/front/ProductController.php and make it protected $quantity_discounts;

It should be fine after that.

Let us know if issue still there.

Thanks

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you very much, that worked, my website is now working with 1.7.6.

But I do have one more problem, when I now click on, "Active Shopping Carts" from the back office I get:

Bad SQL query
Table 'name hidden' doesn't exist

Name Hidden - I put there because I don't know if it is safe to show my DB name on this forum. But it does show the right name there when I try to go into that area.

When I add a item to my shopping cart it will show "1" Active Shopping Cart under the dashboard until I click on it and go into that page. I can click on "Online Visitors" and it goes to the page and it don't show the error.

Thank You

Share this post


Link to post
Share on other sites
8 hours ago, RDS52 said:

Thank you very much, that worked, my website is now working with 1.7.6.

But I do have one more problem, when I now click on, "Active Shopping Carts" from the back office I get:

Bad SQL query
Table 'name hidden' doesn't exist

Name Hidden - I put there because I don't know if it is safe to show my DB name on this forum. But it does show the right name there when I try to go into that area.

When I add a item to my shopping cart it will show "1" Active Shopping Cart under the dashboard until I click on it and go into that page. I can click on "Online Visitors" and it goes to the page and it don't show the error.

Thank You

Bad SQL query Table 'name hidden' doesn't exist.

Message simply means that a table is missing that was used in any query at present.

So please go to database of prestashop and check that table name, if not there create that from your old prestashop database and after that it should be fine.

let us know if still any issue

  • Like 2

Share this post


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

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