Hello,
I am attempting to install Purchase Without Account on my store that uses a template. I have successfully edited all the files except for the very last compulsory step (17). This is PWA 2.1.
Step 17 says:
#############################
17.in catalog/includes/header.php
***FIND:
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td>
***REPLACE WITH:
<!-- PWA BOF -->
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><?php if (tep_session_is_registered('customer_id') && (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) && !$order->customer['is_dummy_account']) { ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td>
<!-- PWA EOF -->
#######################################################################################
I have searched my header.php file and cannot find all of what it is asking me to replace. I understand with templates the files are not the same in most cases, so I am hoping someone can assist or point me in the right direction. I have also looked in the rest of the /catalog/includes files and can't seem to see it in any of them either.
Here is my header.php file - just in case I am missing something. If anyone can offer any advice I would really appreciate. I am so close yet so far to getting this installed, if I can get over this final step I should be sorted. Thanks in advance.
header.php file
<?php
/*
$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
}
// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
}
// check if the session folder is writeable
if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
if (!is_dir(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
} elseif (!is_writeable(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
}
}
}
// check session.auto_start is disabled
if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
}
if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
}
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
<?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
}
?>
<!-- start -->
<table cellpadding="0" cellspacing="0" border="0" align="center" class="width"><tr><td class="width_td">
<div class="bg_main"><div class="bg2_main"><div class="bg3_main"><div class="bg4_main">
<table cellpadding="0" cellspacing="0" border="0" align="center" class="bg5_main"><tr><td class="bg6_main">
<table cellpadding="0" cellspacing="0" border="0" align="center" class="bg7_main"><tr><td class="bg8_main">
<table cellpadding="0" cellspacing="0" border="0" class="bg9_main">
<tr><td class="row_1">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="logo"></td></tr>
<tr><td class="nav">
<table cellpadding="0" cellspacing="0" border="0" class="menu">
<tr><td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="menu_td">
<table cellpadding="0" cellspacing="0" border="0" class="menu_table">
<tr><td style="width:9%;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td><a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image_button('m1.gif')?></a></td>
<td class="m_sep"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td><a href="<?php echo tep_href_link('products_new.php')?>"><?php echo tep_image_button('m2.gif')?></a></td>
<td class="m_sep"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td><a href="<?php echo tep_href_link('specials.php')?>"><?php echo tep_image_button('m3.gif')?></a></td>
<td class="m_sep"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td><a href="<?php echo tep_href_link('account.php')?>"><?php echo tep_image_button('m4.gif')?></a></td>
<td class="m_sep"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td><a href="<?php echo tep_href_link('contact_us.php')?>"><?php echo tep_image_button('m5.gif')?></a></td>
<td style="width:11%;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
</tr>
</table>
</td>
<td class="lang">
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td style="width:100%;"><?php
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
$languages_string = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
$languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a>';
}
echo $languages_string;
?></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
<tr><td></td></tr>
</table>
</td></tr>
<tr><td class="nav">
<table cellpadding="0" cellspacing="0" border="0"><tr><td class="nav2">
<table border="0" cellspacing="0" cellpadding="0" class="header">
<tr>
<td class="header_td" align="center">
<table border="0" cellspacing="0" cellpadding="0" align="center" style="width:183px;">
<tr><td><? if (tep_session_is_registered('customer_id')) {
?><span><a href="<?php echo tep_href_link('logoff.php')?>"><?php echo HEADER_TITLE_LOGOFF?></a></span><? } else
{ ?><span><a href="<?php echo tep_href_link('login.php')?>"><?php echo HEADER_TITLE_LOGIN?></a></span><? }
?></span></td>
</tr>
</table>
</td>
<td><?php echo tep_draw_separator('spacer.gif', '4', '1'); ?></td>
<td class="header2_td" align="center">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:346px;">
<tr>
<td class="z1"><b><?php echo BOX_HEADING_SHOPPING_CART?>:</b><strong><?php echo BOX_SHOPPING_NOW?></strong><a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a></td>
</tr>
</table>
</td>
<td><?php echo tep_draw_separator('spacer.gif', '4', '1'); ?></td>
<td class="header_td" align="center"><?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+170) . 'px"') . ' ' . tep_hide_session_id() .'<input type="submit" name="Submit" value="Search">' . '</form>'; ?></td>
</tr>
</table>
</td></tr></table>
</td></tr>
</table>
</td></tr>
<tr><td class="row_2">
<!-- end -->