Jump to content

Archived

This topic is now archived and is closed to further replies.

veego

Adding addon fail, Admin report new link not shown

Recommended Posts

Hi Everyone,

 

I have a simple question but i can't figure out the answer.

My background is OSC2.3.1 upgrade step by step to osc2.3.3.1 in Xampp, VMWare, Windows 7 at home.

My store did a lot of addon and all just fine. But I have never add any reports addon because I fail even a few step installation.

 

Detailed Monthly Sales Report v2.3 and fail ( reason on below)

Low stock Report v3.0 and fail ( reason on below)

Low stock Report v1.4 and fail ( reason on below)

 

The major problem is that after installation complete.

The reports panel in Admin page won't show up the new link.

 

Please see the code in admin/includes/boxes/reports.php

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

$cl_box_groups[] = array(

'heading' => BOX_HEADING_REPORTS,

'apps' => array(

array(

'code' => FILENAME_STATS_PRODUCTS_VIEWED,

'title' => BOX_REPORTS_PRODUCTS_VIEWED,

'link' => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED)

),

array(

'code' => FILENAME_STATS_PRODUCTS_PURCHASED,

'title' => BOX_REPORTS_PRODUCTS_PURCHASED,

'link' => tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED)

),

//kgt - discount coupons report

array(

'code' => FILENAME_STATS_CUSTOMERS,

'title' => BOX_REPORTS_ORDERS_TOTAL,

'link' => tep_href_link(FILENAME_STATS_CUSTOMERS)

),

array(

'code' => FILENAME_STATS_LOW_STOCK,

'title' => BOX_REPORTS_STOCK_LEVEL,

'link' => tep_href_link(FILENAME_STATS_LOW_STOCK)

),

array(

'code' => FILENAME_STATS_DISCOUNT_COUPONS,

'title' => BOX_REPORTS_DISCOUNT_COUPONS ,

'link' => tep_href_link(FILENAME_STATS_DISCOUNT_COUPONS)

)

)

);

?>

 

Code on admin/filenames.php, add

 

define('FILENAME_STATS_LOW_STOCK', 'stats_low_stock.php');

 

Code on admin/includes/languages/english.php

 

define('BOX_REPORTS_STOCK_LEVEL', 'Low Stock Report');

 

 

The reports panel on Admin page should show up a link called 'Low Stock Report', but it doesn't.

I m stupidly test by following.

 

change FILENAME_STATS_LOW_STOCK to FILENAME_STATS_CUSTOMERS to see what happen

 

change to

array(

'code' => FILENAME_STATS_CUSTOMERS,

'title' => BOX_REPORTS_ORDERS_TOTAL,

'link' => tep_href_link(FILENAME_STATS_CUSTOMERS)

),

array(

'code' => FILENAME_STATS_CUSTOMERS,

//'code' => FILENAME_STATS_LOW_STOCK,

'title' => BOX_REPORTS_STOCK_LEVEL,

'link' => tep_href_link(FILENAME_STATS_LOW_STOCK)

),

 

guess what happen!! The 'Low Stock Report' link show up in reports panel and when my mouse point to the link, it show https://mystore.com/admin/stats_low_stock.php, but when I click in, it returns to Admin main page. the stats_low_stock.php not pop up.

 

Why this happen?!

the FILENAME_STATS_LOW_STOCK seem to be defined, because the 'link' is point to correct place. But on the other hand, it not work on the 'code' part.

The 'title' will only appear when I change the 'code' FILENAME with on that already exist (like FILENAME_STATS_CUSTOMERS).

 

Expert please help.

 

Thanks

Veego

Share this post


Link to post
Share on other sites

Hi Everyone,

 

Well, I know that is a stupid problem to ask in forum, because those addon work now without a reason.

 

I try few times on above addon and not working.

So I add a different addon that is never try, which is called Products Moniter v3.0 and it works.

So I try adding the addon I fail before and they work! Made me crazy.

 

But thanks for interesting this topic.

 

Veego

Share this post


Link to post
Share on other sites

Hi Everyone,

 

I would like to update, for reference.

The problem above should be cause by my previous addon "Easy Admin Group", which will allow us to assign access permission on the Admin page to different user.

when a new add on being added , Easy Admin Group will block the permission to view because the access permission of this addon was deselected by default and you have to manually selected the new add on function for the user (which is you) to make the addon appear after you logon to Admin page.

 

I hope it help other who have the sample problem.

 

Veego

Share this post


Link to post
Share on other sites

×