I have two site 1)india 2)usa, if my site watch by india no problem india site will be displayed. If my site watch by usa i need to redirect my usa website. How can i do it.
If you're developer, you can use https://github.com/magento-hackathon/Sandfox_GeoIP as starting point, as it gives you all you need to check whether customer is going from USA/India, or any other country.
Otherwise, if you're not developer, you can consider one of those paid solutions:
https://amasty.com/magento-geoip-redirect.html
https://www.fmeextensions.com/magento-geo-ip-default-store-view.html
Good stuff, how can i set the condition, if customer see my site by usa one popup will raise and show the condition like, "You are seeing now www.abc.in or continue with www.xyz.com" for only usa. How can i set my condition.
If you're using https://github.com/magento-hackathon/Sandfox_GeoIP, then you can for example add new block and template into before_body_end layout handle, like:
<reference name="before_body_end"> <block type="myvendor/myblock" template="mytemplate.phtml" name="geoip.window" /> </reference>
Your block and template should contain something like:
$usStoreId = 1; $indiaStoreId = 2; $geoIP = Mage::getSingleton('geoip/country'); $country = $geoIP->getCountry(); $storeId = Mage:app()->getStore()->getId(); if ($storeId == $usStoreId && $geoIP->getCountry != 'US') { echo 'You're not from US, although you're on US store'; } if ($storeId == $indiaStoreId && $geoIP->getCountry != 'IN') { echo 'You're not from India, although you're on India store'; }
It's just matter of frontend development how would you like to make it.
Actually i am running as a separate magento site, not a double store in same magento.