Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My website looks like crap!


Assailant

Recommended Posts

Posted

www.basketdelite.com i need code to insert a graphic header box, when i try it comes in above the header box and not on top of it

Posted

I think your site looks GREAT!

 

I don't think I understand what you're looking for...do you mean the info box headers?

Posted

thanks :) yeah I installed the mod to have graphics be placed on the infobox headings, the code is something like this

 

<tr>
<td>

<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
 <TD COLSPAN=3>
	 <IMG SRC="images/boxes/table_policies.gif" WIDTH=173 HEIGHT=20></TD>
</TR>

 

however in my loginbox.php (modification) i dont know where to place the code, this is what the infobox code looks like

 

 

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License

 IMPORTANT NOTE:

 This script is not part of the official osC distribution
 but an add-on contributed to the osC community. Please
 read the README and  INSTALL documents that are provided
 with this file for further information and installation notes.

 loginbox.php -   Version 1.0
 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
*/

// WebMakers.com Added: Do not show if on login or create account
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')) {
?>
         <tr>
           <td>

<?php
   $info_box_contents = array();
   $info_box_contents[] = array('align' => 'center',
                                'text'  => BOX_LOGINBOX_HEADING
                               );
   new infoBoxHeading($info_box_contents, false, false);
   $loginboxcontent = "
           <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">
           <form name=\"login\" method=\"post\" action=\"" . tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . "\">
             <tr>
               <td align=\"center\" class=\"main\">
                 " . BOX_LOGINBOX_EMAIL . "
               </td>
             </tr>
             <tr>
               <td align=\"center\" class=\"main\">
                 <input type=\"text\" name=\"email_address\" maxlength=\"96\" size=\"20\" value=\"\">

               </td>
             </tr>
             <tr>
               <td align=\"center\" class=\"main\">
                 " . BOX_LOGINBOX_PASSWORD . " " . BOX_LOGINBOX_FORGOT_PASSWORD . "
               </td>
             </tr>
             <tr>
               <td align=\"center\" 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=\"center\" 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

 } 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 //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'center',
                              'text'  => BOX_HEADING_LOGIN_BOX_MY_ACCOUNT
                             );
 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'center',
                              '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
 }
}
?>

Posted

Man i dont think it will work i tried everything, it stinks too because i need this up and running by sunday, guess ill just have to make everything match the login box.

Posted

If you look at this bit of code to start with

 ? ? ? ?<tr>
? ? ? ? ? <td>

<?php
? $info_box_contents = array();
? $info_box_contents[] = array('align' => 'center',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'text' ?=> BOX_LOGINBOX_HEADING
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? );
? new infoBoxHeading($info_box_contents, false, false);

you allready have your first two lines of code done for you so start from the

</php

the last part of code that I have here is for what would normally be the info box corners if you do not require this then change to

// new infoBoxHeading($info_box_contents, false, false);

above that line is the line that gives you the heading Login here. this can be gotten rid of by this

// $info_box_contents[] = array('align' => 'center',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'text' ?=> BOX_LOGINBOX_HEADING
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? );

and the line above by this

// $info_box_contents = array();

then this makes your code thus

<tr>
? ? ? ? ? <td>
<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=3>
?<IMG SRC="images/boxes/table_policies.gif" WIDTH=173 HEIGHT=20></TD>
</TR>
<?php

I have not had a chance to try this out, so either make a backup of the file or for all that is being changed just note the changes

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

either it doesnt work or im doing it wrong look www.basketdelite.com

 

this is the code I have

 

<tr>
         <td>
<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=3>
<IMG SRC="images/boxes/table_policies.gif" WIDTH=173 HEIGHT=20></TD>
</TR>
<?php

Posted

sorry i mean this

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

 

IMPORTANT NOTE:

 

This script is not part of the official osC distribution

but an add-on contributed to the osC community. Please

read the README and INSTALL documents that are provided

with this file for further information and installation notes.

 

loginbox.php - Version 1.0

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

*/

 

// WebMakers.com Added: Do not show if on login or create account

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')) {

?>

<tr>

<td>

<?php

<tr>

<td>

<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>

<TR>

<TD COLSPAN=3>

<IMG SRC="images/boxes/table_policies.gif" WIDTH=173 HEIGHT=20></TD>

</TR>

<?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=\"0\" width=\"100%\" 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

} 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 //-->

<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

}

}

?>[code]

Posted

the parse error is from here

<tr>
<td>
<?php

take out the code shown above which is the part after

<?php
if (!tep_session_is_registered('customer_id')) {
?>

but before

<tr>
<td>
<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

Thanks, it worked, i feel so stupid, I need to get more familiar with php and html as well, always just editted it, thanks a lot man you saved me a lot of time!

Posted

really appreciate the help now all i need to do is figure out how to get the text on my borders to look more sharp, if you need anything let me know, I can give you some free hosting if you want im a reseller, its not the greatest but its decent.

Posted

no problem and the only stupid ones are the ones who dont ask the questions.

 

We all have a learning curve on this and I am learning new things all the time thanks to the people in this forum and a lot of playing around with the code.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

thats really nice of yu to help people out a lot like that, reminds me of me, I dont mind helping people when i know something, I used to sit in an internet chatroom all the time and help people with computer technical related problems, learned a lot of stuff and eventually became A+ net+ MCSE and ccnp certified, so it pays off.

Archived

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

×
×
  • Create New...