Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

A Digital Subscription Module is born
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 09-26-2002, 01:31 PM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default 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.
__________________
www.brettbrewer.com
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.
Reply With Quote
  #2  
Old 12-18-2002, 08:00 AM
 
WordUp WordUp is offline
 

Member
  
Join Date: Dec 2002
Posts: 16
 

Default 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.
Reply With Quote
  #3  
Old 12-18-2002, 12:42 PM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default 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.
__________________
www.brettbrewer.com
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.
Reply With Quote
  #4  
Old 01-02-2003, 07:42 AM
 
WordUp WordUp is offline
 

Member
  
Join Date: Dec 2002
Posts: 16
 

Default 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
Reply With Quote
  #5  
Old 01-23-2003, 01:51 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,171
 

Default

I'd love to get some info on this. How far along is it, has it been completed?
Reply With Quote
  #6  
Old 01-23-2003, 01:58 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,171
 

Default

I'd love to get some info on this. How far along is it, has it been completed?
Reply With Quote
  #7  
Old 01-27-2003, 08:48 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default 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!
__________________
www.brettbrewer.com
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.
Reply With Quote
  #8  
Old 01-27-2003, 08:50 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,171
 

Default

We're staying with 3.2.1
Reply With Quote
  #9  
Old 02-12-2003, 11:13 PM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default This Module

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

Thanks

John7
Reply With Quote
  #10  
Old 02-13-2003, 08:51 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

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.
__________________
www.brettbrewer.com
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.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:38 PM.

   

 
X-Cart forums © 2001-2018