Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Restrict users to certain virtuemart...
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
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
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Restrict users to certain virtuemart...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7621
- Newest User:
- musser4585
- Members Online:
- 1
- Guests Online:
- 122
- Online:
- musser4585
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked