Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to use the login function on another page?


Tylenol

Recommended Posts

Posted

Hello,

 

I'd like to use the built in login system for custom pages i have uploaded to my site. Obviously the dir structure must be the same, but i'm not sure how to integrate the login. What lines do i need out of that file, and what do i attach them to?

I've tried just copying the php over, i had my doubts and sure enough it didnt work. It just gave me a parse error with an unexpected $end after </html>

 

Thanks for help in advance!

Posted

Make sure that you include application_top.php in those pages - to keep the breadcrumb trail and session id, and then make the pages SSL pages - as people have to be logged in to view SSL pages e.g

 

require('includes/application_top.php');

 if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWNAME);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWNAME, '', 'SSL'));

 

and a few lines further down:

 

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

 

Vger

Posted

Ok - But quick question! For the SSL pages, i do not have an SSL server. Does this matter? Thanks for the help, amazing. Gonna test it out shortly, i'll letcha know! :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...