Active
Project:
UC Recurring Payments and Subscriptions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 May 2013 at 17:11 UTC
Updated:
27 Jun 2013 at 22:23 UTC
As we want to keep order history when a user cancels their account their recurring order is left untouched. Now if the user account was completed deleted then I am sure the recurring order would be removed as well. I have looked through rules and cannot find a way to setup a trigger for when a user account is blocked or cancelled to cancel the recurring order.
Is there something in place for this and if so what is the process to make it happen? Do I need to create a custom module for this?
Comments
Comment #1
tinker commentedIt does not make sense from an accounting point of view to cancel orders when subscriptions are canceled. When a subscription starts the original order has completed successfully and money has been exchanged. If you cancel the subscription at that point then the original order should only be canceled if you refund the money. Since refund is a manual process the order should be canceled manually.
Also you have to consider if the customer purchases more than one product in the order. You cannot cancel the whole order unless all of the products have been returned and money refunded.
Comment #2
glynster commentedThanks for the response. However it looks like you misread my original post. I am not trying to cancel an order I am trying to cancel a subscription. If a user cancels their account then the recurring order should stop as that user can no longer log into their account to cancel it. That is the bigger issue. You cannot force a user to cancel their subscription first and then cancel their account. The user will always go for the easier option which is cancel their account. This is all based on a production server so we do have user cases where this has occurred so this is quite common. If there is something in place that triggers a subscription to be moved into a cancelled state when a user cancels their account this would help greatly.
Again thank you for your help and I hope this helps clarify the issue.
Comment #3
tinker commentedglynster, sorry I misread. Yes this does make sense. Could use hook_user_delete(), find all orders, check if order contains recurring fees, if it does use uc_recurring_uc_order('delete', $order, $order).
Comment #4
glynster commentedAh OK perfect then.
Thanks for the heads up there