Last X orders info

  • Posts: 110
  • Thank you received: 1
  • Hikashop Business
6 months 3 weeks ago #299838

-- HikaShop version -- : 4
-- Joomla version -- : 3.8
-- PHP version -- : 7.1
-- Error-message(debug-mod must be tuned on) -- : none

Hi
I have a widget showing most recent orders, it shows:
INV No. - Customer - Status - Total

in the customer part, it shows the customer name, then email address twice, once in brackets, once with edit pen.

Asxxxxgh Bxxxxn ( This email address is being protected from spambots. You need JavaScript enabled to view it. )
This email address is being protected from spambots. You need JavaScript enabled to view it. edit

[1] can I change that to just the name?
[2] Can I add the date of the sale?

thanks

Please Log in or Create an account to join the conversation.

  • Posts: 65715
  • Thank you received: 9593
  • MODERATOR
6 months 3 weeks ago #299841

Hi,

1. The text inside the parenthesises is not the email address but the username of the user account. It seems that the email address has been used as username for that user account (or maybe the website is configured to always be like that), which is why it looks redundant.

2. Yes.

In both cases you can edit the file "order" of the view "dashboard" via the menu Display>Views. There, you can change the code:

if(isset($row->user_cms_id)) {
							$customer = JFactory::getUser($row->user_cms_id);
							if(!empty($customer->username) && !empty($customer->name))
								echo $customer->name.' ( '.$customer->username.' )</a><br/>';
						}
						 $url = hikashop_completeLink('user&task=edit&cid[]='.$row->user_id);
						 echo $row->user_email.' <a href="'.$url.'"><i class="fas fa-pen"></i></a>';
for the name of the customer, and you can add a new column to the HTML with the date that you'll have with hikashop_getDate($row->order_created);

The following user(s) said Thank You: phiddius

Please Log in or Create an account to join the conversation.

  • Posts: 110
  • Thank you received: 1
  • Hikashop Business
6 months 3 weeks ago #299915

excellent :) thanks nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum