Xpajun Posted October 3, 2009 Posted October 3, 2009 Had an enjoyable 3 or 4 hours looking for the answer to this :rolleyes: I want to limit some of my payment modules to one country and also want to deny access to a country to others I think I need to add something like this: if ($order->delivery['country']['iso_code_2'] == 'GB') { // Only UK Customers to see shipping method. Hide everybody else. from a shipping module and put it somewhere in this: function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } Anyone willing to give advice? My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
multimixer Posted October 3, 2009 Posted October 3, 2009 Is this not possible to do via admin? For example, I have COD only for my greek customers, a german one has to choose paypal or cc. So I have COD only available for zone "greece" Maybe I didn't understood the question? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Xpajun Posted October 3, 2009 Author Posted October 3, 2009 Yes this is true but if you want to stop just one country using the module you get the problem of a 255 character limit so you can't add 240 odd country codes for those that can view it rather than just add one that can't view it. And if you want to use zones for something else... My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
Recommended Posts
Archived
This topic is now archived and is closed to further replies.