VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: fexnok on July 08, 2012, 16:49:04 PM

Title: Order not found! It may have been deleted. message when click on print order
Post by: fexnok on July 08, 2012, 16:49:04 PM
Here's the procedure to replicate the error:

This only happens when user is a guest user or when user is not logged in. If the user is registered and logged in the invoice displays correctly.

The problem lies on the parameters sent to the new window. According to \components\com_virtuemart\views\orders\view.html.php line 83 to 93, the URL must contain not the order_id only but order_number and order_password as well, and the template com_virtuemart\orders\details.php line 52 only sends order_id.

In order to fix it, create your own html\ com_virtuemart\orders\details.phptemplate and add the two missing parameters or just replace

$details_url = juri::root().'index.php?option=com_virtuemart&view=orders&layout=details&tmpl=component&virtuemart_order_id=' . $this->orderdetails['details']['BT']->virtuemart_order_id;

with

$details_url = juri::root().'index.php?option=com_virtuemart&view=orders&layout=details&tmpl=component&virtuemart_order_id=' . $this->orderdetails['details']['BT']->virtuemart_order_id .'&order_pass=' . JRequest::getString('order_pass',false) .'&order_number='.JRequest::getString('order_number',false);

I'm using Joomla 2.5.4 and it applies to Virtuemart 2.0.6 and 2.0.8a

Thanks
Title: Re: Order not found! It may have been deleted. message when click on print order
Post by: Milbo on July 08, 2012, 21:17:59 PM
thx, added.