| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Login From a page Outside of Xcart directory | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Login From a page Outside of Xcart directory
I had the need to login to the xcart store from an .htm page that was outside my xcart main directory. I couldn't find a post with the info so I thought I'd share it. With a few simple lines I was easily able to login from an html page. Here is the code:
First, open up include/login.php Find: Code:
Add Just Before that line: Code:
Next, Find: Code:
And Replace With: Code:
Now - You'll need to open up the HTML page you want to login from and add make sure that your User Name input box has the name of "username" and the password box has the name of "password". You'll also need to add a hidden input box with the name of "outsideLogin" Here's a sample from my HTML: Code:
The last thing you'll need to do is make sure the action on your form has the following path: [xcart path]/include/login.php Hopefully - that can help someone else!
__________________
4.1.6 - gold Unix |
|||||||
#2
|
|||||||
|
|||||||
Thanks for your post!
Are you using it to avoid anonymous visitors? I would like to use x-cart a a website only accesible for my registered clients (sort of a extranet inside my public websitepage). Does somebody know how to forbid entry to non-registered visitors? EDITED: I found this topic that may help other users with the same problem http://forum.x-cart.com/viewtopic.php?t=14069 Regards, David
__________________
David Estapц╘ X-cart version \"x-cart-4[1].0.17gold\" |
|||||||
#3
|
|||||||||
|
|||||||||
Thanks for the code, i have completed the extra code you missed out for the username on the html page and also a link to register a new account and recover the password link. Just replace the www.shisha.co.uk/shopcart/ with your own web site address.
Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|