Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

putting login info box in header


lindsayanng

Recommended Posts

Ok.. i THOUGHT I was going to be able to do this, but it does not seem like its going to happen the way i THOUGHT it would. If you look at my site, on the right I have a shopping cart in the header - i would LIKE to have the account log-in in the header as well, and i found this GREAT contribution that will also show your account info in that same box once you are logged in.. So i added it (even though it was MEANT to be in an infobox..

 

Well, it KINDA worked, but i can not figure out how to customize it so that the table is just a basic table with a sqaure boarder, 2px outline. So basically i just want to get rid of the header which is using the default infobox header, and make the table the right size..

 

I dont get it, and i am really annoyed so ANY help is GREATLY appreciated!! OR, if you know of a contribution that does this a little "neater" for the header, i would be happy with that as well

 

<?php
if (!tep_session_is_registered('customer_id')) {
?>
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_LOGINBOX_HEADING
);
new infoBoxHeading($info_box_contents, false, false);
$loginboxcontent = "
<table border=\"1px\" width=\"144px\" cellspacing=\"0\" cellpadding=\"0\">
<form name=\"login\" method=\"post\" action=\"" . tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . "\">
<tr>
<td align=\"left\" class=\"main\">
" . BOX_LOGINBOX_EMAIL . "
</td>
</tr>
<tr>
<td align=\"left\" class=\"main\">
<input type=\"text\" name=\"email_address\" maxlength=\"96\" size=\"20\" value=\"\">
</td>
</tr>
<tr>
<td align=\"left\" class=\"main\">
" . BOX_LOGINBOX_PASSWORD . " " . BOX_LOGINBOX_FORGOT_PASSWORD . "
</td>
</tr>
<tr>
<td align=\"left\" class=\"main\">
<input type=\"password\" name=\"password\" maxlength=\"40\" size=\"20\" value=\"\"
</td>
</tr>
<tr>
<td class=\"main\" align=\"center\">
" . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN, 'SSL') . "
</td>
</tr>
</form>
<tr>
<td align=\"left\" class=\"main\">
" . BOX_LOGINBOX_NEW . "
</td>
</tr>
</table>
";
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => $loginboxcontent
);
new infoBox($info_box_contents);
?>
</td>
</tr>
<?php

// WebMakers.com Added: My Account Info Box
} else {
if (tep_session_is_registered('customer_id')) {
?>

<!-- my_account_info //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_LOGIN_BOX_MY_ACCOUNT
);
new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' =>
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_EDIT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . LOGIN_BOX_ADDRESS_BOOK . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') . '">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' . LOGIN_BOX_LOGOFF . '</a>'
);
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- my_account_info_eof //-->

<?php
}
}
?>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

oh yea, that is the code for the infobox. That code is places within a table that has the banner and shopping cart in it, but i do not think you need that. If you do i will post the entire header page for you.

 

oh yea.. and here is the link to my site so you can see what is going on:

 

FURRY FAMILY

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Does anyone think they can help out here???

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I actually ended up taking it down and started looking for a better, newer one.. but the one you linked to, i BELIEVE i tried it, but it did not seem to work EXACTLY the way i wanted it to..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I get an unexpected "}" on line 120..

 

heres the code i added

 

<!-- loginbox //-->
<?php 
if (!tep_session_is_registered('customer_id')) {
?>
<table width="310"><tr> <td>
<?php

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))
								 . '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="3" class="smallText">'
							 .'<tr><td class="smallText">'
							 . tep_draw_separator('pixel_trans.gif', '2', '1') 
							 . BOX_LOGINBOXH_EMAIL
							 . '</td><td  class="smallText" colspan="3">'
					 		 . tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"') 
							 .'</td></tr><tr><td class="smallText">'
							 . tep_draw_separator('pixel_trans.gif', '2', '1') 
							 . BOX_LOGINBOXH_PASSWORD
							 . '</td><td class="smallText">'
							 . tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
							 . '</td><td class="smallText">'
							 . '<a href="'
							 . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')
							 . '">'
							 . BOX_LOGINBOXH_FORGOT_PASSWORD 
							 . '</a></td></tr><tr><td class="smallText" colspan="3">'
							 . tep_draw_separator('pixel_trans.gif', '5', '25')
							 . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)
							   . '</form>'
							 . tep_draw_separator('pixel_trans.gif', '5', '1')
							 .  BOX_LOGINBOXH_TEXT_NEW
							 . '<a href="'
							 . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')
							 . '">'
							 . BOX_LOGINBOXH_NEW
							 . '</a></td></tr></table>' 
							;								 

$info_box_contents = array();
$info_box_contents[] = array('align' => '',
							 'text'  => $loginboxcontent);
new infoBox($info_box_contents);
?>
		</td>
	  </tr></table>
<?php
 } else {
 // If you want to display anything when the user IS logged in, put it
 // in here...  Possibly a "You are logged in as :" box or something.
 }
?>
<!-- loginbox_eof //-->
<?php
// WebMakers.com Added: My Account Info Box
} else {
 if (tep_session_is_registered('customer_id')) {
?>

<!-- my_account_info //-->
 <table width="310"><tr>
		<td>
<?php


 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td class="smallText" colspan="2">'
						   . tep_draw_separator('pixel_trans.gif', '2', '1')
						   . '<b><center>' 
						   . tep_customer_greeting() 
						   .'</b></center></td></tr><tr><td class="smallText">'
						   . '<tr><td class="smallText" colspan="2">'
						   . tep_draw_separator('pixel_trans.gif', '2', '20')
						   . '<b>' 
						   . BOX_HEADING_LOGIN_BOX_MY_ACCOUNT 
						   .'</b></td></tr><tr><td class="smallText">'
						   . tep_draw_separator('pixel_trans.gif', '2', '15') .
 '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') .'">' . LOGIN_BOX_MY_ACCOUNT . '</a><td class="smallText">' .
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_EDIT . '</a></td></tr><tr><td class="smallText">' . tep_draw_separator('pixel_trans.gif', '2', '1') .
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><td class="smallText">' . 
									  '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') .'">' . LOGIN_BOX_ADDRESS_BOOK . '</a></td></tr><tr><td class="smallText">'  . tep_draw_separator('pixel_trans.gif', '', '1') . 
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') .'">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><td class="smallText">' . 
									  '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') .'">' . LOGIN_BOX_LOGOFF . '</a></td></tr></table>');
 new infoBox($info_box_contents);
?>
		</td>
	  </tr></table>
<!-- my_account_info_eof //-->

 

I didn't want to just upload the new header.php because i already added a bunch of contributions to that file, so i just found the code for the box and figured i would add it..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

GAHHH why is it telling me that the code has an unexpected } ?!?!?!?! i just did a copy and paste and COULD NOT find anything in the text docs. i THINK i counted the } to see if they matched correctly.. everything SEEMS ok..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

OMG sorry.. SO STUPID!!

 

<?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');
}
?>

<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if ($show_user_options) { ?><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>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">

<!-- loginbox //-->
<?php
if (!tep_session_is_registered('customer_id')) {
?>
<table width="310"><tr> <td>
<?php

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))
. '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="3" class="smallText">'
.'<tr><td class="smallText">'
. tep_draw_separator('pixel_trans.gif', '2', '1')
. BOX_LOGINBOXH_EMAIL
. '</td><td class="smallText" colspan="3">'
. tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"')
.'</td></tr><tr><td class="smallText">'
. tep_draw_separator('pixel_trans.gif', '2', '1')
. BOX_LOGINBOXH_PASSWORD
. '</td><td class="smallText">'
. tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
. '</td><td class="smallText">'
. '<a href="'
. tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')
. '">'
. BOX_LOGINBOXH_FORGOT_PASSWORD
. '</a></td></tr><tr><td class="smallText" colspan="3">'
. tep_draw_separator('pixel_trans.gif', '5', '25')
. tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)
. '</form>'
. tep_draw_separator('pixel_trans.gif', '5', '1')
. BOX_LOGINBOXH_TEXT_NEW
. '<a href="'
. tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')
. '">'
. BOX_LOGINBOXH_NEW
. '</a></td></tr></table>'
;

$info_box_contents = array();
$info_box_contents[] = array('align' => '',
'text' => $loginboxcontent);
new infoBox($info_box_contents);
?>
</td>
</tr></table>
<?php
} else {
// If you want to display anything when the user IS logged in, put it
// in here... Possibly a "You are logged in as :" box or something.
}
?>
<!-- loginbox_eof //-->
<?php
} else {

if (tep_session_is_registered('customer_id'))
{
?>

<!-- my_account_info //-->
<table width="310"><tr>
<td>
}
<?php


$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td class="smallText" colspan="2">'
. tep_draw_separator('pixel_trans.gif', '2', '1')
. '<b><center>'
. tep_customer_greeting()
.'</b></center></td></tr><tr><td class="smallText">'
. '<tr><td class="smallText" colspan="2">'
. tep_draw_separator('pixel_trans.gif', '2', '20')
. '<b>'
. BOX_HEADING_LOGIN_BOX_MY_ACCOUNT
.'</b></td></tr><tr><td class="smallText">'
. tep_draw_separator('pixel_trans.gif', '2', '15') .
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') .'">' . LOGIN_BOX_MY_ACCOUNT . '</a><td class="smallText">' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_EDIT . '</a></td></tr><tr><td class="smallText">' . tep_draw_separator('pixel_trans.gif', '2', '1') .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><td class="smallText">' .
'<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') .'">' . LOGIN_BOX_ADDRESS_BOOK . '</a></td></tr><tr><td class="smallText">' . tep_draw_separator('pixel_trans.gif', '', '1') .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') .'">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><td class="smallText">' .
'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') .'">' . LOGIN_BOX_LOGOFF . '</a></td></tr></table>');
new infoBox($info_box_contents);
?>
</td>
</tr></table>
<!-- my_account_info_eof //-->

<tr> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'furryfamilylogo.jpg', 'furryfamilylogo') . '</a>'; ?></td>
<td><table border="2px" cellspacing="0" cellpadding="10">
<tr><td class="headerCart"<b>Your Cart Contains</b><br><a class="headerCart" href=<?=tep_href_link('shopping_cart.php')?>><?=$cart->count_contents()?>
items<br>Sub Total: <?= $currencies->format($cart->show_total())?><br>
</br>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"class="headerCart"><?php echo HEADER_TITLE_CHECKOUT;?></a> | <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerCart"><?php echo HEADER_TITLE_MY_ACCOUNT; ?>
</a>
</td>
</tr>
</table>

<? //---PayPal WPP Modification START ---// ?>
<?php
if (tep_session_is_registered('customer_id')) {
$show_user_options = true;
if (tep_paypal_wpp_enabled() && tep_session_is_registered('paypal_ec_temp')) {
//If this is a temp account that'll be deleted, don't show account information
if ($paypal_ec_temp) {
$show_user_options = false;
}
}
} else {
$show_user_options = false;
}
?>

<? //---PayPal WPP Modification END ---// ?>
</tr>
</table>
<?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(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($HTTP_GET_VARS['info_message']); ?></td>
</tr>
</table>
<?php
}
?>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

In this section

<!-- loginbox_eof //-->
<?php
} else {

if (tep_session_is_registered('customer_id'))
{
?>

<!-- my_account_info //-->

Change

} else {

to

else {

Also in this section

<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if ($show_user_options) { ?><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>
</table>

you need a </tr> before the </table>

 

In this section

<tr> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'furryfamilylogo.jpg', 'furryfamilylogo') . '</a>'; ?></td>
<td><table border="2px" cellspacing="0" cellpadding="10">
<tr><td class="headerCart"<b>Your Cart Contains</b><br><a class="headerCart" href=<?=tep_href_link('shopping_cart.php')?>><?=$cart->count_contents()?>
items<br>Sub Total: <?= $currencies->format($cart->show_total())?><br>
</br>

Change

<td class="headerCart"

To

<td class="headerCart">

Link to comment
Share on other sites

Which contrib do have? I think this is still messed up.

Do the above but also do this. In this section

<!-- my_account_info //-->
<table width="310"><tr>
<td>
}

Remove the }

In this section

</td>
</tr></table>
<!-- my_account_info_eof //-->

Change to

</td>
</tr></table>
<!-- my_account_info_eof //-->
<?php
}
}

I hate to bring this up but do you want the login in the same table row as your furryfamilylogo.jpg and shopping cart?

Everything is a little jumbled around. If you tell me what contrib you're using for the login and where abouts you want it I can redo this for you if you would like.

Link to comment
Share on other sites

Thanks for all that help. I had to go to bed last night, but i am going toget working on those changes RIGHT NOW..

 

I was using the contribution for the log in that you linked me to, but because i already changed the header.php, i didn't want to replace it so i just copied and pasted the code for the login box into the table.

 

I want the header to be LogIn box in the top left, banner centered, and shopping cart top right

 

From what i have read and researched, people seem to like to have all that stuff easily accessable at the top. If you look at ALL of the big pet supplies companies, they have all that info right in the header and i wanted to do the same. I DO want the login box to have the same look as the shopping cart, simple square with a small outline otheriwse it will get too busy.

 

I am going to impliment the changes that you made and see where that bring me.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

hey, when i took away the } before the else statement, it gave me an unexpected T_ELSE string error. I did try that before, but i thought maybe with the other suggestions you had, that it might work, but it still has not worked for me..

 

any other suggestions? This is all code that came out of the box for that particular contribution.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

WOW.. I AM really STUMPED.

 

If i could just get to SEE what this all looks like when it's up and running, i could mess with the tables some more, but i CAN NOT get rid of the unexpected } error!

 

should i make a new post since its KINDA a new issue?? or should i just keep it here?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hey Lindsay,

Just keep this thread here.

Did you know you were missing part of that code at the top?

if ( (!strstr($_SERVER['PHP_SELF'],'login.php')) 
and 
(!strstr($_SERVER['PHP_SELF'],'create_account.php')) 
and 
!tep_session_is_registered('customer_id') 
) 	 {

I'm working on redoing your header right now. Just need to put in theis login box.

Let me ask, you wanted the logo, login and shopping cart all in the same table row, right? If I remember your logo is too wide for it all to fit without having to scroll right. Is this what you want?

Link to comment
Share on other sites

for now, yes. I will make a re-sized banner so that it will all fit correctly, but for now, it is ok for that to happen.

 

Seriously.. THANK YOU for offering the help.. and no, i did not realize i was missing some code. Basically, when i started this website, i hired a guy who SAID he could do it, and ended up really messing things up. If you look where the paypal module is, that is what he did, on top of a few other things - which is ONE of the reasons it is so messy.. AND since i dont REALLY know what he did, i am kinda feeling my way around it. And i'm no php genius either, i JUST started to learn about it and i dont have the eye to spot where a lot of the errors are.

 

i REALLY appreciate this help from you!!!

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hey no problem. Glad to help. Trust me I'm no genius at this either. I've been learning on the fly too.

 

Here is a new copy of your header. I did make one change to the way you did your shopping box. The items total and subtotal are not linked. Only the Your Cart Contents text is linked. I did that to use the tep_href function. I'll play around with getting the rest of that as a link as well.

 

Lets cross our fingers and see if this works

<?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');
 }
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if ($show_user_options) { ?><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>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'furryfamilylogo.jpg', 'furryfamilylogo') . '</a>'; ?></td>
<td><table border="2px" cellspacing="0" cellpadding="10">
  <tr>
	<td class="headerCart"><b><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerCart"><?php echo 'Your Cart Contains'; ?></a></b><br><?php echo $cart->count_contents() . ' Items'; ?><br><?php echo 'SubTotal:' . $currencies->format($cart->show_total(); ?><br><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"class="headerCart"><?php echo HEADER_TITLE_CHECKOUT;?></a> | <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerCart"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></td>
  </tr>
</table></td>
<td align="right"><?php
/*
IMPORTANT NOTE:
 This is not part of the official osC distribution
 but an add-on contributed to the osC community. Please
 read the README document that are provided
 with this file for further information and installation notes.

 This puts a login request in a box with a login button.
 If already logged in, will not show anything.

 Modified to utilize SSL to bypass Security Alert

 LoginboxV5.4_header http://avzwebdesign.nl/oscommerce/
*/

if ( (!strstr($_SERVER['PHP_SELF'],'login.php')) 
and 
(!strstr($_SERVER['PHP_SELF'],'create_account.php')) 
and 
!tep_session_is_registered('customer_id') 
) 	 {
?>
<!-- loginbox //-->
<?php 
if (!tep_session_is_registered('customer_id')) {
?>
<table width="310"><tr> <td>
<?php

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))
								 . '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="3" class="smallText">'
							 .'<tr><td class="smallText">'
							 . tep_draw_separator('pixel_trans.gif', '2', '1') 
							 . BOX_LOGINBOXH_EMAIL
							 . '</td><td  class="smallText" colspan="3">'
					 		 . tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"') 
							 .'</td></tr><tr><td class="smallText">'
							 . tep_draw_separator('pixel_trans.gif', '2', '1') 
							 . BOX_LOGINBOXH_PASSWORD
							 . '</td><td class="smallText">'
							 . tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
							 . '</td><td class="smallText">'
							 . '<a href="'
							 . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')
							 . '">'
							 . BOX_LOGINBOXH_FORGOT_PASSWORD 
							 . '</a></td></tr><tr><td class="smallText" colspan="3">'
							 . tep_draw_separator('pixel_trans.gif', '5', '25')
							 . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)
							   . '</form>'
							 . tep_draw_separator('pixel_trans.gif', '5', '1')
							 .  BOX_LOGINBOXH_TEXT_NEW
							 . '<a href="'
							 . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')
							 . '">'
							 . BOX_LOGINBOXH_NEW
							 . '</a></td></tr></table>' 
							;								 

$info_box_contents = array();
$info_box_contents[] = array('align' => '',
							 'text'  => $loginboxcontent);
new infoBox($info_box_contents);
?>
		</td>
	  </tr></table>
<?php
 } else {
 // If you want to display anything when the user IS logged in, put it
 // in here...  Possibly a "You are logged in as :" box or something.
 }
?>
<!-- loginbox_eof //-->
<?php
// WebMakers.com Added: My Account Info Box
} else {
 if (tep_session_is_registered('customer_id')) {
?>

<!-- my_account_info //-->
 <table width="310"><tr>
		<td>
<?php


 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td class="smallText" colspan="2">'
						   . tep_draw_separator('pixel_trans.gif', '2', '1')
						   . '<b><center>' 
						   . tep_customer_greeting() 
						   .'</b></center></td></tr><tr><td class="smallText">'
						   . '<tr><td class="smallText" colspan="2">'
						   . tep_draw_separator('pixel_trans.gif', '2', '20')
						   . '<b>' 
						   . BOX_HEADING_LOGIN_BOX_MY_ACCOUNT 
						   .'</b></td></tr><tr><td class="smallText">'
						   . tep_draw_separator('pixel_trans.gif', '2', '15') .
 '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') .'">' . LOGIN_BOX_MY_ACCOUNT . '</a><td class="smallText">' .
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_EDIT . '</a></td></tr><tr><td class="smallText">' . tep_draw_separator('pixel_trans.gif', '2', '1') .
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><td class="smallText">' . 
									  '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') .'">' . LOGIN_BOX_ADDRESS_BOOK . '</a></td></tr><tr><td class="smallText">'  . tep_draw_separator('pixel_trans.gif', '', '1') . 
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') .'">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><td class="smallText">' . 
									  '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') .'">' . LOGIN_BOX_LOGOFF . '</a></td></tr></table>');
 new infoBox($info_box_contents);
?>
		</td>
	  </tr></table>
<!-- my_account_info_eof //-->

<?php 
 } // END-IF SESSION REGISTERED

} // END-IF

?>
</td>
 </tr>
</table>
<? //---PayPal WPP Modification START ---// ?>
<?php
if (tep_session_is_registered('customer_id')) {
  $show_user_options = true;
  if (tep_paypal_wpp_enabled() && tep_session_is_registered('paypal_ec_temp')) {
//If this is a temp account that'll be deleted, don't show account information
if ($paypal_ec_temp) {
  $show_user_options = false;
}
 }
} else {
$show_user_options = false;
 }
?>

<? //---PayPal WPP Modification END ---// ?>
<?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(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($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

Link to comment
Share on other sites

i get a parse error syntax on line 57, unexpected ","

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Ya know it's always the little things that get ya. My bad. Look for

$currencies->format($cart->show_total()

Change to

$currencies->format($cart->show_total())

One little ) throws it all off.

Link to comment
Share on other sites

WOW.. THANKS, that is PERFECT! I am going to mess with the look of it a little, and i kinda wanted it placed on the left so if goes login box, banner, cart.. But i think i might be able to mess around with it. I also want just a plain border, not red, but i can change that too i'm sure. . but if you have some extra time ::wink wink::

 

Really, if you need ANYTHING let me know. I am pretty good with illustrator, so if you want some buttons or a logo made, i will be MORE than happy to do ANYTHING for ya!! i really appreciate this A TON

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Well my server just went down so I was not able to test this.

 

Also If I may be so bold as to make a suggestion. This box will disappear when you go to login.php and create_account.php. It wikk also disappear when user is logged in but we can add something in that instance. This will throw your logo and shopping cart box out of whack.

 

Maybe we could put the login box on its own table row. Put the username and password fields all on one line. This way no matter what your logo row does not change. Just a thought.

 

Try this

<?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');
 }
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if ($show_user_options) { ?><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>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'furryfamilylogo.jpg', 'furryfamilylogo') . '</a>'; ?></td>
<td align="right"><?php
/*
IMPORTANT NOTE:
 This is not part of the official osC distribution
 but an add-on contributed to the osC community. Please
 read the README document that are provided
 with this file for further information and installation notes.

 This puts a login request in a box with a login button.
 If already logged in, will not show anything.

 Modified to utilize SSL to bypass Security Alert

 LoginboxV5.4_header http://avzwebdesign.nl/oscommerce/
*/

if ( (!strstr($_SERVER['PHP_SELF'],'login.php')) 
and 
(!strstr($_SERVER['PHP_SELF'],'create_account.php')) 
and 
!tep_session_is_registered('customer_id') 
) 	 {
?>
<!-- loginbox //-->
<?php 
if (!tep_session_is_registered('customer_id')) {
?>
<table width="310" border="0" cellpadding="0" cellspacing="0"><tr> <td>
<?php

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))
								 . '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="3" class="smallText">'
							 .'<tr><td class="smallText">'
							 . tep_draw_separator('pixel_trans.gif', '2', '1') 
							 . BOX_LOGINBOXH_EMAIL
							 . '</td><td  class="smallText" colspan="3">'
					 		 . tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"') 
							 .'</td></tr><tr><td class="smallText">'
							 . tep_draw_separator('pixel_trans.gif', '2', '1') 
							 . BOX_LOGINBOXH_PASSWORD
							 . '</td><td class="smallText">'
							 . tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
							 . '</td><td class="smallText">'
							 . '<a href="'
							 . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')
							 . '">'
							 . BOX_LOGINBOXH_FORGOT_PASSWORD 
							 . '</a></td></tr><tr><td class="smallText" colspan="3">'
							 . tep_draw_separator('pixel_trans.gif', '5', '25')
							 . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)
							   . '</form>'
							 . tep_draw_separator('pixel_trans.gif', '5', '1')
							 .  BOX_LOGINBOXH_TEXT_NEW
							 . '<a href="'
							 . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')
							 . '">'
							 . BOX_LOGINBOXH_NEW
							 . '</a></td></tr></table>' 
							;								 

$info_box_contents = array();
$info_box_contents[] = array('align' => '',
							 'text'  => $loginboxcontent);
new infoBox($info_box_contents);
?>
		</td>
	  </tr></table>
<?php
 } else {
 // If you want to display anything when the user IS logged in, put it
 // in here...  Possibly a "You are logged in as :" box or something.
 }
?>
<!-- loginbox_eof //-->
<?php
// WebMakers.com Added: My Account Info Box
} else {
 if (tep_session_is_registered('customer_id')) {
?>

<!-- my_account_info //-->
 <table width="310"><tr>
		<td>
<?php


 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td class="smallText" colspan="2">'
						   . tep_draw_separator('pixel_trans.gif', '2', '1')
						   . '<b><center>' 
						   . tep_customer_greeting() 
						   .'</b></center></td></tr><tr><td class="smallText">'
						   . '<tr><td class="smallText" colspan="2">'
						   . tep_draw_separator('pixel_trans.gif', '2', '20')
						   . '<b>' 
						   . BOX_HEADING_LOGIN_BOX_MY_ACCOUNT 
						   .'</b></td></tr><tr><td class="smallText">'
						   . tep_draw_separator('pixel_trans.gif', '2', '15') .
 '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') .'">' . LOGIN_BOX_MY_ACCOUNT . '</a><td class="smallText">' .
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_EDIT . '</a></td></tr><tr><td class="smallText">' . tep_draw_separator('pixel_trans.gif', '2', '1') .
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><td class="smallText">' . 
									  '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') .'">' . LOGIN_BOX_ADDRESS_BOOK . '</a></td></tr><tr><td class="smallText">'  . tep_draw_separator('pixel_trans.gif', '', '1') . 
									  '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') .'">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><td class="smallText">' . 
									  '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') .'">' . LOGIN_BOX_LOGOFF . '</a></td></tr></table>');
 new infoBox($info_box_contents);
?>
		</td>
	  </tr></table>
<!-- my_account_info_eof //-->

<?php 
 } // END-IF SESSION REGISTERED

} // END-IF

?>
</td>
<td align="right"><table border="2px" cellspacing="0" cellpadding="10">
  <tr>
	<td class="headerCart"><b><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerCart"><?php echo 'Your Cart Contents'; ?></a></b><br><?php echo $cart->count_contents() . ' Items'; ?><br><?php echo 'SubTotal:' . $currencies->format($cart->show_total()); ?><br><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"class="headerCart"><?php echo HEADER_TITLE_CHECKOUT;?></a> | <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerCart"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></td>
  </tr>
</table></td>
 </tr>
</table>
<? //---PayPal WPP Modification START ---// ?>
<?php
if (tep_session_is_registered('customer_id')) {
  $show_user_options = true;
  if (tep_paypal_wpp_enabled() && tep_session_is_registered('paypal_ec_temp')) {
//If this is a temp account that'll be deleted, don't show account information
if ($paypal_ec_temp) {
  $show_user_options = false;
}
 }
} else {
$show_user_options = false;
 }
?>

<? //---PayPal WPP Modification END ---// ?>
<?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(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($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

Link to comment
Share on other sites

I copied and pasted the code that you created, but it did not put the login box in it's own row, instead i put it before the cart, in the middle of the banner and cart.

 

So what you are suggesting is to have the login email, password, forgotten password and create new account in a single line kinda the way the breadcrum is? It's not a bad idea..

 

Here is my reasoning for wanting to put it in the same row as the header but the first box in the header:

 

Basically, there is no way that i can make my banner fit to everyone's screen size, and there has always been a big empty space either to the right or the left. I added the shopping cart in the header which looked nice because it took up SOME of the space. I felt that if i put the login box in the header, then it would take up the space on the right as well. Also, i could center my banner and make it a little smaller in length but taller in height this way if someone has a small screen, it would almost fill the top, and if they had a large wide screen, there wouldnt be A LOT of space on the sides.. except when it goes away for the create account page, which maybe we can just have it there all the time?? I dunno..

 

HOWEVER if i were to do it your way, it would look VERY nice and neat, ESPECIALLY when you ARE logged in and you have all of your links to your account in a horizonal menue instead of just packed all to the left..

 

I'm a little torn i guess.. But i havent been able to see it the horizonal way.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

right now i am messing with the placement of the text within the box. I didnt like the forgot password text all the way to the right, so i am trying to put it directly underneath, and the GO or LOG IN button should be in a better place too

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Basically, there is no way that i can make my banner fit to everyone's screen size,

Ain't that the truth.

 

I haven't gotten it all on one line yet. I need to figure out exactly what to take out and leave in. As soon as I get that I will post it so you can give it a try and see what you think.

 

As far as I know right now it is best to design for 1024 screen setting. That however does not take into account actual browser width. I think the target width settings is around 990px. You need to account for the width of the scroll bars on the right of the browser.

Link to comment
Share on other sites

that makes sense.. I just figured that if my login, banner, and shopping cart, when put together side by side equal CLOSE to the width of the smallest screen it would look PERFECT, and if someone using a widescreen opened my page, it would not look EMPTY because there could easily be a good 1-2" between each element (login box, banner, and shopping cart) and it still would not LOOK empty.. And if I made my banner a little better to FIT the screen and a little less "busy" it will fit in nicely.

 

I planned of completely re-designing my banner anyways. I am not happy with how it looks right now anyways, so i can make it so that the banner fits nicely between those two boxes, but i would be MORE than happy to try either way.

 

I have pretty much gotten the layout of that box CLOSE to what i wanted, the GO button is off a little and I can not seem to get space between the password forma nd the GO button.. and i also need space between the "dont have a profile yet?" " Create on here"

 

 

I would also like to make all that space go away to the right of the box, i dont think its the cell padding though.. The box is just A LOT bigger than the content

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...