views:

72

answers:

1

What is the correct way to force the system to send an invoice to a client. I'm trying to use:

uc_order_action_email($order, $settings);

But I keep getting:

Fatal error: Call to undefined function uc_price() in C:\xampp\htdocs\YourEstablishment\src\sites\all\modules\ubercart\payment\uc_payment\uc_payment.module on line 149
+1  A: 

It might be a flaw in the module. The function that it's complaining about, uc_price, is defined in

ubercart/uc_store/includes/uc_price.ini

Since it's located in a ini file, that means that drupal wont include it by it self. I'm not familiar with ubercart, since I've never used it, but it seems like this could be a bug in the module. If no one here can come up with an explanation, you should go to the issue tracker.

A quick fix to your problem would be to add this before you call the function

require_once(drupal_get_path('module', 'uc_store') . '/includes/uc_price.inc');

it will include the needed file.

googletorp

related questions