Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Membership Contribution..?


ivalea

Recommended Posts

First, let me say, please bear with me as I am uncertain if this is in fact the correct way to go in creating this contribution. I'm not well versed in writing php/mysql but have not problems editing it. And, I hope I'm posting this in the correct place.....

 

I am looking into how to go about creating a membership contribution. Here's how I want it to work. I am going to be offering different training classes. These files will be put into a dir. called /training/m1, /training/m2 and so on. Courses can then be added in the admin just like any other product with the product model entered corresponding to the different directories containing each class (m1, m2...). So when a customer purchases one of the courses, they will gain access to only the corresponding directory through a link shown in account.php. I thought that this method might be the easiest way to go about this but am unsure of how to handle certain issues that I think may arise:

 

1. How to keep members out of the directory that they did not purchase? For instance if I purchased m1, I shouldn't be able to access m2. It's not enough to just not show that link as anyone logged in and paying attention to their address bar can easily type in the url they want to get into.

2. I noticed that the product model only gets inserted in the products table in the db. So how would I write the select statement to pull not only the cust.id, but the product model corresponding to their past purchases?

 

I think that may be it. Again, if I'm trying to go about this the hard way and there is an easier way to accomplish this I would definately be open to hearing it. Or even if someone can perhaps write this mod to work the way I described I would pay for it.

Any help at all though would be so appreciated. My deadline for this site is the middle of next week.

 

THANKS! :) - Irene

Link to comment
Share on other sites

The simplest solution is to password protect a folder (through your php.ini or .htaccess) and supply a username and pwd after purchase. You could further restrict access by IP address to prevent distribution of username and pwd.

 

Again, this would be the simplest solution.

Link to comment
Share on other sites

well, only create an .htaccess if you do not have access to your php.ini since the latter is the preferred way.

 

The .htaccess file is best placed in the folder you want to protect, linking to a file containing your pwds away from the public domain (i.e. at least one folder up from your www/ folder).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...