Jump to content

Call to a member function displayPriceSmarty()


Recommended Posts

Dear sir/madam,

 

I'm trying to develop an payment plug-in.

However when I call the function ValidateOrder from an IPN/Callback I get an 500 Internal Server error.

The PHP error logs have the following result:

 

PHP Fatal error: Uncaught Error: Call to a member function displayPriceSmarty() on null in D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\app\cache\prod\smarty\compile\16\e3\ce\16e3ce4684fdf6c1f61401aba42586ea0a1bed40.file.invoice.tax-tab.tpl.php:108
Stack trace:
#0 D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\vendor\prestashop\smarty\sysplugins\smarty_internal_templatebase.php(188): content_583c4313e691d7_75590965(Object(Smarty_Internal_Template))
#1 D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\classes\pdf\HTMLTemplateInvoice.php(389): Smarty_Internal_TemplateBase->fetch('D:\\appdata\\IIS\\...')
#2 D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\classes\pdf\HTMLTemplateInvoice.php(322): HTMLTemplateInvoiceCore->getTaxTabContent()
#3 D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\classes\pdf\PDF.php(122): HTMLTemplateInvoiceCore->getContent()
#4 D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\classes\PaymentModule.php(812): PDFCo in D:\appdata\IIS\vhosts\mvhaaren.nl\httpdocs\webshops\prestashop\app\cache\prod\smarty\compile\16\e3\ce\16e3ce4684fdf6c1f61401aba42586ea0a1bed40.file.invoice.tax-tab.tpl.php on line 108

 

Anyone an idea how i can solve this issue?

 

With kind regards,

Mark an Haaren

Link to comment
Share on other sites

  • 2 weeks later...

I'm developing a payment module and I found the same problem (PS 1.7.0.2). Error messages in server log:

PHP Notice:  Undefined index: displayPrice in /var/www/ps17/vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 108

PHP Fatal error:  Call to a member function displayPriceSmarty() on a non-object in /var/www/ps17/vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 108

 

The problem appears to be related to invoice PDF email attachment. Second parameter of the PaymentModuleCore::validateOrder() -method is $id_order_state. See the corresponding order status in admin panel and set off its "Attach invoice PDF to email"-setting. Or use an other $id_order_state. This bypasses (but does't fix) the bug.

Link to comment
Share on other sites

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