Hello,
i have update virtuemart to 3.6.11 since i have some bugs with 3.6.10.
It's ok now but the name of customers is empty in the orders list page.
Do you have an idea to solve this ?
Thank you.
Regards.
Is it also emptied in the order view?
If it is visible there check with the inspector F12 to see if the name is hidden with CSS.
Jörgen @ Kreativ Fotografi
Hello,
thank you for your answer.
I have found the roof of this issue.
I have change the code of the orders.php file located in administrator\components\com_virtuemart\views\orders\tmpl
The code wich doesn't work in 3.6.11 release
$userlink = JRoute::_ ('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $order->virtuemart_user_id, FALSE);
echo JHtml::_ ('link', $userlink, FALSE, $orderName, array('title' => vmText::_ ('COM_VIRTUEMART_ORDER_EDIT_USER') . ' ' . $orderName));
I have replaced this code with the one from 3.6.10 release which works
$userlink = JROUTE::_ ('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $order->virtuemart_user_id, FALSE);
echo JHtml::_ ('link', JRoute::_ ($userlink, FALSE), $order->order_name, array('title' => vmText::_ ('COM_VIRTUEMART_ORDER_EDIT_USER') . ' ' . $order->order_name));
It's ok now.
Thank you.
Regards.
HI, thanks for posting back
Post data removed to prevent people using my incorrect code that was bugged
Hello,
thank you for your reply.
I have put your code and sory it does'nt work.
Regards.
Quotei have update virtuemart to 3.6.11 since i have some bugs with 3.6.10.
also u don't say WHICH VM3.6.11 .... the numbering/versioning is important as the are all work in progress
Oops
Yes that code does not work in core - there appears to be a bug in core
This is what I use in my override:-
if ($order->virtuemart_user_id) {
$userlink = JROUTE::_ ('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $order->virtuemart_user_id, FALSE);
echo html_entity_decode(JHtml::_ ('link', JRoute::_ ($userlink, FALSE), $order->order_name, array('title' => vmText::_ ('COM_VIRTUEMART_ORDER_EDIT_USER') . ' ' . $order->order_name)));
} else {
echo "<strong>" . html_entity_decode( $order->order_name) . "</strong>";
}
Quote from: amlil71 on April 26, 2020, 06:09:00 AM
Hello,
thank you for your answer.
I have found the roof of this issue.
I have change the code of the orders.php file located in administrator\components\com_virtuemart\views\orders\tmpl
The code wich doesn't work in 3.6.11 release
$userlink = JRoute::_ ('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $order->virtuemart_user_id, FALSE);
echo JHtml::_ ('link', $userlink, FALSE, $orderName, array('title' => vmText::_ ('COM_VIRTUEMART_ORDER_EDIT_USER') . ' ' . $orderName));
I have replaced this code with the one from 3.6.10 release which works
$userlink = JROUTE::_ ('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $order->virtuemart_user_id, FALSE);
echo JHtml::_ ('link', JRoute::_ ($userlink, FALSE), $order->order_name, array('title' => vmText::_ ('COM_VIRTUEMART_ORDER_EDIT_USER') . ' ' . $order->order_name));
It's ok now.
Thank you.
Regards.
Thank you for reporting and finding the right file. The error is the "False" as 3rd parameter, which was just left from the JRoute::_ ($userlink, FALSE) and so the right code is
echo JHtml::_ ('link', $userlink, $orderName, array('title' => vmText::_ ('COM_VIRTUEMART_ORDER_EDIT_USER') . ' ' . $orderName) );
Fixed
Thank you
Tested and working :)
Hello all,
thank you. It's working now :)
Regards.