Jump to content
Sign in to follow this  
ecartz

Admin Reports Count Reset [Support Thread]

Recommended Posts

Since there doesn't seem to be a support thread for this contribution, posting one. The Admin Reports Count Reset contribution is at http://addons.oscommerce.com/info/2246

 

Note that the contribution actually clears the values in the database. This affects the best sellers list as well as the admin reports. The contribution includes the ability to clear either products viewed or ordered for a single product or for all of the products at once. For this reason, it is best to backup the database before using. Changes can not be undone in the tool.

 

This contribution also allows you to sort the report tables by count (ascending or descending) and product name (again ascending or descending). Further, it fixes a bug in the osCommerce distribution where the row number would show 01 to MAX_SEARCH_RESULTS on each page. The rows will now be numbered correctly, starting at MAX_SEARCH_RESULTS + 1 on the second page. For example, if you have osCommerce configured with MAX_SEARCH_RESULTS of 20, it will show 01 to 20 on the first page, 21 to 40 on the second page, 41 to 60 on the third page, etc.

 

The current version of the contribution (1.5) should be completely compatible with osCommerce 2.2 RC2a and with register_globals set either on or off.


Always back up before making changes.

Share this post


Link to post
Share on other sites

It's not just that you don't need it. It's actively harmful to put a ?> in a pure PHP file that might have headers sent after it is included. The effect is to take you out of PHP context and put you into HTML context. However, you don't want to produce output while in HTML context. as it will then break any redirects or other HTTP headers that get sent after that. It's more robust to not use the ?> and end the file in PHP context. You can see this discussed more in the Zend Coding Standards, which prohibit the use of ?> in a pure PHP file (i.e. one that does not produce HTML output).


Always back up before making changes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×