VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Kannan76 on September 14, 2012, 06:59:02 AM

Title: Payment confirmation page sentOrderConfirmedEmail() error in virtuemart 2
Post by: Kannan76 on September 14, 2012, 06:59:02 AM
Hi,

I'm using a payment plugin which i believe is written by VM team for a local payment gateway. I'm not sure if the codes are obsolete or there's some error in it. Once, i've successfully made the payment, it returns to my site but displays a blank white page with no source.

I checked the error log file and saw this
Quote
PHP Fatal error:  Call to undefined method VirtueMartCart::sentOrderConfirmedEmail() in ..... line 234


if (!class_exists('VirtueMartCart'))
require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');
$cart = VirtueMartCart::getCart();

// send the email ONLY if payment has been accepted
if (!class_exists('VirtueMartModelOrders'))
require( JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php' );
$order = new VirtueMartModelOrders();
$orderitems = $order->getOrder($virtuemart_order_id);
$cart->sentOrderConfirmedEmail($orderitems);   // <- LINE 234

$new_status = $method->status_success;

$modelOrder = new VirtueMartModelOrders();
$orders[$virtuemart_order_id]["order_status"] = $new_status;
$orders[$virtuemart_order_id]["virtuemart_order_id"] = $virtuemart_order_id;
$orders[$virtuemart_order_id]["customer_notified"] = 0;
$orders[$virtuemart_order_id]["comments"] = '';
$modelOrder->updateOrderStatus($orders);

$cart->emptyCart();


I am using Virtuemart 2.0.10 and Joomla 2.5.6

Can someone help to check on the code ? i can provide the actual php file
Title: Re: Payment confirmation page sentOrderConfirmedEmail() error in virtuemart 2
Post by: alatak on September 14, 2012, 08:24:26 AM
Hello,

QuoteI'm using a payment plugin which i believe is written by VM team for a local payment gateway.
Which payment are you talking about?
The payments developed by the VM team are inside the AIO, or in the extensions.virtuemart.net. And atm, there is no payment plugin on the extensions.virtuemart.net.

QuotePHP Fatal error:  Call to undefined method VirtueMartCart::sentOrderConfirmedEmail() in ..... line 234
This function does not exist since months. You should contact the developer of your payment plugin.