Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"View All" Links in Admin?


mjm

Recommended Posts

I want to add a "View All" link to several sections (Customers, Orders, Countries, Reports, etc) in the admin area. I have searched high and low for a way to do this but haven't had any luck. Does anyone know how to add this functionality?

 

Thanks!

Link to comment
Share on other sites

Anyone know how to do this?

 

well, view all would mean override the standard query limit. Not just in the initial page but also in additional pages.

 

You can ofcourse but you need to add a link that provides an action.

Then check that action in the top of your page and override the limit.

 

not easy but also not too difficult.

Treasurer MFC

Link to comment
Share on other sites

I understand the idea behind getting it to work, however actually coding it seems difficult. I was reviewing the code last night and there is a function that splits the results up into multiple pages. Perhaps modifying that function to not split the results would be an ideal situation?

 

Hmmmmmm.......

 

Any input would be greatly appreciated :)

Link to comment
Share on other sites

I just setup a nasty little hack to get this to work. If anyone else is interested here it is...

 

#1. open whatever file you want to display all results in.

#2. find this function "splitPageResults"

#3. in that function change MAX_DISPLAY_SEARCH_RESULTS to $display_amount

#4. Add the follow snippet just above that functions line

 

    // this should display all customers at once.
// _very_ nasty way of doing this, but it appears to work
// for now....
   if ($display_all == "on")
{
     $display_amount = "999999999999999999999999999999999";
}
   else
{
     $display_amount = MAX_DISPLAY_SEARCH_RESULTS;
}

 

#5. Scroll down to where the page displays the selection box (uses display_links)

#6. Add something like this (obviously need to update for your page).

 

echo '<a href="' . tep_href_link(FILENAME_WHATEVER_THIS_PAGE_IS, tep_get_all_get_params(array('cID')) . 'display_all=on') . '">(Show All)</a> ';

 

this is working for me, if you use it and mess something up dont complain to me.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...