Jump to content
Sign in to follow this  
Naegle

REQUEST FOR QUOTE: Freight and International Shipping Quote Modules

Recommended Posts

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;

}

}

}

Share this post


Link to post
Share on other sites

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;
	}
  }
}


Hip Hop Jewelry | Bling Bling | Iced Out

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×