dabehr Posted October 21, 2008 Share Posted October 21, 2008 I modified function rfq() to look like: // class constructor function rfq() { global $order; $zones_array = array(); $this->code = 'rfq'; $this->title = MODULE_SHIPPING_RFQ_TEXT_TITLE; $this->description = MODULE_SHIPPING_RFQ_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_RFQ_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_rfq.gif'; $this->enabled = ((MODULE_SHIPPING_RFQ_STATUS == 'True') ? true : false); //print_r($order->delivery); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_RFQ_ZONE > 0) ) { $sql_q = tep_db_query("SELECT geo_zone_id FROM zones_to_geo_zones WHERE zone_id = '" . $order->delivery['zone_id'] ."' GROUP BY geo_zone_id "); while($sql_f = mysql_fetch_assoc($sql_q)) { $zones_array[] = $sql_f['geo_zone_id']; } $check_flag = false; if(!in_array(MODULE_SHIPPING_RFQ_ZONE,$zones_array)) { $check_flag = true; } if ($check_flag == false) { $this->enabled = false; } } } Quote Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2009 Share Posted April 10, 2009 Here's the Fix for Zones Replace if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_RFQ_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id <> '" . MODULE_SHIPPING_RQF_ZONE . "' and zone_country_id <> '" . $order->delivery['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->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_RFQ_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_RFQ_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); // $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id <> '" . MODULE_SHIPPING_RQF_ZONE . "' and zone_country_id <> '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == true) { $this->enabled = false; } } } Quote Link to comment Share on other sites More sharing options...
wijnendael Posted March 22, 2011 Share Posted March 22, 2011 Think i posted this in a new topic instead of adding it as a reply to this thread whoops !! Hi to everyone who posted on this thread. I have just downloaded and installed version 1.3 of request for quote and have the same problem on version 2.3 of oscommerce as previous posters. After reading through the posts i am unsure if the last post was a fix for the problem and would be grateful if somebody could tell me if it is. If this is the fix please tell me where i have to make the modification as the file is not named. The addon seems to do exactly what i require if i can get it to work correctly so please let me know. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.