scriptlover Posted July 17, 2012 Share Posted July 17, 2012 hi how i can add a new page to allow only for register user also can i add a link for it in menu_header only for register user best regards Link to comment Share on other sites More sharing options...
♥14steve14 Posted July 17, 2012 Share Posted July 17, 2012 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 More sharing options...
multimixer Posted July 17, 2012 Share Posted July 17, 2012 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 My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
scriptlover Posted July 17, 2012 Author Share Posted July 17, 2012 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 More sharing options...
scriptlover Posted July 17, 2012 Author Share Posted July 17, 2012 hi any help ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.