Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

when login display username in header


cosmin

Recommended Posts

  • 2 weeks later...
Something like:

 

if( tep_session_is_registered('customer_first_name') ) {
  echo $customer_first_name;
}

 

Hi, I also wonder about this. In what file and where in the file do I put the above code?

 

PS! I use STS. I don't know if that makes a differnce?

 

Thanks

Kjolebutikken

Best regards

Kjolebutikken

Link to comment
Share on other sites

Where you put it and in what file depends on where you want it.

 

Since you're using STS, you will need to find where the header is created. I can't tell you that, since there are a couple of options (which is the whole point of STS).

 

Thank you for trying, but tried for 5 hours tonight but still could not find this out. Not sure what you mean. Is the header not created in includes/header.php?

 

Where I most would like the link is on the white space on the right side of my logo, over the links in the header navigation bar, but this is a picturefile, so I don't know if it is possible to lay this link "over the picture". Here is a link to my page so you can see what I mean:

 

http://www.kjolebutikken.com/oscdemo1/

 

If the above is not possible, I would like the username to show either in the header navigation bar or in the footer.

 

I have tried to put the username code in several files and also tried to add the usernamelink to the header navigation bar like the rest of the links, but I could not make it work.

 

Any ideas is greately appreciated :-)

 

Thanks

Kjolebutikken

Best regards

Kjolebutikken

Link to comment
Share on other sites

Thank you for trying, but tried for 5 hours tonight but still could not find this out. Not sure what you mean. Is the header not created in includes/header.php?

 

It can be created in includes/header.php. Or it can be created elsewhere. It depends. You need to look inside the template you're using and find out how the header is generated. Read up a little on the STS documentation to help you figure out where the header is being generated.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

It can be created in includes/header.php. Or it can be created elsewhere. It depends. You need to look inside the template you're using and find out how the header is generated. Read up a little on the STS documentation to help you figure out where the header is being generated.

 

I'm sorry, but I don't think I have any "documentation (???). I did not get the STS by installing an STS contribution. I installed a finnished STS template. I have the following files, if that is what you mean by documentation? :

 

includes/sts_template.html

includes/sts_display_output.php

includes/sts_product_info.php

includes/restart_capture.php

includes/start_capture.php

includes/sts_usercode.php

 

What would the code that generate the header look like? I can check the above files for this code if I just know what to look for.

 

Thanks again :-)

 

Kjolebutikken

Best regards

Kjolebutikken

Link to comment
Share on other sites

Look in the downloads for STS to find documentation.

 

 

Sorry that I don't understand what you mean.

I don't understand what you mean by documentation ?

What do I look for?

How does the code that generates the header look like?

 

Thanks,

Kjolebutikken

Best regards

Kjolebutikken

Link to comment
Share on other sites

Download STS and look at the documentation.

 

http://www.oscommerce.com/community?contri...mp;category=all

 

As I said before, I cannot just tell you without looking at your code how it is generated. That is simply how STS works.

 

 

Ok, thanks for trying.

I downloaded the sts contribution and read the word document regarding sts and the installation procedure(was this the documentation you refered to?). However I did not understand much and I could not find anything about generating the header, so I guess I will just have to give up this one, cause I do not even know what I'm looking for :-)

 

Thank you again for helping out :-)

Best regards

Kjolebutikken

Best regards

Kjolebutikken

Link to comment
Share on other sites

Hello Kjolebutikken...

i have the same problem for create these feature in OSC + STS. But i make these change for an alternative way...

 

Well... i just put these code (below) in the end of these file "includes/modules/sts_inc/sts_user_code.php"

 

$sts->start_capture();
{
if( tep_session_is_registered('customer_first_name') ) {
  echo $customer_first_name;
  echo ".";
}
elseif( tep_session_is_unregistered ) {
echo "guest text.";
}}
$sts->stop_capture ('headername');

 

Next, just add the $headername in the position of my HTML template... work's fine ;)

 

Regards for all!

 

Rafael Scavone

Edited by Jan Zonjee
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...