Skip to main content

Little help with Orders Automatic Cancel Plugin

More
14 years 1 month ago #64103 by mett
Hello,

I setup this plugin to run at 31 days. Cron work fine (i use cron from our server) and i get this message when i open the link in browser:

Orders checked
Rates successfully updated
Waitlist notifies checked

HikaShop Triggered at 06 Septembrie 2012 10:45

Orders checked

Rates successfully updated

Waitlist notifies checked



But i can't "close" the orders older than 31 days. Should i have to do anyting else?

Thank you

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #64225 by nicolas
Hi,

Can you do a screenshot of the plugin's options ?

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #64272 by mett

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #64397 by nicolas
The value 2678400 equals to 310 days not 31. You should remove a 0.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #64439 by mett
ups, thank you, i removed a 0 but still can't change the status from "Pending" orders to "Refused" (the "Cancelled order statuses" is set to "Refused")

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #64459 by nicolas
The plugin will "cancel" the orders with the status "created". It won't change the orders with another status.

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #64656 by mett
Nicolas, can you confirm me that this code it's ok? I added this code to line 46 in order_auto_cancel.php but i need to be sure before ruin something :)

if ($order->order_status == 'Pending') {
$update->order_status = 'Refused';
} else {
$update->order_status = $status;
}

Thank you

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #64766 by nicolas
You should check the status names in the table hikashop_order of the database. There is normally no uppercase to them.

so it should rather be:
if ($order->order_status == 'pending') {
$update->order_status = 'refused';
} else {
$update->order_status = $status;
}

Also, the statuses pending and refused do not exist by default in HikaShop. The default statuses are:
created
confirmed
cancelled
refunded
shipped

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #64858 by mett
thank you, nicolas, solved

ps: 31 days mean 2.678.400 seconds and not 267.840 seconds: 60sec*60min*24hour*31days

Please Log in or Create an account to join the conversation.

Time to create page: 0.191 seconds
Powered by Kunena Forum