Order report by category/status stopped working

  • Posts: 83
  • Thank you received: 4
  • Hikashop Business
3 years 1 week ago #239760

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.14
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : no error messages

We have a report that stopped working and we can't figure out why.

The report will not show products in the top-level category and its sub-categories.

It is a published, Listing report, for all dates, with Type = Orders. We selected Confirmed status and in Categories the top-level product category for filters.

Before, we just had the top-level category selected and Yes to Include sub categories.

But now there are no orders listed. We found that we can go in to the next level of categories and select them, but if we include the top-most category, nothing results.

I have tried rebuilding the categories, have even created a new report.

If I go back and de-select the top-most category, and then select the next sub-level categories the report appears to work, but now we are afraid we may be missing things and use this report to process orders with.

Here is what we had before:



Here is the screen shot before we make the change to remove the top level category:


And if we remove the top-level category, and just select the sub levels, we get:


Note, even with the other categories included, if we go back and add the top-level products category back into the filter, nothing shows up.

Also note that this is only if we choose Confirmed status. If I choose any other status we seem to get results, but we had the report configured for just confirmed orders. We have another status we change that to during picking/shipping and this report is used to show us only paid merchandise orders that need to be shipped.

Attachments:
Last edit: 3 years 1 week ago by stratacorps. Reason: added note about order status

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

  • Posts: 65661
  • Thank you received: 9582
  • MODERATOR
3 years 1 week ago #240168

Hi,

I really don't see why changing the status used would solve the problem with the categories filtering in the reports.
It looks like an issue with the reports categories filtering only.
Could you provide a backend access so that we could activate the debug mode of the Joomla configuration and check the MySQL queries run for the filtering with the different reports (if you can provide the name of the reports with the different settings so that we can easily find them it would help) ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 83
  • Thank you received: 4
  • Hikashop Business
3 years 6 days ago #240194

Okay, I've made a clone of the production site for you and sent you the information to access it. Thanks!!

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

  • Posts: 65661
  • Thank you received: 9582
  • MODERATOR
3 years 6 days ago #240251

Hi,

I see. The problem is that the report system only loads 20 sub categories (to avoid crashing because of resource restrictions).
Change the line:
$childs = $categoryClass->getChildren($parents,true);
to:
$childs = $categoryClass->getChildren($parents,true, array(), '', 0, 200);
in the file administrator/components/com_hikashop/classes/widget.php and that will load more categories avoiding the issue.
You can also try with $childs = $categoryClass->getChildren($parents,true, array(), '', 0, 0);
That should load the categories without any restriction on the amount.

The following user(s) said Thank You: stratacorps

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

  • Posts: 83
  • Thank you received: 4
  • Hikashop Business
3 years 5 days ago #240290

That worked! Thank you.

Do I need to keep this or is this something that will be in future updates? I noticed that this has been this way (at least in the widgets.php module) since 2.6.0 ... but it just recently stopped working as before. Is there something else that has changed in scope or do we need to be doing our reports differently?)

Thanks,

Kevin

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

  • Posts: 65661
  • Thank you received: 9582
  • MODERATOR
3 years 5 days ago #240291

Hi,

I've checked on our end but that code has always been like that.
I suppose that the difference doesn't come from the version of HikaShop, but from the fact that you've added more categories, no?

That fix will be included in the next version so there will be nothing to do on your end for that.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum