Sweetapple_Geotargeting

Magento Extension
Download latest - 0.1.4

You can make a simple query to determine the country a visitor to your web site is browsing from. You can then show them different content, according to the country reported, with a few lines of simple template logic.

This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com

Basic example code to use in your .phtml template files:

$_ipHelper = $this->helper('sweetapple_geotargeting/data'); /* @var $_ipHelper Sweetapple_Geotargeting_Helper_Data */
$countryCodeFromIP = $_ipHelper->getCountryCodeFromIPAddress();
if( $countryCodeFromIP == "GB" ) {
//do something here, like load a specific static block...
echo $this->getLayout()->createBlock('cms/block')->setBlockId('home_page_message_GB')->toHtml();
}

Releases (3)

Date Version Notes
2014-02-20 0.1.4

Compatible with Magento Community Edition 1.7.0, 1.7.1 and 1.7.2.

2013-06-09 0.1.3

Compatible with Magento Community Edition 1.7.0, 1.7.1 and 1.7.2.

2013-06-08 0.1.2

Compatible with Magento Community Edition 1.7.0, 1.7.1 and 1.7.2.