Edit the report to show PRODUCT CODE rather than name

  • Posts: 99
  • Thank you received: 5
6 years 9 months ago #273102

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 5.6
-- Browser(s) name and version -- : Chrome 59

Hello,

Where can I change the reporting to display product_code rather than product_NAME in the dashboard reports.

Thank you

Last edit: 6 years 9 months ago by byoguru. Reason: corrected typo - sorry!

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 9 months ago #273107

Hello,

I'm sorry but I don't understand your question.
Can you please clarify ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 99
  • Thank you received: 5
6 years 9 months ago #273137

Hello Jerome,
Sorry about that!

In the admin section were the Reports are created I can make a report that provides a table with:

Product Name, ORDERS, etc.,

But I cannot find a method of showing the Product CODE instead of the name of the product.

Sorry for the mistyping!

-T

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 9 months ago #273139

Hello,

I'm sorry but there is still not enough information.
What is that report ; what is the report settings ?
Please provide a really precise context and details to allow us to understand what you're talking about exactly.

Thank you for your understanding.


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 99
  • Thank you received: 5
6 years 9 months ago #273252

Okay.

In this Administration page URL: administrator/index.php?option=com_hikashop&ctrl=report where the ADMIN makes reports in Hikashop.

Make a new REPORT with the following:
DISPLAY Type = LISTING
+
FILTERS = ALL STATUSES

The report will provide a list that displays the following columns: Products name Orders Total
I would like to replace the column titled Products name with Product CODE
Is there a method for doing this? If not could you please let me know which file I would need to edit?

Attachments:

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
6 years 9 months ago #273299

Hi,

You'll have to edit the file administrator/components/com_hikashop/classes/widget.php
I think that it's these lines:

$widget->exportFields=array('order_product_name', 'Total');
						}else{
							$widget->exportFields=array('order_product_name', 'quantity');
where you want to change order_product_name by order_product_code

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

  • Posts: 99
  • Thank you received: 5
6 years 9 months ago #273336

Hello Nicolas,

Thank you for this - it works when EXPORTING the report . Whereas in the admin panel nothing changes, it displays the same data as in the image sent previously.

Will see if the client is willing to work with this solution.

Thank you.

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
6 years 9 months ago #273355

Hi,

For the admin panel, you want to edit the file 'product' of the view "dashboard" via the menu Display>Views and change the line:
echo @$row->order_product_name;
to:
echo @$row->order_product_code;

The following user(s) said Thank You: byoguru

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

  • Posts: 99
  • Thank you received: 5
6 years 9 months ago #273409

Thank you Nicolas.

Best
Tony

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

Time to create page: 0.078 seconds
Powered by Kunena Forum