Post by slawrence10 » Sat Jul 25, 2009 12:00 am

Hey,

basically the products viewed stats were distorted because of debugging the site playing with templates etc and I wanted it to be fresh for site launch so i reset the viewed column to 0 for all my products.

When you go into Products Viewed in admin it errors

Code: Select all

Warning: Division by zero in /homepages/32/d126974997/htdocs/barnardsports/admin/model/report/report.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /homepages/32/d126974997/htdocs/barnardsports/admin/model/report/report.php:19) in /homepages/32/d126974997/htdocs/barnardsports/system/library/response.php on line 65
Self-explanatory you can't divide by zero lol, obviously the error dissappears as soon as you have a product that has been viewed.

Maybe it would be nice to add an if statement in just to stop the division being called if there are no product views?

I know opencart is installed with views already in the default products but it still might be worth just ironing that error out? I dunno...granted it's far from any kind of importance but I thought I'd mention it anyway :)


Scott

Scott Lawrence - Creative agency - Bespoke web and graphic design


User avatar
Active Member

Posts

Joined
Sun Jul 19, 2009 8:10 pm
Location - London, UK

Post by slawrence10 » Sat Jul 25, 2009 12:04 am

In fact....

it might be nice to have a reset stats link?

So shop owners can reset the viewing count, that way at the start of a month you could make changes to your site and see how this affects which products are being viewed.

Just a thought :)

Scott Lawrence - Creative agency - Bespoke web and graphic design


User avatar
Active Member

Posts

Joined
Sun Jul 19, 2009 8:10 pm
Location - London, UK
Who is online

Users browsing this forum: No registered users and 10 guests