VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: welrachid on May 24, 2018, 09:59:06 AM

Title: COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND After update 3.2.4 > 3.2.14
Post by: welrachid on May 24, 2018, 09:59:06 AM
Hi Guys
Even though i always try to make thorough testing of new versions of VM/joomla/others i sometimes miss things..
Last night i made an update on the my system
FROM:
PHP 5.6.x
J! 3.8.6
VM 3.2.4
VP OPC 5.1

TO
PHP 5.6.x
J! 3.8.8
VM 3.2.14
VP OPC 6.0

And now when i click the print icon on the orderlist i get EITHER COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND error or the image attached to this thread.

I tried searching but havent found anything on the forum

Its related to the page components/com_virtuemart/views/invoice/view.html.php:

      if($orderDetails==0){
         if (!class_exists ('shopFunctionsF'))
            require(VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php');
         shopFunctionsF::loadOrderLanguages(VmConfig::$jDefLangTag);
         $orderDetails = $orderModel ->getMyOrderDetails(0,false,false,true);
         if(!$orderDetails ){
            //echo vmText::_('COM_VIRTUEMART_CART_ORDER_NOTFOUND');
            vmdebug('COM_VIRTUEMART_CART_ORDER_NOTFOUND and $orderDetails ',$orderDetails);
            return;
         } else if(empty($orderDetails['details'])){
            echo vmText::_('COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND'); //<<<<<<< THIS LINE
            return;
         }
      }

I am not able to recreate the issue with new orders.
Some of the orders this morning are OK and some are not. Im not sure why some are or some are not.
https://example.com/index.php?option=com_virtuemart&view=invoice&layout=invoice&tmpl=component&virtuemart_order_id=28106&order_number=28106&order_pass=p_ZXXXX

Hopefully you have an idea
Title: Re: COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND After update 3.2.4 > 3.2.14
Post by: welrachid on May 24, 2018, 10:45:25 AM
I've look in both
SELECT * FROM `#__virtuemart_order_userinfos` WHERE `virtuemart_order_id` = 28106 ORDER BY `virtuemart_order_userinfo_id` DESC
SELECT * FROM `#__virtuemart_orders` WHERE `virtuemart_order_id` = 28106 ORDER BY `virtuemart_order_id` DESC
ad both returns 1 result..
Title: Re: COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND After update 3.2.4 > 3.2.14
Post by: welrachid on May 25, 2018, 12:21:26 PM
Apparently there has been some changes to the orderlist (i've done a lot of templateoverride to make the work-process more effecient)
Earlier we had a lot of links in the

section

Now its just:
<!-- Print View -->
<?php
$this->createPrintLinks($order,$print_link,$deliverynote_link,$invoice_link);
?>
Title: Re: COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND After update 3.2.4 > 3.2.14
Post by: Milbo on May 29, 2018, 16:01:07 PM
Yepp, because we can have now multiple invoices per order. So there are arrays now, imho (I did not check that now)
Title: Re: COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND After update 3.2.4 > 3.2.14
Post by: welrachid on May 29, 2018, 16:32:41 PM
You are correct. Variable changed, somehow i was able to force creation of invoices multiple times.