Forums / General Questions / Make link available after log in.

Make link available after log in.

Locked

Views: 1,290

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
16 Jul 2008, 5:14 AM
#1
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Make link available after log in.

I have just successfully installed the Price List add-on, how ever the problem i have is that i want to make a link for it but i only want the link made available to customers that have logged in. Can some please tell me how this can be done.

Thanks in advance

Mark

16 Jul 2008, 9:12 AM
#2
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Re: Make link available after log in.

Graphicman:

I have just successfully installed the Price List add-on, how ever the problem i have is that i want to make a link for it but i only want the link made available to customers that have logged in. Can some please tell me how this can be done.

Thanks in advance

Mark

Is there anybody on;ine that can help me with this.

Cheers:frusty:

16 Jul 2008, 7:41 PM
#3
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Re: Make link available after log in.

Graphicman:

Is there anybody on;ine that can help me with this.

Cheers:frusty:

Graphicman:

I have just successfully installed the Price List add-on, how ever the problem i have is that i want to make a link for it but i only want the link made available to customers that have logged in. Can some please tell me how this can be done.

Thanks in advance

Mark

Come one anyone, can someone please have a look at this for me.

17 Jul 2008, 4:07 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Make link available after log in.

When a customer is logged in the:
$_SESSION['customer_id']

is > 0 ... :smile:

So you could use:

if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
// do something
} else {
// do something else
}

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Jul 2008, 6:38 PM
#5
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Re: Make link available after log in.

Ajeh:

When a customer is logged in the:
$_SESSION['customer_id']

is > 0 ... :smile:

So you could use:

if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
// do something
} else {
// do something else
}


Thanks for the reply Linda, but i'm sorry you've totally lost me... Where do i put this code and also what about the actual link. 
Many thanks:blush:
4 Aug 2008, 1:17 PM
#6
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Re: Make link available after log in.

Hi, I still have nt been able to do this. I really could do with some help with this. I have searched these forums but cannot for the life of me find a solution.

Thanks:wacko:

4 Aug 2008, 2:57 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Make link available after log in.

You could use the blank sidebox mod and put the link to the price list in there, along with the PHP that includes the code Ajeh provided to only show that sidebox after login.

That said, unless there's something whiz-bang special about your site or product line, I think making potential customers log in (create an account) before they can view prices is a big mistake.

4 Aug 2008, 3:33 PM
#8
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Re: Make link available after log in.

stevesh:

You could use the blank sidebox mod and put the link to the price list in there, along with the PHP that includes the code Ajeh provided to only show that sidebox after login.

That said, unless there's something whiz-bang special about your site or product line, I think making potential customers log in (create an account) before they can view prices is a big mistake.

Hi Steve

Thanks for your reply. The site is an wholesale site for retailers not the general public. The customers have to be recognised has existing or registered customer and have an account with the company before they get an online account. All purchashes that are made are invoived via that account, no payment is taken online. Basicly if the general public knew the prices that was paid at wholesale they would never purchase in store, lol.

The site sells adult dvd's, the link is here, I would like to put the link under the information down the right hand side.
What i'm trying to do is completely new to me. As i said i don't even know where to put this php, if you could advise me accordingly i would be very grateful.

4 Aug 2008, 5:45 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Make link available after log in.

I see what you mean. I'm not sure how the Price List mod works, but, since all of your authorized customers are pre-appoved, why not let the mod do what it does, and set Admin - Configuration - Customer Details - Customer Shop Status - View Shop and Prices to 1 ?

You can strip the new customer create account stuff from the login page template file, so all your customers see is the log in part.