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




