Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2007
    Posts
    18
    Plugin Contributions
    0

    Default Custom download login for elearning

    Hi Zenners

    I've been looking for a solution that I know you can help with.

    I need to add PHP/SQL POST codes to an order page to create a separate login form. I'm having fun trying to find the pages where this is located.

    If you'd like to comment, here's my proposed login scenario:
    I'm using ZenCart as the frontend of an online school. Students shop for classes, then pay and enroll through the shopping cart. I'm using the "downloads" function to link students to the webpage of their course where they work online. (There are no actual downloads).

    What I need is a login page located between the shopping cart and the classes. Otherwise, anyone can access the class at anytime through the URL on the class pages.

    Ideally, I'd like to maintain Zen Cart's control over the download. This is because the product filename ( which is a link in the shopping cart) becomes deactivated after X days or X clicks, as determined by the Admin. This is a great feature, because access control will also change on a separate login page when the order status changes to delivered or expired. The Admin can also boot students using this feature.

    So, to me, the solution seems to be adding a POST feature to the PHP order page that would also insert the order id, email, password, filename, and order status data into the separate login database when the order is placed. If the order status is equal to 2 (processing) and the email/password are correct, then the student would be redirected to the class' web page. When the order status changes, the login fails. When the student enrolls in a new course, the class filename is overwritten in the separate login database, providing a new redirection URL.

    Has anyone seen something like this in action....or can you suggest some pages and PHP code. It should really be an easy add on. I have everything else.

    Thanks. Long post...but, I needed to get my logic out there cause SQL is still a language I'm trying to learn. Take care. websitebob

  2. #2
    Join Date
    Apr 2006
    Posts
    265
    Plugin Contributions
    0

    Default Re: Custom download login for elearning

    I'm fairly certain that in the downloads section there are some mods to give you really fine control over who can see what products on your site ... combine that with a subscription mod ... the subscription mod will hopefully give you the expiration that you need ... then create 'products' (that aren't really products - I'd use documents - general) that only subscribers can see ....

    Anyway, that's how I'd approach it.

    BrandTim

  3. #3
    Join Date
    Aug 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Custom download login for elearning

    Thanks BrandTim

    I like hearing from other users how they would approach a situation. The great thing is that everyone can come up with interesting solutions.

    I think I'm still going to press for a different solution since the online classes (which are web pages) are located on the same website, but not within Zen Cart. I'll still need to either password protect each class page (using a session variable to keep them open) or obfuscate their URLs in some manner for access control. So, of course, that's why I'm still thinking about a login located between the shopping cart and the class pages.

    I need to dig around to find where the POST codes are located when the order is placed. If I enter additional PHP code, I can have data sent to the login database, where the username, password, class url, and the expiration status of the class can be checked during authentication.

    Anyone know which page contains this POST info?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Custom download login for elearning

    I'd be inclined to generate a userid for your (separate) classroom system during the order-creation phase. This ID could be included on the receipt, and would be valid as long as that other system wants it to be.
    In the order-confirmation details (which are also visible in their My Account area), you would give them the URL and the username, with perhaps a generated password.

    That way the ecommerce portion is complete when the order is placed, and the classroom processes can run separately with their own authentication system to manage authorized users.

    The only thing Zen Cart would have to do is:
    - generate the username/password in the external system via a database record insert
    - include that username/password and URL in the order info
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Custom download login for elearning

    Thanks DrByte

    I like your thinking.

    I am considering your advice: issuing a stock username and password for each class as part of the checkout confirmation. Certainly much simpler than what I've been pondering. And, enjoying a challenge, I'm still considering the tougher route.

    What I have been trying to configure is a connection between Zen Cart and an open source login application named Login Redirect V 1.3.1.

    http://www.mpdolan.com/login_redirect.htm

    The values to Login Redirect are many: 1) Web pages are accessed by specific user accounts 2) The Login app comes with an Admin Panel, user IP address logs, user password management, and url redirect management.

    What I'm trying to achieve with this app is: At the completion of the download checkout, the student gets immediate access to the class...via the download URL which is the class web page (password protected by the Login app). To do this, I installed the Login Redirect's tables in Zen Cart and I'm trying to find the easiest way to insert data from the Zen Cart customer and orders tables into the Redirect Login tables.

    If anyone is interested in helping, I'm attaching a flowchart of the data field relations as I see them.

    As if that wasn't challenging enough...I'm also trying to pass the order status from Zen orders to the Login table "authorize." In this way, if an order status is "pending" (i.e. payment is not received) or expired...then the Login ceases to be valid, going from "verified" to "unverified." I haven't gotten to using an update command for the expired staus, yet.

    So, in no way discounting DrByte's great advice, I'd be thrilled to hear even more great ideas or input on this one! Thanks again. websitebob
    Attached Images Attached Images  
    Last edited by websitebob; 3 Sep 2007 at 06:40 AM.

  6. #6
    Join Date
    Apr 2006
    Posts
    265
    Plugin Contributions
    0

    Default Re: Custom download login for elearning

    Quote Originally Posted by websitebob View Post
    I am considering your advice: issuing a stock username and password for each class as part of the checkout confirmation. Certainly much simpler than what I've been pondering.
    As a paying customer, I'd be annoyed with this solution. At this point, I would have already had to generate a username/password combination for your website in order to sign up for the class and then I'd be given yet another username/password and a special URL to keep track of in order to get to the class. It's simpler for you, yes ... but more complex for your customer.


    Quote Originally Posted by websitebob View Post
    What I'm trying to achieve with this app is: At the completion of the download checkout, the student gets immediate access to the class...via the download URL which is the class web page (password protected by the Login app).
    Let me restate this more simply: A customer buys a subscription which gives them access to otherwise restricted pages. I've mentioned it before, but wouldn't this do what you want?

    Compare the difficulty of combining the authentication of the two programs with the difficulty of batch-adding your existing web pages into EZ-pages... I could probably do the latter in just a few hours or less...

    BrandTim

  7. #7
    Join Date
    Aug 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Custom download login for elearning

    Thanks BrandTim

    After reading your post, I returned to once again download and review the ReadMe files of the Subscription System mod. To be honest, the mod wasn't clear to me the first couple times I read the developer's notes. The concept sounds similar to what I am trying to achieve.

    My instinct, after reading the notes and not seeing feedback on the mod (350 current downloads), is to watch before I leap. I may set up a stand alone shopping cart to test it, but only time will tell us how well it holds up. No one likes restoring a corrupted site.

    The difference between my current thoughts and the mod is this: Students access the mod by logging into their user accounts. I was looking at creating one central login on my nav bar for all classes. That login, using the Login Redirect app, would work as a switching station to send students to the correct URL outside of Zen Cart based on their username. The downside: Yes, right now with the way I have the class enrollment/registration set up, it would require the student to create a unique username (or screen name) for each class. The username is the variable which determines the redirect URL. It could be their email address.

    I value your input and I am still looking at options. I still have to say that I am drawn to Login Redirect from an Admin and security perspective: Its the logs and the separate control panel. It gives you a sortable list of the times and IPs of each login with the usernames. Thats a balance I think we all look at ... giving up some usability for more security. I screen my logs and my user activity quite a bit and it is something I have come to value, especially where unusual activity can prove damaging to the overall site.

    I'll check it out. Thanks again.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Custom download login for elearning

    Quote Originally Posted by websitebob View Post
    I am considering your advice: issuing a stock username and password for each class as part of the checkout confirmation. Certainly much simpler than what I've been pondering.
    I was suggesting a unique username, not a generic one.
    It "could" be their email address ... same as Zen Cart.
    With some creativity in password logic, you could even have it use the same password.


    Quote Originally Posted by brandtim View Post
    As a paying customer, I'd be annoyed with this solution. At this point, I would have already had to generate a username/password combination for your website in order to sign up for the class and then I'd be given yet another username/password and a special URL to keep track of in order to get to the class. It's simpler for you, yes ... but more complex for your customer.
    I can't say that I agree with Tim completely here.
    If I'm buying education ... specifically an online course ... then I'm most likely going to be logging in to the training system 90% of the time, and only logging into the store occasionally.
    I don't think this scenario requires the two to be joined at the hip. Granted, that doesn't mean you shouldn't make it as simple as possible. But I wouldn't think the store needs to be the main entry point all the time.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Aug 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Custom download login for elearning

    DrByte

    As always...it is a delight to have you drop by. Both you and BrandTime have far more experience (and different experiences) with Zen Cart. (I only need 22,360 posts to catch up with you).

    I'm still just putting pages together, so my experience is still pretty narrow. I appreciate both of your input and will always look forward to hearing more.

    Thanks and have a zenned day.
    websitebob

 

 

Similar Threads

  1. Replies: 3
    Last Post: 15 May 2014, 05:35 PM
  2. Customers cannot login using my custom login box
    By pb4 in forum General Questions
    Replies: 13
    Last Post: 29 Nov 2010, 11:33 AM
  3. Download ABOUT US - Inserting Custom Page Into Sidebox
    By Centec2b in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 31 Jul 2008, 07:07 PM
  4. Define Custom Page Titles for Individual Pages - not custom titles for site wide use
    By antonyx in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 May 2008, 06:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg