You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hello,
My wifes program isn't holding the orders for more than three days. The data/site/program_settings show completed orders set at 360, and pending set at 90, but neither stay for over three days. What might be going on with the time?
Thanks,
It's not the server clock, it's the program. It did this on the old server as well, but I posted at Neural Grid and the server clock is set correctly.
What files should I redo?
The issue is either going to be with:
./library/modules/common/site_cron_define.pl
or
./library/modules/common/date_define.pl
If it isn't with the server date. I've never heard of this before and would think I would have at some point over the last year. What is the date showing up for the orders in the View Online Orders - View All Orders listing in admin?
Offline
My wifes site receives few orders. As it is right now there are no orders in the program.
Before I change any files I'm going to place an order and see what it does. I'll get back to you on it.
I have an order placed and the time and date are correct. I didn't do anything to any files yet so I assume it'll be deleted in three days. I'm going to look at the code and see if I see anything. I doubt I will, I'm not a code junkie, but something is amiss.
The dates you're seeing on the view all orders screen are the file modify dates. That's what's compared to the cron date to determine if any files need to be deleted. If that's right and the system time is right, I don't see how you could be having a problem. To get the cron to run right now, edit the file:
./data/site/cron.db
So that it reads:
1|1
And then access the store. Cron will run and you'll see what you see. After cron runs, that file will then read:
1|xxx
Where xxx is the epoch (seconds since 1/1/1970) when cron ran. Let me know if those orders are still there or not.
Offline
OK, I changed the cron to 1|1 and ran the program and it deleted the order, and the cron reset.
What makes the program write to the cron file?
I can run the program and place orders and the cron stays at it's previous mark. Before I set it back to 1|1 it was several million seconds behind the current time.
The cron only runs once every 30 days, so your difference can be up to 2,592,000 seconds older than the current time, depending on when you check it. If you just want to disable the deletion of orders, change:
#########
######### Delete pending orders.
#########
$directory_to_examine = "$data_path_tracking_pending";
$date_difference_in_days = "$time_period_hold_tracking_pending";
&site_cron_execute;
#########
######### Delete completed orders.
#########
$directory_to_examine = "$data_path_tracking_completed";
$date_difference_in_days = "$time_period_hold_tracking_completed";
&site_cron_execute;
To:
#########
######### Delete pending orders.
#########
$directory_to_examine = "$data_path_tracking_pending";
$date_difference_in_days = "$time_period_hold_tracking_pending";
#&site_cron_execute;
#########
######### Delete completed orders.
#########
$directory_to_examine = "$data_path_tracking_completed";
$date_difference_in_days = "$time_period_hold_tracking_completed";
#&site_cron_execute;
Offline
We may just do that since she is a low voluum business, but I'm one of these guys that has to know why something isn't working right before I'm content. I'll see what happens.
Thanks