Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Greeting message edit in new file


Fletcher

Recommended Posts

I am attempting to use the same scripting to do a message on a new page stating that the user must log in order to have the form accepted..although I dont know how to check that they actually logged in or not I plan on checking manually to make sure they at least have set up the account...

 

I know this can be edited to say just that...

 

define('TEXT_GREETING_GUEST',

 

and I figure I can change this to something else similar

 

But what I don't understand is how this line makes the connection to that...

 

<td class="main"><?php echo tep_customer_greeting(); ?></td>

 

So I'm a bit lost as to what I can set everything to so that it doesn't interfere with the main index page, because I have the default greet message on there and I like it there.

Link to comment
Share on other sites

although I dont know how to check that they actually logged in or not

 

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

// the above code returns true if they are logged in
// put code in this area for logged in people

} else {

// put code in this area for people NOT logged in

}
?>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I worked on adding that for a while but I was unable to implement it...I am lacking some scripting ability here but I will spend more time on it tomorrow.

 

 

 

<?php

if (tep_session_is_registered('customer_id')) {

 

// the above code returns true if they are logged in

// put code in this area for logged in people

 

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><?php echo ENTRY_NAME; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_draw_input_field('name'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_EMAIL; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_draw_input_field('email'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

 

} else {

 

// put code in this area for people NOT logged in

 

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="main"><?php echo tep_customer_greeting(); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

</table></td>

 

}

?>

Link to comment
Share on other sites

If you want to use variables from osC you have to have this in there at the top:

 

  require('includes/application_top.php');

I don't know if you are aware of that or not.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Im using the catalog/contact_us.php file as a template for this...but I need to basically change what you mentioned...so that it doesnt allow them to fill the form out unless its registered

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...