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.

 

meta mod pro use redirect

meta mod pro use redirect

I bought Metatemplate and Metamod, and I am very happy with this purchase.
I often use Metatemplate, Metamod I bought it just because it seemed a good product.
Now I think I can use it but I need help since I'm not a programmer but just a pure designer.
Well, I have a client (firstsite.net) located on the Italian market which has created a company in Spain (secondsite.es) with similar but not identical products.
The client has asked me to create an entry page with the ability to choose which site to see (if the customer is in Italy - firstsite.net, if the customer is in Spain-secondsite.es).
The idea of my client is an intro page that presents only two choices (1 Italy 2 Spain).
The problem in my opinion is that every time the user accesses the site is forced to choose Italy or Spain ...
My idea is to not ask the user, automatically directed to the Spanish site in Spain when he lives or if he uses the Spanish language.
But I have a question, how the users who lives in Spain can visit the Italian site.
The two sites will have cross-links. But if I click from Spain and I go to the Italian site, Metamod redirect in spanish site, how the spanish user can remain on the italian site?
I hope I explained ...

robjrobj
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: meta mod pro use redirect

Ok, I understand the situation. This is a good job for MetaTemplate Pro I think!  [NOTE: moved topic to MetaTemplate Pro forum instead of MetaMod Pro forum]

Here's what I would do.

1 - on tcgcom.net you want to allow people to stay, with any one of these conditions:

- they are not from spain, or their browser is not in spanish
- they entered the site using a special URL parameter (which would be remembered in the session). Any links from tcgcom.es would have to use this extra parameter.

2 - This means you could have the following scenarios:

a - user goes to tcgcom.net and is not from Spain, and browser is not in Spanish. They continue browsing in tcgcom.net.

b - user goes to tcgcom.net but is from Spain, and gets redirected to tcgcom.es. They continue browsing in tcgcom.es. If they had bookmarked tcgcom.net then they will still get sent to tcgcom.es next time.

c - user has been redirected to tcgcom.es. There is a link on tcgcom.es that takes them back to tcgcom.net/page/here?it=1. The "it=1" means that they are allowed to stay on the Italian site. tcgcom.net remembers this for the duration of the session, and will NOT redirect the person back to tcgcom.es.


How to set this up on tcgcom.net:

- Install MetaTemplate Pro

- Rule 1: detect session variable A. In the SUCCEED action, simply "stop processing".

- Rule 2: detect a url that "ends with" "it=1". In the SUCCEED action, "set session variable A", and "Stop processing".

(rules 1 and 2 together ensure that anyone sent to the site with "it=1" at the end of the URL will remain on the site and not be redirected)

- Rule 3: set up GeoIP (load the latest GeoIP database in the config screen) then switch it on in the rule, and check for country id: es
In the SUCCEED rule, redirect to the front page of tcgcom.es

- Rule 4: in "$language handling" near the top of the form, select "browser's preferred language". Then in the text box for "only these languages", enter: es
In the SUCCEED rule, redirect to the front page of tcgcom.es


I think that should do it!

Please let me know how you get on with this. There might be some changes you want to make, e.g. changing the page that people get redirected to based on where they are on the tcgcom.net site. But I am sure that can wait until you have the basic system working.

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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10816
Newest User:
sakmy567q
Members Online:
0
Guests Online:
170

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