Jump to content

php fatal error override/classes/order/Order.php


Recommended Posts

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

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

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

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

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

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

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

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

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