Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

show text if user is logged in


Guest

Recommended Posts

Hello,

 

Is it possible to modify the product_info.php so if the user is logged in, it displays some text, otherwise the text is not displayed?

 

E.g. below the add to cart buttons, display the text:

 

"click here to commence"

 

ONLY IF THE USER IS LOGGED INTO THEIR ACCOUNT!!

 

Thanks

Link to comment
Share on other sites

If you wanted to display the text click here to commence if a user is logged in:

if (tep_session_is_registered('customer_id')) {

echo 'click here to commence';

}

Other great Open Source (Free) programs: (Free as in free speech not free beer)

The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS

How do I find these programs? Google Search!

Link to comment
Share on other sites

If you wanted to display the text click here to commence if a user is logged in:

 

Works a treat.

 

I am placing a link in the text, and I want the link to be dl/[PRODUCT_ID]

 

where [PRODUCT_ID] is the ID of the product being viewed, as shown in URL!

 

I tried putting <a href=dl/p.products_id>, then tried putting dl/<?php p.products_id ?> hoping it would wort with no luck.

 

Can anybody give me any guidance on this?

 

Thanks alot

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...