PrestaShop 9 errors
PrestaShop 9 errors, one by one.
Each page explains one error message: what PrestaShop or PHP removed, what to write instead, and where else in your store the same problem is likely to sit.
-
Call to undefined method Tools::displayPrice()PrestaShop 9 removed Tools::displayPrice(). Any module or override that formats a price with it stops with a fatal error. Here is the replacement and where to look.
Removed in PrestaShop 9.0 · Modules, overrides →
-
Call to undefined method MyModuleAjaxModuleFrontController::ajaxDie()PrestaShop 9 removed ajaxDie() from controllers. Module AJAX actions that answered with it now fail, and buttons, filters or forms silently stop working.
Removed in PrestaShop 9.0 · Module front and admin controllers →
-
Call to undefined method Tools::jsonEncode()Tools::jsonEncode() and Tools::jsonDecode() were removed in PrestaShop 8.0. Stores that jump from 1.7 straight to 9 meet this error in older modules. The fix is one line.
Removed in PrestaShop 8.0 · Older modules, overrides →
-
Call to undefined method Attribute::getAttributes()PrestaShop 8 renamed the Attribute class to ProductAttribute, because PHP 8 has its own Attribute class. Old code that calls Attribute:: now reaches PHP's class and fails.
Removed in PrestaShop 8.0 · Modules that handle combinations, overrides →
-
Class "Swift_Message" not foundPrestaShop 9 replaced Swift Mailer with Symfony Mailer and no longer ships the Swift classes. Modules that built emails with Swift_Message or Swift_SmtpTransport stop sending.
Removed in PrestaShop 9.0 · Newsletter, notification and SMTP modules →
-
Class "GuzzleHttp\Client" not foundPrestaShop 9 no longer ships the Guzzle HTTP library. Modules that call external APIs (payment, shipping, feeds, ERP) with GuzzleHttp\Client fail unless they bring their own copy.
Removed in PrestaShop 9.0 · Payment, shipping, marketplace and ERP modules →
-
403 Forbidden: /modules/mymodule/ajax.phpPrestaShop 9 blocks direct access to PHP files inside the modules folder. Modules that answer AJAX through their own ajax.php get 403 Forbidden, and the feature behind it stops working.
Removed in PrestaShop 9.0 · Older modules with their own PHP endpoints →
-
GET /js/jquery/jquery-1.11.0.min.js 404 (Not Found)PrestaShop 9 keeps only jQuery 3.7.1 in js/jquery. Modules and themes that load an older file by its path get a 404, and every script that depends on it stops with "$ is not defined".
Removed in PrestaShop 9.0 · Themes, older modules →
-
Call to undefined function each()PrestaShop 9 needs PHP 8.1 or newer, and PHP 8 removed each(), create_function() and other old functions. Modules written for PHP 5 or 7 stop with a fatal error.
Removed in PHP 8.0 · Old modules, themes, overrides →
-
Call to undefined method ProductController::addJquery()PrestaShop 9 removed addJquery() from controllers. Modules that still call it in a hook stop the whole page with a fatal error, even though the call had done nothing since 1.7.7.
Removed in PrestaShop 9.0 · Module header hooks, module controllers →
Not sure which error you have? Start with the general guide: PrestaShop 9 upgrade errors.
Find every place like this before you upgrade
Where one removed call is, there are usually more. Our free PrestaShop 9 Readiness Check reads the code of every module, the theme and the overrides and lists each problem with its file and line. It only reads, nothing is changed.
Get the free checkPrefer not to fix it yourself? We upgrade stores to PrestaShop 9 for a fixed price. See the upgrade