Jump to content

Tweak to Change Online Customers as default statistics


Dirty Butter
 Share

Recommended Posts

I prefer to keep a long term list of Customers Online in Statistics, as I can sometimes tell what toy someone looked at but had trouble buying. I can then email them and possibly get a sale.

But the tab defaults to Bots AND Customers. That slows down loading a large number of entries. It seems like there ought to be a way to default the tab to Customers Only.

I have fiddled with the if/else in statistics.index.inc.php, but have not been able to figure it out myself.

if (isset($_GET['bots']) && $_GET['bots']=='false') {
    $filter = '(S.session_last > S.session_start) AND ';
    $GLOBALS['smarty']->assign('BOTS', false);
} else {
    $filter = '';
    $GLOBALS['smarty']->assign('BOTS', true);

 

Link to comment
Share on other sites

Please try replacing that code (do not forget to include the final closing brace for the else block) with this code:

    $filter = '(S.session_last > S.session_start) AND ';
    $GLOBALS['smarty']->assign('BOTS', false);
if (isset($_GET['bots']) && $_GET['bots']=='true') {
    $filter = '';
    $GLOBALS['smarty']->assign('BOTS', true);
}

 

Link to comment
Share on other sites

This is MUCH better! One last bit of help if you have the time:

I expected to be able to change the <td> for Location in statistics.index.php to <td width="xx"> with whatever number would make a decent size column. But nothing I have tried has made any difference.

This is what it looks like without any adjusted column width:

816135734_Screenshot2021-08-16at17-28-26LovieShoppeAdmin.thumb.png.a655f59600f54e600d41e54e9717ce73.png

Link to comment
Share on other sites

There may be a URL in the Location column that cannot be broken. That is, if a string in a table cell is too long, and there isn't a character that the browser can break the line with (a dash, comma, etc), the cell will be as wide as it takes to show the unbroken string.

So, scroll through the table looking for contents that are as wide as the Location column. The barely visible URL at the bottom would be a good suspect, but there are dashes that could break the line. So that's not it.

 

Link to comment
Share on other sites

Interesting! I didn't realize there were places that the link will not break to a new line. I don't see any consistency in what does and does not wrap to the next line. I know there's a code for nowrap, but I guess there's no way to force wrapping.

It's a minor issue - just looked so simple to fix and obviously isn't.

Thanks for fixing the REAL issue - loading time is reasonable now. ❤️

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...