Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Restrict users to certain virtuemart categories based on location?

Restrict users to certain virtuemart categories based on location?

I have the following:
For a UK based shop, the following is required:

-All users from outside EU should only get access to a particular category e.g. category ID 100 and its descendents.

I can set up the firs rule i.e check if the user is not from the list of EU countries (Although is there an easier way to specify EU countries rather than listing them individually in the exclusion rule).. This rule has process next rule in the chain set.

In the following rule what do I do, I can set Ancestor ID in the virtuemart session to 100, but how do I say only show these pages and for all other pages redirect to the home page. I want the access restriction to the pages as users from outside can at the moment use the search option to search for the restricted products.

Many thanks,

Abhi

amthekkel
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Restrict users to certain virtuemart categories based on location?

Hi Abhi,

You could achieve it this way, in 1 rule, I think:

In rule:
- list the countries in the EU in the "include" (not exclude) list
- then list the catogories that you want to exclude them from, in the "ancestor category id" box
- then in the SUCCEED action, do the redirect to the front page.

In this way, if the viewer comes from one of these countries, AND if the category or item is a descendent of one of the category ids listed, then they will get redirected to the front page.

This should achieve what you asked for - but it's not particularly user friendly. How about redirecting them to a standard article page that says "sorry, the item you tried to view is not accessible from your country"? Otherwise people will think there's a bug in your site.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: Restrict users to certain virtuemart categories based on location?

Hi Stephen,

Sorry about the late reply, I only got the plugin installed. Will have a try and see how it goes.

Thanks muchly,

Abhi

amthekkel
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
116

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked