In case anyone is interested, I have nearly completed my DigitalSubscription module for X-Cart. It works almost identically to the regular subscription module, but it allows you to specify a protected directory which users can gain access to after they pay for the specific product to which the subscription is attached via the x-cart admin area. The users are then able to broswe their DigitalSubscriptions via their user profile area. The actually directory protection is handled via a script that modifies .htaccess files (Apache servers only) in the specified directories when users purchase a subscription.
I will probably only make the files available by request because creating this module required modifying many x-cart files and I'm not about to bug test them myself for everyone's various x-cart installs. Suffice it to say, I had to modify all of the following files:
created a new calendar.php \xcart\admin\digital_subscription_calendar.php
created a new calendar.tpl called \xcart\skin2\admin\main\digital_subscription_calen dar.tpl
In addition I had to create the actual digital subscription module files (both php and tpl files) and modify the x-cart database by adding two new tables based on the original subscription module's tables.
It was a lot of work. In retrospect I'm not sure if x-cart "modules" actually qualify as what I've always considered to be modules. They are definitely not plug-in type modules and are not particularly easy to figure out or to code.
The last thing I need to do before the module is ready for prime-time is to add the .htaccess delete routines for when a user unsubscribes or his subscription expires. Hopefully the site will actually be live in another week so interested parties can see it in action. I'm not even sure why I'm telling everyone except that I was so excited about figuring this out that I had to tell SOMEONE. I think the file list above might be helpful for anyone else trying to write a module. You've got to modify more files than you might think.
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.