Jump to content

greatbigterry

New Members
  • Posts

    2
  • Joined

  • Last visited

greatbigterry's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks Barand - so the code above looks fine? If the function showCountryContentInPage was broken wouldn't that mean the US version would stop working too?
  2. PHP newb here - apologies if the answer to this is really simple. I've tried to add a geotargetting code into my website but it appears the elseif part isn't working, no matter what I do. Here's the code - any idea why if is fine, and else is fine, but elseif isn't? <?php if (function_exists('showCountryContentInPage')) { if(showCountryContentInPage(array("us", "ca"),1)) { // US $region = 'USA'; $country = codediesel_get_users_country(); $store_url = 'URL here'; } elseif(showCountryContentInPage(array("at", "es", "cy", "fi", "ee", "fr", "de", "el", "ie", "it", "mt", "lu", "lv", "nl", "pt", "sk", "si", "be"),1)) { // Europe $region = 'Europe'; $country = codediesel_get_users_country(); $store_url = 'URL here'; } else { // UK $region = 'UK'; $country = codediesel_get_users_country(); $store_url = 'URL here'; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.