tanse Posted May 17, 2022 Share Posted May 17, 2022 Hello, I have a Php fatal error that appeared out of nowhere. When trying to confirm an order choosing bank wire or COD I get this error: PHP Fatal error: require_once(): Failed opening required '/home/lunaaust/plodnost.si/modules/ba_prestashop_invoice/includes/helper.php' (include_path='/home/lunaaust/plodnost.si/tools/htmlpurifier/standalone:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/lunaaust/plodnost.si/override/classes/order/Order.php on line 76 I don't have ba_prestashop_invoice module installed anymore (deinstalled in almost a year ago). Kind asking for help. Thank you! Link to comment Share on other sites More sharing options...
El Patron Posted May 17, 2022 Share Posted May 17, 2022 it would seem that there is leftover code in override/classes/order/Order.php maybe when uninstalled the overrides used by module did not get cleaned out Link to comment Share on other sites More sharing options...
tanse Posted May 17, 2022 Author Share Posted May 17, 2022 Thank you for your reply. And the solution woud be... Thanks Link to comment Share on other sites More sharing options...
El Patron Posted May 17, 2022 Share Posted May 17, 2022 5 minutes ago, tanse said: Thank you for your reply. And the solution woud be... Thanks if this is bit to technical for you I recommend posting in job section for technical person to assist. also you can build relationship with ps nerd for any future issues/questions or go to shopify loool Link to comment Share on other sites More sharing options...
idnovate.com Posted May 17, 2022 Share Posted May 17, 2022 1 hour ago, tanse said: Thank you for your reply. And the solution woud be... Thanks Please upload the content from file /override/classes/order/Order.php. Link to comment Share on other sites More sharing options...
tanse Posted May 17, 2022 Author Share Posted May 17, 2022 Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2020 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class Order extends OrderCore { /* * module: ba_prestashop_invoice * date: 2021-02-11 17:53:24 * version: 1.1.43 */ public $payment_fee = 0; /* * module: ba_prestashop_invoice * date: 2021-02-11 17:53:24 * version: 1.1.43 */ public static function setLastInvoiceNumber($order_invoice_id, $id_shop) { if (!$order_invoice_id) { return false; } require_once(_PS_MODULE_DIR_ . "ba_prestashop_invoice/includes/helper.php"); $helper = new BAInvoiceHelper(); if ($helper->isEnabledCustomNumber('INVOICE') == false) { return parent::setLastInvoiceNumber($order_invoice_id, $id_shop); } return $helper->setLastInvoiceNumber($order_invoice_id, $id_shop); } /* * module: ba_prestashop_invoice * date: 2021-02-11 17:53:24 * version: 1.1.43 */ public function setDeliveryNumber($order_invoice_id, $id_shop) { if (!$order_invoice_id) { return false; } require_once(_PS_MODULE_DIR_ . "ba_prestashop_invoice/includes/helper.php"); $helper = new BAInvoiceHelper(); if ($helper->isEnabledCustomNumber('DELIVERY') == false) { return parent::setDeliveryNumber($order_invoice_id, $id_shop); } return $helper->setDeliveryNumber($order_invoice_id, $id_shop); } /* * module: ba_prestashop_invoice * date: 2021-02-11 17:53:24 * version: 1.1.43 */ public static function generateReference() { $id_shop = (int) Context::getContext()->shop->id; require_once(_PS_MODULE_DIR_ . "ba_prestashop_invoice/includes/helper.php"); $helper = new BAInvoiceHelper(); if ($helper->isEnabledCustomNumber('ORDER') == false) { return parent::generateReference(); } return $helper->generateReference($id_shop); } } Link to comment Share on other sites More sharing options...
tanse Posted May 17, 2022 Author Share Posted May 17, 2022 I deleted all files from the override folder that were left behind by this module and I still can't finish the order. Link to comment Share on other sites More sharing options...
El Patron Posted May 17, 2022 Share Posted May 17, 2022 Hi, you also (I'm bit rusty as I have young guns that do all the coding now), remove the class_index.php file inside /var/cache/prod. (I assume this is still valid, else your changes to the override will not be recognized as it's cached). Link to comment Share on other sites More sharing options...
Nickz Posted May 17, 2022 Share Posted May 17, 2022 8 hours ago, tanse said: I have a Php fatal error that appeared out of nowhere. If you have a shared hosting it is posible that your php7.2 or 7.3 was upgraded to 7.4. Check that up and after backup downgrade the php version to where it was before. Link to comment Share on other sites More sharing options...
tanse Posted May 17, 2022 Author Share Posted May 17, 2022 2 hours ago, El Patron said: Hi, you also (I'm bit rusty as I have young guns that do all the coding now), remove the class_index.php file inside /var/cache/prod. (I assume this is still valid, else your changes to the override will not be recognized as it's cached). Unfortunetaly, it didn't work. After I removed class_index.php from cache folder (I don't have /var/cache/prod) error_log doesn't detect any errors but I get 503 error service unavailable. Link to comment Share on other sites More sharing options...
El Patron Posted May 17, 2022 Share Posted May 17, 2022 54 minutes ago, tanse said: Unfortunetaly, it didn't work. After I removed class_index.php from cache folder (I don't have /var/cache/prod) error_log doesn't detect any errors but I get 503 error service unavailable. yes, this is why I mentioned finding someone in job sections that can get access to your shop, it's difficult to debug via forum. If you are getting 503 then I recommend restoring the file you deleted. Also it's best not to delete, a trick is to place underscore _ in front of the file / folder name. I checked 1.7 shop and there was /var/cache/prod/class_index.php what version of ps are you using? Link to comment Share on other sites More sharing options...
tanse Posted May 18, 2022 Author Share Posted May 18, 2022 Thank you for your reply. I'm still on 1.6.1 Link to comment Share on other sites More sharing options...
tanse Posted May 18, 2022 Author Share Posted May 18, 2022 13 hours ago, Nickz said: If you have a shared hosting it is posible that your php7.2 or 7.3 was upgraded to 7.4. Check that up and after backup downgrade the php version to where it was before. Thanks for your reply. There was no upgrade. Link to comment Share on other sites More sharing options...
idnovate.com Posted May 19, 2022 Share Posted May 19, 2022 Ok so you deleted the file /override/classes/order/Order.php? And you don't get any descriptive error now, just 503? Link to comment Share on other sites More sharing options...
Featured Comment tanse Posted May 19, 2022 Author Featured Comment Share Posted May 19, 2022 1 hour ago, idnovate.com said: Ok so you deleted the file /override/classes/order/Order.php? And you don't get any descriptive error now, just 503? Yes. I hired someone to resolve this issue as El patron suggested. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Posted by tanse,
1 reaction
Go to this post
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 accountSign in
Already have an account? Sign in here.
Sign In Now