Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Empty Infobox / Visible When login?


znap

Recommended Posts

Posted

Hi..

 

I have a problem, In infoboxes, (Categories and Whatsnew)I want to HIDE the text or more correct. EMPTY IT! so its all blank (White/Blank/Space) Understand?

 

 

BUT, When the user LOGIN, the empty space in the infoboxes, will be revaled as a MENU (Like it is from the beginning)

so only when you have enter your user name/password, and pressed login, the Menu/Text will be showed. and the menu should be fully functional.

 

I think it would be an easy way to see the site, but not the menu becuase.. the user will pay for the login and password, of my product that is text based.

and in the categories, i will have my secret text that only a logged in person can see and have acess to.

 

 

 

Any1 now how to do? havent heard about this before, as I just figureed it out.

 

Thanks / Andrew

Posted

mm, give this a shot for whats_new ...

 

if (!tep_session_is_registered('customer_id')) {
 showthis;
} else {
 show nothing;
}

 

Just my 2 cents, but wouldn't it look better to simply not show those boxes at all if a user isn't logged in? It's also easier that way. ;)

Posted

Ahceron..

 

If i want the Categories box, gone.. in the front page, then visible when user Log's in.. how do i do ?

Posted

in catalog/includes/column_left.php (or column_right.php)

 

Simply change your line ... for example, this one:

 

  if ((USE_CACHE == 'true') && empty($SID)) {
   echo tep_cache_categories_box();
 } else {
   include(DIR_WS_BOXES . 'categories.php');
 }

 

would be changed to:

 

  if (((USE_CACHE == 'true') && empty($SID)) && (tep_session_is_registered('customer_id'))) {
   echo tep_cache_categories_box();
 } elseif (tep_session_is_registered('customer_id')) {
   include(DIR_WS_BOXES . 'categories.php');
 } else {
 }

 

and for the whats_new box ...

 

if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'whats_new.php');

Posted

Hells River..

 

DA*N! Tottally correct.. it worked.. thanks alot!!!!! :D :D

 

/ Chris

Archived

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

×
×
  • Create New...