Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

REQUEST FOR QUOTE: Freight and International Shipping Quote Modules


Naegle

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;

}

}

}

Link to comment
Share on other sites

  • 5 months later...
  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...