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.

 

Hide VM products from outside Australia

Hide VM products from outside Australia

Hi Stephen
I wish to hide Virtuemart products on two conditions
1) If the user is outside of Australia
2) If the user arrives at the site via a parked domain.
Would you suggest to redirect to a second template with it's own menu system and maybe set a shopper group.
I need these users/guests not to be able to see/order products from the Australian side.
Any suggestions would be welcome.
We would like to be able to expand this in the future to segment further countries
Thank you
Steve

easypony
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Hide VM products from outside Australia

Hi Steve,

VM can modify the visibility of items depending on the Shopper Group. Each item can be assigned 1 or more shopper groups. If any are assigned, then the item is only visible to people in that/those groups.

Chameleon can then be used to automatically assign people into a shopper group based on GeoIP, and this will control what they can see.

In your case, you have a set of items which should only be visible to people who meet certain conditions: that they are IN Australia or they are NOT viewing on the parked domain.

Step 1: create a new shopper group ("AU Only") and apply it to all items that should only be seen under those 2 conditions.

Step 2: in the Config page of Chameleon, download the latest GeoIP database.

Step 3: set up 3 Chameleon rules:

1 - detect the parked domain (i.e. for everyone arriving on the parked domain. Use the www and non-www variants if necessary). Action: set the VM shopper group to "Default" and quit processing. Optionally also set a different template and/or remove some menu items that might be AU-specific.

2 - detect "people coming from countries excluding" AU.
Action: set the VM shopper group to "Default" and quit processing.

3 - the only people who will have got to rule 3 are those who are (i) on the main domain, and (ii) in Australia. So we don't need an additional condition here
Action: set the "AU Only" VM shopper group.


Future expansion: let's say you want to make some NZ-specific items and a NZ-specific parked domain. I think you want this:

- main domain: AU-only products + general products
- 1st parked domain: "rest of the world" domain - not country-specific products (not AU, not NZ etc); + general products, and has own template
- NZ parked domain: NZ-only products + general products, and has own template

In this case I would reorganise the rules a little and do it differently:

Rule 1: detect NZ parked domain. Action: set "NZ Only" shopper group and template, and quit processing.
Rule 2: detect GeoIP country NZ AND default domain. Action: set "NZ Only" shopper group and template, and quit processing.
Rule 3: detect GeoIP country NZ. Action: redirect to the NZ domain.

Note: Rule 3 catches all NZers who went to any of the other domains (default, "rest of the world") and pushes them to the NZ domain.

Create triples of rules like this for each country you want to target, apart from AU which is dealt with a little differently in the following rules.

Rule 4: by this stage we know they are not on any of the extra country-specific domains, and they are not from any of the extra countries (NZ etc), but may be on "rest of the world" or "default" domain and may be from Australia.
- detect the "rest of the world" parked domain. Action: set the VM shopper group to "Default" and quit processing. Optionally also set a different template and/or remove some menu items that might be AU-specific.

Note: If an Australian lands on the "Rest of the world" page then it will hide AU-only products. I assume this is what you want.

Rule 5: by this stage we know they must be on the default domain
- detect "people from countries excluding AU". Action: set the VM shopper group to "Default" and quit processing.

Note: rule 5 ensures that anyone landing on the Default domain who is not from AU only gets the "general products"

Rule 6: by this stage we're only dealing with people on the default domain who are in AU.
- action: set the "AU Only" VM shopper group.


I think that should do what you were asking for smile

Best regards,
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
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11529
Newest User:
jame380003
Members Online:
1
Guests Online:
168

Online: 
jame380003

Forum Legend:

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