| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
A member login/logout auth box on non-xcart pages | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
A member login/logout auth box on non-xcart pages
I've seen several requests for the ability to have a login/logout auth box on websites that have their website seperate from their store.
This script simply includes the login box, allowing them to login to the store, and shows the logout box when they are already logged in. It grabs the login variable, so you could expand this further on your pages by doing php mysql queries to do database manipulation with it. Requirements: - This is tested to work on 3.5.8 and I'm not sure if it works on any others. - It assumes that your website pages are in a folder underneath the customer folder (if it is not you must change the path of the require auth.php line) - The page you want the box to appear on must parse php Usage: - Copy the code below and paste into a file called loginscript.php - Upload the file to web server - Open the page you want the box to appear on, and include the loginscript.php The code will look something like: Code:
That's it. Here's the code: Code:
|
|||||||||
#2
|
|||||||||
|
|||||||||
The login/logout right now goes to the store after hitting submit. You could change this to have it login to itself, by changing the redirect variable in the code, and then editing your login.php to redirect based on that new variable.
|
|||||||||
#3
|
|||||||||
|
|||||||||
Nice work.
|
|||||||||
#4
|
|||||||||
|
|||||||||
Re: A member login/logout auth box on non-xcart pages
I am getting the login/logout to work, but I get the following error:
Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 72 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 74 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 83 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 84 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 91 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 237 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 105 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/sessions.php on line 106 Warning: Cannot modify header information - headers already sent by (output started at /home/pullman-holt/www/pullmanholtcorporation.com/cart/index.php:13) in /home/pullman-holt/www/pullmanholtcorporation.com/cart/include/get_language.php on line 155 Any ideas?
__________________
Industrial Webworks Various xcart versions from 4.1.19 gold - 4.7 gold http://www.industrialwebworks.net |
|||||||||
|
|||
X-Cart forums © 2001-2020
|