Jump to content

Gsnerf

Members
  • Content count

    2
  • Joined

  • Last visited

Profile Information

  • Real Name
    Michalis Adamidis
  1. Gsnerf

    State Based Region Shipping Rates

    Hi ppl, i don't know if anyone needs it, but well since i needed it and coded it i thought maybe someone else may find it interesting. I needed a possibility to add a "all" region since we ship to the whole world. So as i am lame and don't want to add all countrys into a region, i added some code to check if the last region configured in admin contains "All" and sets the region to use to that region if the customers country isn't in any other region. To achieve it just add: if ($dest_region == 0) { $i = $this->regions; $regions_table = constant('MODULE_SHIPPING_REGIONS' . $i); $country_states_or_countries = split("[,]", $regions_table); if (in_array("All", $country_states_or_countries)) $dest_region = $this->regions; } after if ($dest_region == 0) { for ($i=1; $i<=$this->regions; $i++) { $regions_table = constant('MODULE_SHIPPING_REGIONS' . $i); $country_states_or_countries = split("[,]", $regions_table); if (in_array($dest_country, $country_states_or_countries)) { $dest_region = $i; break; } } } Done :) Hope it helps someone. greetz Gsnerf
  2. Gsnerf

    Register Globals Support

    /* EDIT */ forget about it... i'm just poorly dumb...
×