![]() |
Adding 7 days to orders management searches
Hi gang..
A pet peeve of mine since day one was the way orders management can search.. While it's fairly complete, there is one glaring option missing.. Having a LAST 7 DAYS, and no, not the previous week which on Monday searches only Sunday and Monday orders.. My thing is to have last 7 days, regardless when you do this, so if Oct 4 is Monday, it'll still pull the last few days in Sept and go back before Sunday.. I found some of where the code probably goes, but not all of it.. This can't be that big a deal, but I'd bet a lot of people would like this as an option.. There's bound to be one of the xcart programming guru's who can do this in 3-5 min.! Thanks! Marty |
Re: Adding 7 days to orders management searches
Quote:
Me too! |
Re: Adding 7 days to orders management searches
carpe,
i guess we're the only ones..! hmm.. know anyone who could do this? :) Marty |
Re: Adding 7 days to orders management searches
I would like this also.
|
Re: Adding 7 days to orders management searches
well, now it's 1/1/08 and my idea of having a 7 or 14 day review is more noticable.. now you have to do 12/xx/07 to get back to last years items..
if anyone has a clue what to add to search this way let me know.. as xcart already has options for this month and this week, i can't imagine it's that complicated to add last 7 days and last 14 days.. there are several that have asked for it.. im sure someone that lives inside xcart code can do this..! thanks! marty |
Re: Adding 7 days to orders management searches
Here is what you need to modify:
In include/orders.php Section of code just below # # Search by date condition # After this: Code:
elseif ($data["date_period"] == "W") { Add: Code:
elseif ($data["date_period"] == "7") { In skin1/main/orders.tpl After this: Code:
<td width="5"><input type="radio" id="date_period_W" name="posted_data[date_period]" value="W"{if $search_prefilled.date_period eq "W"} checked="checked"{/if} onclick="javascript:managedate('date',true)" /></td> Add: Code:
<td width="5"><input type="radio" id="date_period_7" name="posted_data[date_period]" value="7"{if $search_prefilled.date_period eq "7"} checked="checked"{/if} onclick="javascript:managedate('date',true)" /></td> Above was done using xcart 4.1.9 The php is the same on 4.0.13 branch, but the tpl format changed slightly between 4.0.13 and 4.1.9. To apply this to an older version, just copy your existing code and change the form value and label as appropriate. |
Re: Adding 7 days to orders management searches
GREAT mod! Thanks for posting this. Moving this thread to COMPLETED mods.
|
Re: Adding 7 days to orders management searches
SWEET...!!
Thanks loads. It's perfect! marty Quote:
|
Re: Adding 7 days to orders management searches
Sportruk, Not to be picky here, but think you can add code to get to the 7 days in the Quick Menu, under Orders/User Management? im pretty sure it's just adding a variable but i know if i try, i'll screw it up!
thanks.. i've already used the 7 day option twice! marty |
Re: Adding 7 days to orders management searches
To add the 7 days order search to the Quick Menu you need to change 2 php files.
The array for the quick menu is located in admin/quick_menu.php After: Code:
$quick_menu[$group_name][] = array ("link" => $xcart_catalogs["admin"]."/orders.php?date=W", "title" => func_get_langvar_by_name("lbl_search_this_week_orders")); Add: Code:
$quick_menu[$group_name][] = array ("link" => $xcart_catalogs["admin"]."/orders.php?date=7", "title" => "All orders last 7 days"); You also need to change include/orders.php Change: Code:
# To: Code:
# To make this work you also need to add the "date condition" code to include/orders.php as described in my other post. |
All times are GMT -8. The time now is 11:19 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.