Quick Link to past 30 days orders
So we switched to 4.1.11 of X-cart back in early December. It was such a PITA to look at the past 30 days orders. So I made a quick link to the past 30 days orders. This should work for later versions of 4.1.x We have it working in 4.1.11
Here's what you do. 1. BACKUP ANY FILES YOU CHANGE..... 2. Make a copy of your admin/orders.php file, rename this copy to orders30.php 3. Open up orders30.php and find the line: Code:
x_session_register("search_data"); AFTER that line insert: Code:
# BCSE 4. Open up include/orders.php and find this code: Code:
elseif ($data["date_period"] == "W") { AFTER it insert: Code:
elseif ($data["date_period"] == "T"){ # BCSE added to do last 30 days 5. Add a link into your skin1/admin/menu.tpl below the line for orders. Example way you can do it. Find: Code:
<a href="{$catalogs.admin}/orders.php" class="VertMenuItems">{$lng.lbl_orders}</a><br /> Code:
<a href="{$catalogs.admin}/orders30.php" class="VertMenuItems">{$lng.lbl_orders} 30 Days</a><br /> That should do it! Variation - Only last 30 days of processed orders. (NOTE if you want to do both the above and this one, ONLY do steps 1-3 and step 5. So do not repeat step 4 again) 1. BACKUP ANY FILES YOU CHANGE..... 2. Make a copy of your admin/orders.php file, rename this copy to orders30p.php 3. Open up orders30p.php and find the line: Code:
x_session_register("search_data"); AFTER that line insert: Code:
#BCSE 4. Open up include/orders.php and find this code: Code:
elseif ($data["date_period"] == "W") { AFTER it insert: Code:
elseif ($data["date_period"] == "T"){ # BCSE added to do last 30 days 5. Add a link into your skin1/admin/menu.tpl below the line for orders. Example way you can do it. Find: Code:
<a href="{$catalogs.admin}/orders.php" class="VertMenuItems">{$lng.lbl_orders}</a><br /> Code:
<a href="{$catalogs.admin}/orders30p.php" class="VertMenuItems">{$lng.lbl_orders} 30 Days Processed</a><br /> Hope that helps some out there. Carrie |
Re: Quick Link to past 30 days orders
Nice, Just implemented this without any issues.
Thanks Carrie |
Re: Quick Link to past 30 days orders
Is there an update on this for newer versions? Thanks
|
Re: Quick Link to past 30 days orders
Quote:
Which version would you like? I might be inclined to program again and see if I can get it to work. :) I don't do much programming anymore since I am managing the business. Thanks, Carrie |
Re: Quick Link to past 30 days orders
The latest version would make the most sense to me. I don't know about the 4.3 or 4.4 versions, but we have it working on 4.2.3 as it is now.... I just haven't had the time to check it out 4.4.2 other than to find that it loads "All" orders, not just the last 30 days.
|
Re: Quick Link to past 30 days orders
Here you go for 4.4.2!!!
Here's what you do. 1. BACKUP ANY FILES YOU CHANGE..... 2. Make a copy of your admin/orders.php file, rename this copy to orders30.php 3. Open up orders30.php and find the line: Code:
x_session_register("search_data"); AFTER that line insert: Code:
# BCSE 4. Open up include/orders.php and find this code: Code:
} elseif ($data['date_period'] == 'W') { AFTER it insert: Code:
elseif ($data["date_period"] == "T"){ # BCSE added to do last 30 days 5. Add a link into your skin/common_files/single/menu_box.tpl below the line for orders. Example way you can do it. Find: Code:
<a href="{$catalogs.admin}/orders.php?date=M">{$lng.lbl_this_month_orders}</a> Code:
<a href="{$catalogs.admin}/orders30.php">Orders 30 days</a> That should do it! Variation - Only last 30 days of processed orders. (NOTE if you want to do both the above and this one, ONLY do steps 1-3 and step 5. So do not repeat step 4 again) 1. BACKUP ANY FILES YOU CHANGE..... 2. Make a copy of your admin/orders.php file, rename this copy to orders30p.php 3. Open up orders30p.php and find the line: Code:
x_session_register("search_data"); AFTER that line insert: Code:
#BCSE 4. Open up include/orders.php and find this code: Code:
} elseif ($data['date_period'] == 'W') { AFTER it insert: Code:
elseif ($data["date_period"] == "T"){ # BCSE added to do last 30 days 5. Add a link into your skin/common_files/single/menu_box.tpl below the line for orders. Example way you can do it. Find: Code:
<a href="{$catalogs.admin}/orders.php?date=M">{$lng.lbl_this_month_orders}</a> Code:
<a href="{$catalogs.admin}/orders30p.php">Orders 30 days Processed</a> Hope that helps some out there. Carrie |
Re: Quick Link to past 30 days orders
How about a Yesterday's Orders version? I played around with the line:
$start_date = $end_date - (30 * 24 * 60 * 60); by changing it to 1 instead of 30, but it doesn't play nice... |
Re: Quick Link to past 30 days orders
Hi Carl,
Digging up a REALLY old thread huh? :D Change the 1 to a 2 and it should work. thanks Carrie |
Re: Quick Link to past 30 days orders
Yeah, that "kind of" works. As long as you are not within 3 or 4 hours of the end or beginning of the day.
|
All times are GMT -8. The time now is 08:14 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.