News:

Looking for documentation? Take a look on our wiki

Main Menu

Can't view invoices after upgrading to 2.0.8 from 2.0.6

Started by dj55b, July 08, 2012, 19:18:45 PM

Previous topic - Next topic

tez

in 2.0.8e
"Klarna is doing the invoice" is on line 216, views/invoice/view.html.php

$app->redirect('index.php?option=com_virtuemart&view=orders','Klarna is doing the invoice');


Replacing the code above does fix it.

eppenga

Had exactly the same problem. The link to print invoice (pdf and non pdf) forwarded me to a page where I needed to login again. Used the fix provided (replacing the old code in view.html.php) worked fine!

heiko813

Quote from: pete123 on July 30, 2012, 03:35:51 AM
I'm not sure if this will create problems, and I'm sure there are reasons why the code was added,  but I got rid of the klarna message by replacing these lines in the views/invoice/view.html.php file

if (empty($orderDetails['shipmentName']) ) {
    if (!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php');
    JPluginHelper::importPlugin('vmshipment');
    $dispatcher = JDispatcher::getInstance();
    $returnValues = $dispatcher->trigger('plgVmOnShowOrderFEShipment',array(  $orderDetails['details']['BT']->virtuemart_order_id, $orderDetails['details']['BT']->virtuemart_shipmentmethod_id, &$orderDetails['shipmentName']));
}

if (empty($orderDetails['paymentName']) ) {
    if(!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS.DS.'vmpsplugin.php');
    JPluginHelper::importPlugin('vmpayment');
    $dispatcher = JDispatcher::getInstance();
    $returnValues = $dispatcher->trigger('plgVmOnShowOrderFEPayment',array( $orderDetails['details']['BT']->virtuemart_order_id, $orderDetails['details']['BT']->virtuemart_paymentmethod_id,  &$orderDetails['paymentName']));
if(is_array($returnValues)){
foreach($returnValues as $val){
if($val==false and $layout != 'mail'){
// don't send the invoice
$app = JFactory::getApplication();
$app->redirect('index.php?option=com_virtuemart&view=orders','Klarna is doing the invoice');
}
}
}
}



with the older version


if (empty($orderDetails['shipmentName']) ) {
    if (!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php');
    JPluginHelper::importPlugin('vmshipment');
    $dispatcher = JDispatcher::getInstance();
    $returnValues = $dispatcher->trigger('plgVmOnShowOrderFEShipment',array(  $orderDetails['details']['BT']->virtuemart_order_id, $orderDetails['details']['BT']->virtuemart_shipmentmethod_id, &$orderDetails['shipmentName']));
}

if (empty($orderDetails['paymentName']) ) {
    if(!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS.DS.'vmpsplugin.php');
    JPluginHelper::importPlugin('vmpayment');
    $dispatcher = JDispatcher::getInstance();
    $returnValues = $dispatcher->trigger('plgVmOnShowOrderFEPayment',array( $orderDetails['details']['BT']->virtuemart_order_id, $orderDetails['details']['BT']->virtuemart_paymentmethod_id,  &$orderDetails['paymentName']));
}



THANK YOU