Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add new page for register user only


scriptlover

Recommended Posts

Have a look in your includes/header.php file. There is a section of code there that adds a 'my account' button next to the other buttons near the top of the page. You may be able to utilise something similar.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

You can take a look here for illustrated examples about how to add buttons to header, for registered, unregistered or all users

 

To make the new page accessible only for registered users, add to the top of the file

 

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

 

Just after

 

 require('includes/application_top.php');

 

Example you can see eg at checkout_shipping.php

Link to comment
Share on other sites

hi

this my header code

<?php
/*
 $Id$
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2010 osCommerce
 Released under the GNU General Public License
*/
 if ($messageStack->size('header') > 0) {
   echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';
 }
?>
<?php
	    if ($oscTemplate->hasBlocks('boxes_header')) {
?>
<div id="header"><?php echo $oscTemplate->getBlocks('boxes_header'); ?></div>
<?php
  }
?>

<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
   <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
 </tr>
</table>
<?php
 }
 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
 </tr>
</table>
<?php
 }
?>

<?php
?>

i am sorry i dont found code like the same you give me

also did i must add some thing in filenames.php or other file

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...