Jump to content

Call to undefined method


Recommended Posts

ok, thank you. for the first i just want to say that module isn't fully compatibile with prestashop 1.5 (it uses old method to create .php pages)

 

the problem is with this code:

$bankwire->validateBankwireDiscountOrder($cart->id,Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);

$bankwire variable is an instance of module class in bakwirediscount.php file.

can you check if this file includes PaymentModule.php file? 

 

 

you can also try to use this code in validation.php: (right after other includes) (im not sure if this will work)

include(dirname(__FILE__).'/PaymentModule.php'); (i don't know exact path to this file)

then instead of 

$bankwire->validateBankwireDiscountOrder($cart->id,Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);

try to use this:

$bankwirepm = new PaymentModule();
$bankwirepm->validateBankwireDiscountOrder($cart->id,Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
  • Like 1
Link to comment
Share on other sites

 

ok, thank you. for the first i just want to say that module isn't fully compatibile with prestashop 1.5 (it uses old method to create .php pages)

 

the problem is with this code:

$bankwire->validateBankwireDiscountOrder($cart->id,Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);

$bankwire variable is an instance of module class in bakwirediscount.php file.

can you check if this file includes PaymentModule.php file? 

 

 

you can also try to use this code in validation.php: (right after other includes) (im not sure if this will work)

include(dirname(__FILE__).'/PaymentModule.php'); (i don't know exact path to this file)

then instead of 

$bankwire->validateBankwireDiscountOrder($cart->id,Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);

try to use this:

$bankwirepm = new PaymentModule();
$bankwirepm->validateBankwireDiscountOrder($cart->id,Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);

v2.1-bankwirediscount.zip

Link to comment
Share on other sites

  • 2 years later...
  • 6 months later...

Hello!

 

I solved this issue!

 

 

 

First:

Edit   validation.php:

$bankwire->validateBankwireDiscountOrder($cart->id, _PS_OS_BANKWIRE_, $total, $bankwire->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key, NULL);

 

(put the last parameter ,NULL, on call function).

 

Second:

On PaymentModule.php

Copy all implementation of function validateBankwireDiscountOrder   (Ctrl + C)

 

Third:

Paste all this function on botton of BankWireDiscount.php file.  (Ctrl + V)

 

Fourth:

On BankWireDiscount.php change this:

     class BankWireDiscount extends PaymentModule

 

to this:

     class BankWireDiscount extends PaymentModuleCore

 

 

That´s it! Now it works!!!!!

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...