VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: dj55b on July 08, 2012, 19:18:45 PM

Title: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 08, 2012, 19:18:45 PM
I upgraded to the latest VM a couple of days ago, and I'm trying to view the invoices, but it keeps on taking me to a login page that doesn't show me anything!

Joomla 1.5
VM 2.0.8

Attached is the page is redirects me to.

Also if I log into that screen, it shows only the invoices that I did as dummy invoice. So even if I click on another person's invoice, it redirects me to show just all my invoices.

-----------------------------------------------------------
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');


----------------------------------------------

I don't know what all this means exactly as I'm not a developer/coder, but its the only thing that google pops up when I search for "klarna is doing the invoice"

The only way I can view them is by clicking on the actual number, but I can't really print that and shoot it off as an invoice to customers as it doesn't look professional.

[attachment cleanup by admin]
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 12, 2012, 18:01:09 PM
Anyone?
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: maxdesign on July 13, 2012, 17:50:38 PM
I am also finding this issue, cant figure out whats gone wrong after the upgrade.
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: uschmi on July 13, 2012, 17:55:42 PM
The reason is described here: http://forum.virtuemart.net/index.php?topic=105220.0
Bug not solved yet...
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: Milbo on July 14, 2012, 12:27:23 PM
No uschmi, that is a completly different error,

His error is in Fatal error: Call to undefined method plgVmShipmentCpsolVM2::getOrderShipmentHtml() in /home/autopiandetailing/autopiandetailing.alaahammoudeh.com/plugins/vmshipment/cpsolvm2.php on line 455

this is not a vm plugin done by us. He should ask there
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 15, 2012, 06:05:10 AM
I have resolved that one error message with the guy that developed the shipping module. But I'm still seeing that other window where I have to manually input in the order number and secret key to view/print the invoices from those options ...
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 15, 2012, 08:32:06 AM
As I tried doing in the past here's a screen by screen shot of what's going on:

IMG 1: Order Page, all is normal here
IMG 2: This is what shows up once I click on the order number encircled in red on IMG1.
IMG 3: This is what pops open in a new window regardless of whether I hit print or view invoice encircled in IMG1
IMG 4: The new screen that appears once I input the order number and secret key shown in the red box of IMG2
IMG 5: This is the message that appears once I click on the "Print" beside order information in the top left corner of IMG4

[attachment cleanup by admin]
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 15, 2012, 08:34:34 AM
IMG 5:

[attachment cleanup by admin]
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: Milbo on July 15, 2012, 11:20:51 AM
I do not really understand your problem.

When you click on the print or pdf, then it opens it in the frontend and it must work for anonymous so the link is using already the order_number and password. and your images does not show which link you are using. This is something else, some 3rd party.
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 16, 2012, 02:29:42 AM
I don't understand how it can't be a VM issue? I just want to know why I have to manually input in secret key's and invoice number for every time I wish to open an invoice...

Here's a video I made of what is going on since the picture by picture didn't seem to explain it as well as I thought it would.

http://s807.photobucket.com/albums/yy356/dj55b/?action=view&current=Picture.mp4

Quote from: Milbo on July 15, 2012, 11:20:51 AM
I do not really understand your problem.

When you click on the print or pdf, then it opens it in the frontend and it must work for anonymous so the link is using already the order_number and password. and your images does not show which link you are using. This is something else, some 3rd party.
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on July 21, 2012, 16:28:43 PM
no comment on that?
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: 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']));
}
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: dj55b on August 08, 2012, 07:21:05 AM
THANK YOU!!! That certainly fixed my issue where I don't have to input in orders numbers and secret keys ... I just hate that they can't admit that something is a VM issue.
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: tez on August 14, 2012, 09:12:42 AM
I got this problem after upgrade too.
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: derho on August 14, 2012, 21:46:30 PM
Quote from: uschmi on July 13, 2012, 17:55:42 PM
The reason is described here: http://forum.virtuemart.net/index.php?topic=105220.0 (http://kontaktniy.org)
Bug not solved yet...
a little different errors as i see...
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: tez on August 15, 2012, 01:06:28 AM
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.
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: eppenga on September 27, 2012, 10:50:00 AM
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!
Title: Re: Can't view invoices after upgrading to 2.0.8 from 2.0.6
Post by: heiko813 on October 04, 2012, 13:14:09 PM
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