Author Topic: How do I make it so that only registered people can see my products?  (Read 14455 times)

berserker

  • Beginner
  • *
  • Posts: 38
It seems like a dumb question, because I know about how to switch my virtuemart module to only allow registered people to see it.  However, if someone has registered an account, or even if they've never registered, they can access my product catalog by entering the url of it.  Is there a way to make it so that only people who are logged in can see my products?

nl94568

  • Beginner
  • *
  • Posts: 5
Re: How do I make it so that only registered people can see my products?
« Reply #1 on: February 10, 2010, 01:57:35 am »
If I am understanding your question, you just need to go to the Configuration and under global and click the "Joomla User Registration allowed "yes" and change the Joomla New account necessary "yes". 

I think this should solve your problem...I Hope.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: How do I make it so that only registered people can see my products?
« Reply #2 on: February 10, 2010, 02:14:59 am »
Never tried it, so not really sure. VM is a component, which is linked/accessible via VM's Joomla modules and Joomla menu links. You can make the modules only show via registered, as you stated, and likewise, don;t show your shop menu links (Joomla menu links) but to only registered users.

If someone already has your store URL and manually enter this in though, they would still be able to access, but I would think that is rare.

-F

berserker

  • Beginner
  • *
  • Posts: 38
Re: How do I make it so that only registered people can see my products?
« Reply #3 on: February 10, 2010, 08:04:50 am »
Never tried it, so not really sure. VM is a component, which is linked/accessible via VM's Joomla modules and Joomla menu links. You can make the modules only show via registered, as you stated, and likewise, don;t show your shop menu links (Joomla menu links) but to only registered users.

If someone already has your store URL and manually enter this in though, they would still be able to access, but I would think that is rare.

-F


I could password protect a directory or file of folders, but then that would require users to log in twice, which is annoying.  This is a problem that I haven't found a solution to yet on these forums; seems like no one knows.

berserker

  • Beginner
  • *
  • Posts: 38
Re: How do I make it so that only registered people can see my products?
« Reply #4 on: February 10, 2010, 08:07:05 am »
If I am understanding your question, you just need to go to the Configuration and under global and click the "Joomla User Registration allowed "yes" and change the Joomla New account necessary "yes". 

I think this should solve your problem...I Hope.


No.  I've done that; that's not the issue.  When people first see my site they have to log in but then once logged in, all they have to do is copy the url of my store and after that they no longer have to log in; they can just copy and paste it and have access to my store whether logged in or not.  The login process only prevents people from getting in initially, but once the url for my store is known, either through google searches or through people spreading it around, then anyone can have access to it whether logged in or not.

mus_design

  • Beginner
  • *
  • Posts: 9
Re: How do I make it so that only registered people can see my products?
« Reply #5 on: February 10, 2010, 09:02:11 am »
Hey,

I might be able to help. Go to virtuemart thru the backend. Ans assign your products to shopper groups. That way people in the gold group for example will only be able to see.

berserker

  • Beginner
  • *
  • Posts: 38
Re: How do I make it so that only registered people can see my products?
« Reply #6 on: February 10, 2010, 09:53:55 am »
Hey,

I might be able to help. Go to virtuemart thru the backend. Ans assign your products to shopper groups. That way people in the gold group for example will only be able to see.


No, that doesn't work.  It only prevents them from seeing the link to the products in their module, but they could still access products from other shopper groups by directly accessing the url or by stumbling upon it on google.  I need something that will tell people who try to access my store that they need to log in first.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: How do I make it so that only registered people can see my products?
« Reply #7 on: February 10, 2010, 19:29:25 pm »
seems to me the best thing is to add a simple check in components/com_virtuemart/virtuemart.php where it checks for a Joomla user id, which is only given when logged in! Something like

if $my->id {
execute the VM code.
} else {
go back to homepage link
}

berserker

  • Beginner
  • *
  • Posts: 38
Re: How do I make it so that only registered people can see my products?
« Reply #8 on: February 10, 2010, 21:42:37 pm »
seems to me the best thing is to add a simple check in components/com_virtuemart/virtuemart.php where it checks for a Joomla user id, which is only given when logged in! Something like

if $my->id {
execute the VM code.
} else {
go back to homepage link
}


Would that code you just wrote work or would I have to refine it more?  I'm a total noob when it comes to coding.  I recognize the if else statement but in terms of what to put in them, I'm clueless.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: How do I make it so that only registered people can see my products?
« Reply #9 on: February 10, 2010, 22:12:51 pm »
Here is the file I made for you for virtuemart.php (v1.1.4) with the correct statements. Make sure to change the redirect (towards top of page) to whatever page you want to redirect to.

If this works for you, which it should, please mark this thread solved for others.

[attachment cleanup by admin]

berserker

  • Beginner
  • *
  • Posts: 38
Re: How do I make it so that only registered people can see my products?
« Reply #10 on: February 11, 2010, 02:10:36 am »
Here is the file I made for you for virtuemart.php (v1.1.4) with the correct statements. Make sure to change the redirect (towards top of page) to whatever page you want to redirect to.

If this works for you, which it should, please mark this thread solved for others.


Wow!  You're a genius.  Thanks so much for that.  I will make sure to donate to you once I start making money off my site to pay you back for all your help. 

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: How do I make it so that only registered people can see my products?
« Reply #11 on: February 11, 2010, 02:12:24 am »
Glad it worked :).

jujuone

  • Beginner
  • *
  • Posts: 3
Re: How do I make it so that only registered people can see my products?
« Reply #12 on: February 11, 2010, 15:37:05 pm »
Thanks That Worked perfect for me too.

But there is still a kind of problem.
Let see if I won to activate the registration system (because in my case I'm trying to make a kind of "approbation by the administrator" registration system) the link of the registration form is directed in the mod_virtuemart witch is now reserved to the register member.

Is like french said "le chat qui ce mange la queue" ("the cat who's eating his tail") LOL  ;D

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: How do I make it so that only registered people can see my products?
« Reply #13 on: February 11, 2010, 20:34:38 pm »
You could use the Joomla registration system 1st, thereby creating an account and enabling login, before sending them to the additional details necessary on checkout in VM registration. Otherwise, adding some checks in virtuemart.php for registration and or checkout pages would be appropriate.

berserker

  • Beginner
  • *
  • Posts: 38
Re: How do I make it so that only registered people can see my products?
« Reply #14 on: February 25, 2010, 21:58:54 pm »
You could use the Joomla registration system 1st, thereby creating an account and enabling login, before sending them to the additional details necessary on checkout in VM registration. Otherwise, adding some checks in virtuemart.php for registration and or checkout pages would be appropriate.


How would I do that last thing you suggested?  So that I would still be using the virtuemart registration form.  What code would I need to enter?