X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing and adding new features (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   A Digital Subscription Module is born (https://forum.x-cart.com/showthread.php?t=111)

minorgod 09-26-2002 01:31 PM

A Digital Subscription Module is born
 
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:
  • \xcart\config.php
    created a new calendar.php \xcart\admin\digital_subscription_calendar.php
    \xcart\admin\orders.php
    \xcart\customer\auth.php
    \xcart\customer\cart.php
    \xcart\customer\featured_products.php
    \xcart\customer\orders.php
    \xcart\customer\product.php
    \xcart\customer\products.php
    \xcart\include\product_modify.php
    \xcart\provider\orders.php
    \xcart\skin2\menu_profile.tpl
    \xcart\skin2\admin\menu.tpl
    created a new calendar.tpl called \xcart\skin2\admin\main\digital_subscription_calen dar.tpl
    \xcart\skin2\customer\home.tpl
    \xcart\skin2\customer\main\product.tpl
    \xcart\skin2\main\product_modify.tpl
    \xcart\skin2\single\home.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.

WordUp 12-18-2002 08:00 AM

Price change
 
Question: with your subscription mod. If the price of a subsciption changes does an existing user price change as well. I'm looking to have the subscription that a user is paying to stay at the price they paid for even if the product subscription goes up or down.

minorgod 12-18-2002 12:42 PM

nope..
 
My module doesn't have that feature. Sorry. I guess you'll need to save the product price info with the subscription info so you can keep a record of the specific customer's price. You could probably add a "renewal_cost" column to your "digital_subscription_customers" table to provide that info. If you need any advice as you work on your module, feel free to ask more questions under this topic. If you start another topic and you want my input, just send me a personal message with the URL for the topic.
Regards,
minorgod.

WordUp 01-02-2003 07:42 AM

Subscription
 
After paying the xteam for this mod the option to globally or individually change a subscription is now available in xcart 3.3.1 ... well at least it is included in the tables. The xcart_tables.sql has been altered the same way my custom one was via the table xcart customer subscription table. However it may not be completely active, due to a missing php file.

My cart can now alow for individual customer subscription changes and global changes. If someone needs the ability to Change subscription fee globally etc. for existing customers let me know. :P

Jon 01-23-2003 01:51 PM

I'd love to get some info on this. How far along is it, has it been completed?

Jon 01-23-2003 01:58 PM

I'd love to get some info on this. How far along is it, has it been completed?

minorgod 01-27-2003 08:48 AM

grrrrrr
 
I'm working on upgrading my digital subscription module from 3.1.3a to 3.3.1 and it's a biotch! Everything works basically the same as the old version, but I'm trying to figure out how to do a "renew" feature for the customer interface, while still using the standard cart/checkout code so that I can allow customers to use all the payment methods. I've ended up basically trying to add another $mode to the cart code for renewals so that when $renewalmode=="true", then the cart won't recalculate and various other things happen instead. Anyway, just wanted to vent my frustration. I hate templates. I'm starting to wish this application were coded in straight PHP so I could understand it!

Jon 01-27-2003 08:50 AM

We're staying with 3.2.1 :(

John7 02-12-2003 11:13 PM

This Module
 
Could this module be use for monthly billed web hosting? I would be interested in that feature.

Thanks

John7

minorgod 02-13-2003 08:51 AM

You could probably use the regular subscription module for that, if you're not tying it into an automated user management system like PLESK. If you did need to tie it into a user management system, it would be a bit trickier. You'd need to write a variation of the module for that purpose.


All times are GMT -8. The time now is 05:10 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.