VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: amlil71 on April 25, 2020, 17:15:44 PM

Title: [Fixed]Order name empty virtuemart 3.6.11
Post by: amlil71 on April 25, 2020, 17:15:44 PM
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.
Title: Re: Order name empty virtuemart 3.6.11
Post by: Jörgen on April 25, 2020, 23:38:26 PM
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
Title: Re: Order name empty virtuemart 3.6.11
Post by: 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.

Title: Re: Order name empty virtuemart 3.6.11
Post by: AH on April 26, 2020, 10:10:14 AM
HI, thanks for posting back

Post data removed to prevent people using my incorrect code that was bugged


Title: Re: Order name empty virtuemart 3.6.11
Post by: amlil71 on April 26, 2020, 17:41:33 PM
Hello,

thank you for your reply.

I have put your code and sory it does'nt work.

Regards.
Title: Re: Order name empty virtuemart 3.6.11
Post by: GJC Web Design on April 26, 2020, 19:40:29 PM
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
Title: Re: Order name empty virtuemart 3.6.11
Post by: AH on April 26, 2020, 20:11:39 PM
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>";
}

Title: Re: Order name empty virtuemart 3.6.11
Post by: Milbo on April 26, 2020, 21:13:34 PM
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
Title: Re: Order name empty virtuemart 3.6.11
Post by: AH on April 27, 2020, 09:55:44 AM
Thank you

Tested and working  :)
Title: Re: Order name empty virtuemart 3.6.11
Post by: amlil71 on April 27, 2020, 12:08:02 PM
Hello all,

thank you. It's working now  :)

Regards.