1) I would recommend using OnePage Checkout and saving the recurring transaction, duration, and start date along with the order. Also you may use a Scheduler to actually charge the customer. You can use any .NET based job scheduler for doing this task. For this example you can use Quartz.net
. You can add it to your project by using Nuget. I have included some code snippets for your reference. Please feel free to change the code below according to your needs.
HourlyJob : IJob
JobDetail job =
Guid roleId = Guid.NewGuid();
//Id of the role you want to remove the user from.
RoleManager roleManager = RoleManager.GetManager();
UserManager userManager = UserManager.GetManager();
var role = roleManager.GetRole(roleId);
var users = userManager.GetUsers();
(roleManager.IsUserInRole(user.Id, role.Id) && MyCustomRuleForDeterminingIfUserHasToBeRemovedFromRole(user.Id,role.Id))
MyCustomRuleForDeterminingIfUserHasToBeRemovedFromRole(Guid userId, Guid roleId)
//Add your custom logic here
and in Global.asax in your Application_Start method, register the Job using the snippet below.
sender, EventArgs e)
2) Inventory tracking is not built into ECommerce module yet. But you can take advantage of a feature we introduced in 5.0 to achieve inventory tracking. Let me explain how this will work - You will
add a custom field called "InventoryLeft" to the product type and enter the inventory amount there. You will then make use of "Post Purchase hook" which is already present in Ecommerce module to decrease
the inventory amount when someone purchases a product. When the number is ZERO. You will make the product InActive which will take the product out of listing. As soon as you make a product inactive,
our new feature in 5.0 called "Out of Stock" will automatically take care of all the existing carts and will warn the users that the product is out of stock and cannot be purchased.
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items