Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show message only to group? SPPC


Guest

Recommended Posts

I am using SPPC and was wondering if there was an easy way to show a message to only certain groups.

 

Such as:

 

when logged in as a Dealer it might show you that your level is Dealer

 

or I might want to display a special notice to them on the index or other pages

 

thanks!

Link to comment
Share on other sites

I am using SPPC
So you could have been aware of the thread on SPPC
and was wondering if there was an easy way to show a message to only certain groups.

If you knew PHP I guess you wouldn't have asked because it is a pretty elemental if/[elseif]/[else] construction like:

if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] == '1') {
	  echo 'Dear dealer (customer group id 1)';
	} 
// you can stop here if you like but if there are more than option you need to use elseif
elseif (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] == '2') {
	  echo 'Dear super dealer (customer group id 2)';;
	} 
// or for the default or last option
else {
	  echo 'Dear retail customer';
	}

Link to comment
Share on other sites

  • 2 months later...
So you could have been aware of the thread on SPPC

If you knew PHP I guess you wouldn't have asked because it is a pretty elemental if/[elseif]/[else] construction like:

if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] == '1') {
	  echo 'Dear dealer (customer group id 1)';
	} 
// you can stop here if you like but if there are more than option you need to use elseif
elseif (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] == '2') {
	  echo 'Dear super dealer (customer group id 2)';;
	} 
// or for the default or last option
else {
	  echo 'Dear retail customer';
	}

 

Would this be placed on the index page?

Ah, the world wide web. What a wonderful place.

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...