If this is your first visit, check our documentation. To post, register or login.

Con-Way Heavy Freight Custom Module

Started by relentless on 12 Jan 2008, 2:27 AM · Views: 9,137

Results 1 to 16 of 16
12 Jan 2008, 2:27 AM
#1
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Con-Way Heavy Freight Custom Module

I would like to create a Con-Way Heavy Freight Custom Module

The PHP5 link at Con-Way XML/samplecode
https://www.con-way.com/XML/samplecode/PHP5/xRatePHP5code.htm

Will these 3 Directories work,
if not, please recommend the correct Directories to use.

1]
/public_html/includes/templates/template_default/templates/tpl_module_whatever_name.php

2]
The Form to add user data, (zip code, hard coded data)
to appear on, tpl_index_categories.php.
The call would be within tpl_index_categories.php.

3]
To handle the functioning an includes/modules/pages/whatever_name/header_php.php

Thank You

15 Jan 2008, 7:45 PM
#2
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

Relentless,

Have a look at the FEDEX shipping module. Perhaps you can use this as a road map to integrate the conway code.

-Chaddro.

15 Jan 2008, 7:52 PM
#3
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Con-Way Heavy Freight Custom Module

you need to create a file like

includes/modules/shipping/pick a file

and includes/languages/english/modules/shipping/pick the same file as above.

This is want I was refering to before when you asked me about it

Zen cart PCI compliant Hosting

9 Feb 2008, 9:12 PM
#5
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

It took some time to come up with an open source,
working, Con Way Freight PHP function page.
sorry about that.

We start with two empty files.
includes/modules/shipping/conway.php
includes/languages/english/modules/shipping/conway.php

I am not going to guess, the object is to make it work in Zen Cart.
--The PHP Function Page

<?php
/*
  This module is for use with Con Way Freight.
  Released under the GNU General Public License
*/

  class conway extends base {
    var $code, $title, $description, $icon, $enabled;

// class constructor
    function conway() {
      global $total_weight, $order, $db, $template;
				$this->code = 'conway';
				$this->title = MODULE_SHIPPING_CONWAY_TEXT_TITLE;
				$this->description = MODULE_SHIPPING_CONWAY_TEXT_DESCRIPTION;
				$this->sort_order = MODULE_SHIPPING_CONWAY_SORT_ORDER;
				$this->icon = DIR_WS_IMAGES . 'conway-images/conway.gif';
				$this->tax_class = MODULE_SHIPPING_CONWAY_TAX_CLASS;
				$this->enabled = ((MODULE_SHIPPING_CONWAY_STATUS == 'True') ? true : false);

				if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_CONWAY_ZONE > 0) ) {
						        $check_flag = false;
						        $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_CONWAY_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
						        while (!$check->EOF) {
						          if ($check->fields['zone_id'] < 1) {
						            $check_flag = true;
						            break;
						          } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
						            $check_flag = true;
						            break;
						          }
						          $check->MoveNext();
						        }

						        if ($check_flag == false) {
						          $this->enabled = false;
						        }
		        }
		        
		        if($this->enabled == true && $order->delivery['country']['iso_code_2']!='US' && $order->delivery['country']['iso_code_2']!='CA') {
		        	$this->enabled = false;
		        }
		        $this->shipping_weight = 0;
				$this->shipping_num_boxes = 1;
				if ($this->enabled == true && (is_numeric($total_weight) || $_SESSION['cart']->attributes_1216ft()==true) ) {
				  $this->shipping_weight = $total_weight;
				  if($this->shipping_weight <= 150 && $_SESSION['cart']->attributes_1216ft()==false) {
                    $this->enabled = false;
                    return false;
	              }
				}
     
    }

// class methods
    function quote($method = '') {
      global $total_weight, $zc_large_percent, $zc_large_weight, $shipping_weight, $shipping_num_boxes, $order;
      
      $this->shipping_weight = $total_weight;// + ($total_weight*($zc_large_percent/100)) + $zc_large_weight;
      
      if($this->shipping_weight <= 150 && $_SESSION['cart']->attributes_1216ft()==false) {
         $this->enabled = false;
         return false;
	  } else {
         $error_msg = '';
      
      //First, we get the customer's zipcode and country in the right format.
         $dest_country = $order->delivery['country']['iso_code_2'];
      
         if ($dest_country == 'US') {
           $dest_zip = preg_replace('/[^0-9]/i', '', strtoupper($order->delivery['postcode']));
           $dest_zip = substr($dest_zip, 0, 5);
         } elseif ($dest_country == 'CA') {
           $dest_zip = preg_replace('/[^0-9A-Z]/i', '', strtoupper($order->delivery['postcode']));
           $dest_zip = substr($dest_zip, 0, 6);
           $dest_country = 'CN';
         } else {
           $error_msg = '<br>' . MODULE_SHIPPING_CONWAY_TEXT_ERROR_BAD_COUNTRY;
         }

      //Format the shipping zip code as well. class xx insert class
         if (MODULE_SHIPPING_CONWAY_SHIP_COUNTRY == 'US') {
           $ship_zip = preg_replace('/[^0-9]/i', '', MODULE_SHIPPING_CONWAY_SHIP_ZIP);
           $ship_zip = substr($ship_zip, 0, 5);
           $ship_country = 'US';
         } elseif (MODULE_SHIPPING_CONWAY_SHIP_COUNTRY == 'CA') {
           $ship_zip = preg_replace('/[^0-9A-Z]/i', '', strtoupper(MODULE_SHIPPING_CONWAY_SHIP_ZIP));
           $ship_zip = substr($ship_zip, 0, 6);
           $ship_country = 'CN';
         }
	  
         if (!zen_not_null($error_msg)) {
         	$title = "Rating";
            $requestType = "RateRequest";
            $requestUrl = "https://www.Con-way.com/XMLj/X-Rate";
            $today = date("m/d/y");
            $username = MODULE_SHIPPING_CONWAY_USERNAME;
            $password = MODULE_SHIPPING_CONWAY_PASSWORD;
            $custNmbr = MODULE_SHIPPING_CONWAY_CUSTOMER_NUMBER;
            $shipterm = MODULE_SHIPPING_CONWAY_SHIP_TERMS;
            $myElements = array('TotalCharge','NetCharge');
            //$myElements = array('TotalCharge', 'Discount', 'TotalAccessorialCharges', 'NetCharge', 'TransitTime');
            $itemArray = array(array('class'=>'XX', 'weight'=>ceil($this->shipping_weight)));

			$accArray = array();	// Your accessorial services - add as needed
			$accArray[] = "SSC";
            if (MODULE_SHIPPING_CONWAY_RES_DELIVERY == 'True' && !zen_not_null($order->delivery['company'])) {
		  	  $accArray[] = "RSD";
	    	}
	    	if (MODULE_SHIPPING_CONWAY_INS_PICKUP == 'True') {
          	  $accArray[] = "OIP";
        	}
        	if (MODULE_SHIPPING_CONWAY_INS_DELIVERY == 'True') {
		  	  $accArray[] = "DID";
	    	}
	    	if (MODULE_SHIPPING_CONWAY_DNC == 'True') {
		  	  $accArray[] = "DNC";
	    	}
	    	if (MODULE_SHIPPING_CONWAY_LIFT_GATE_DELIVERY == 'True') {
		  	  $accArray[] = "DLG";
	    	}
	    	if (MODULE_SHIPPING_CONWAY_RATE_GUARANTEED == 'True') {
		  	  $accArray[] = "GUR";
	    	}
	    	
	    	$xmlRequest="<RateRequest>" .
		                "<OriginZip country=\"$ship_country\">$ship_zip</OriginZip>" .
		                "<DestinationZip country=\"$dest_country\">$dest_zip</DestinationZip>";
            if(zen_not_null($custNmbr)) {
              $xmlRequest .= "<CustNmbr shipcode=\"S\">$custNmbr</CustNmbr>";
            }
            
            $xmlRequest .= "<ChargeCode>$shipterm</ChargeCode>" .
		                   "<DiscountRate>100</DiscountRate>" .
		                   "<EffectiveDate>$today</EffectiveDate>";

            foreach ($itemArray as $item) {	// Add commodity items to the XML Request
	          extract($item);
	          $xmlRequest .= "<Item>" .
			                 "<CmdtyClass>$class</CmdtyClass>" .
			                 "<Weight unit=\"lbs\">$weight</Weight>" .
			                 "</Item>";
            }
            
            foreach ($accArray as $acc) {	// Add accessorials to the XML Request
	          $xmlRequest .= "<Accessorial>$acc</Accessorial>";
            }

			$xmlRequest .= "</RateRequest>";
			//echo '<pre>'.htmlspecialchars($xmlRequest).'</pre>';
            $xmlRequest = urlencode($xmlRequest);

// open synchronous connection to Con-way servlet and set options
            $urlConn = curl_init ($requestUrl);
            curl_setopt ($urlConn, CURLOPT_POST, 1);
            curl_setopt ($urlConn, CURLOPT_SSL_VERIFYPEER, 0);
		    curl_setopt ($urlConn, CURLOPT_SSL_VERIFYHOST, 0);
            curl_setopt ($urlConn, CURLOPT_HTTPHEADER, array("Content-type: application/x-www-form-urlencoded"));
            curl_setopt ($urlConn, CURLOPT_USERPWD, $username.":".$password);
            curl_setopt ($urlConn, CURLOPT_POSTFIELDS, "$requestType=$xmlRequest");
            ob_start();
			curl_exec($urlConn);
			$xmlResponse = ob_get_contents();
            ob_end_clean();
            if (curl_errno($urlConn)) {
			  curl_close($urlConn);
              $error_msg =  sprintf('Unable to connect to Con-way server. Error [%d]: %s', curl_errno($ch), curl_error($ch));
          	} else {
          	  curl_close($urlConn);
              $total_shipping_price = 0;
              $parser= xml_parser_create();
              xml_parse_into_struct($parser,$xmlResponse,$xmlVals);
              xml_parser_free($parser);
           // print_r($xmlVals);
              $myVals = $this->getElementValue($xmlVals, 'NetCharge');
              $ship_price = $myVals[0];
              if (!is_numeric($ship_price)) {
              	$error_msg = MODULE_SHIPPING_CONWAY_TEXT_ERROR_BAD_RESPONSE;
              } else {
                $handling_fee = MODULE_SHIPPING_CONWAY_HANDLING;
              	if(!zen_not_null($handling_fee)) {
				  $handling_fee = 0;
              	} elseif(substr($handling_fee, -1) == '%') {
				  $handling_fee = ($handling_fee / 100) * $ship_price;
				} elseif($handling_fee > 0 && $handling_fee < 1) {
                  $ship_price = $ship_price/$handling_fee;
				  $handling_fee = 0;
			    }
              	$total_shipping_price = $ship_price + $handling_fee;
              }
	        
	       }
         }//if (!zen_not_null($error_msg)) {
      
         if (!zen_not_null($error_msg)) {
		   $items_1216ft_fee = MODULE_SHIPPING_CONWAY_ITEMS1216FT_FEE;
		   $items_1216ft_fee = trim($items_1216ft_fee);
		   if(is_numeric($items_1216ft_fee)) {
		     if($_SESSION['cart']->attributes_1216ft()==true) $total_shipping_price = $total_shipping_price + MODULE_SHIPPING_CONWAY_ITEMS1216FT_FEE;
		   }
           $this->quotes = array('id' => $this->code,
                                 'module' => '',//MODULE_SHIPPING_CONWAY_TEXT_TITLE,
                                 'methods' => array(array('id' => $this->code,
                                                          'title' => MODULE_SHIPPING_CONWAY_TEXT_WAY,
                                                          'cost' => $total_shipping_price)));
  
           if ($this->tax_class > 0) {
             $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
           }
  
           if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
         } else {
           $this->quotes = array('module' => $this->title,
                              'error' => MODULE_SHIPPING_CONWAY_TEXT_ERROR_DESCRIPTION . ' ' .$error_msg);
         }
         return $this->quotes;
      }
    }
    
    function getElementValue($xmlVals, $elName) {
	  $elValue = null;
	  foreach ($xmlVals as $arrkey => $arrvalue) {
		foreach ($arrvalue as $key => $value) {
			if ($value==strtoupper($elName)){
				$elValue[] = $arrvalue['value'];
			}
		}
	  }
	  return $elValue;
    }
    
    function check() {
      global $db;

				if (!isset($this->_check)) {
						$check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_CONWAY_STATUS'");
						$this->_check = $check_query->RecordCount();
				}

				return $this->_check;
    }

    function install() {
      global $db;
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Conway Freight Shipping', 'MODULE_SHIPPING_CONWAY_STATUS', 'True', 'Do you want to offer Conway Freight shipping?', '6', '10', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Terms', 'MODULE_SHIPPING_CONWAY_SHIP_TERMS', 'P', 'Will these shipments be prepaid (P) or collect (C)? (This is here for future dev.  No collect support right now)', '6', '20', 'zen_cfg_select_option(array(\'P\', \'C\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipper\'s Zip Code', 'MODULE_SHIPPING_CONWAY_SHIP_ZIP', 'ZIPCODE', 'Enter the zip code of where these shipments will be sent from. (Required)', '6', '30', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipper\'s Country', 'MODULE_SHIPPING_CONWAY_SHIP_COUNTRY', 'US', 'Select the country where these shipments will be sent from.', '6', '40', 'zen_cfg_select_option(array(\'US\', \'CA\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Username', 'MODULE_SHIPPING_CONWAY_USERNAME', 'USERNAME', 'Your Conway account username.', '6', '50', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Password', 'MODULE_SHIPPING_CONWAY_PASSWORD', 'PASSWORD', 'Your Conway account password.', '6', '60', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Customer Number', 'MODULE_SHIPPING_CONWAY_CUSTOMER_NUMBER', 'Your Account # Here', 'Your Conway customer number to get a customer specific discount.', '6', '70', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Inside Pickup', 'MODULE_SHIPPING_CONWAY_INS_PICKUP', 'False', 'Indicates if this is an inside pickup.', '6', '70', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Inside Delivery', 'MODULE_SHIPPING_CONWAY_INS_DELIVERY', 'False', 'Indicates if this is an inside delivery.', '6', '80', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Residential Delivery', 'MODULE_SHIPPING_CONWAY_RES_DELIVERY', 'False', 'Enable residential delivery if delivery address has no company name?', '6', '90', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Destination Notify', 'MODULE_SHIPPING_CONWAY_DNC', 'False', 'Indicates if Destination Notify.', '6', '100', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Lift Gate Delivery', 'MODULE_SHIPPING_CONWAY_LIFT_GATE_DELIVERY', 'False', 'Will Conway need a lift gate on the delivery address?', '6', '110', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Guaranteed Rate', 'MODULE_SHIPPING_CONWAY_RATE_GUARANTEED', 'False', 'Display Guarantted delivery rate instead of normal rate?', '6', '115', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_CONWAY_HANDLING', '.72', 'Handling fee for this shipping method.', '6', '120', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Items 12/16 FT Fee', 'MODULE_SHIPPING_CONWAY_ITEMS1216FT_FEE', '40.00', 'Handling fee on items 12/16 FT lengths for this shipping method.', '6', '125', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_CONWAY_TAX_CLASS', '1', 'Use the following tax class on the shipping fee.', '6', '130', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_CONWAY_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '140', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_SHIPPING_CONWAY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '150', now())");
    }

    function remove() {
      global $db;
      $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
    }

    function keys() {
      return array('MODULE_SHIPPING_CONWAY_STATUS',
	               'MODULE_SHIPPING_CONWAY_SHIP_TERMS',
				   'MODULE_SHIPPING_CONWAY_SHIP_ZIP',
				   'MODULE_SHIPPING_CONWAY_SHIP_COUNTRY',
				   'MODULE_SHIPPING_CONWAY_USERNAME',
				   'MODULE_SHIPPING_CONWAY_PASSWORD',
				   'MODULE_SHIPPING_CONWAY_CUSTOMER_NUMBER',
				   'MODULE_SHIPPING_CONWAY_INS_PICKUP',
				   'MODULE_SHIPPING_CONWAY_INS_DELIVERY',
				   'MODULE_SHIPPING_CONWAY_RES_DELIVERY',
				   'MODULE_SHIPPING_CONWAY_DNC',
				   'MODULE_SHIPPING_CONWAY_RATE_GUARANTEED',
				   'MODULE_SHIPPING_CONWAY_LIFT_GATE_DELIVERY',
				   'MODULE_SHIPPING_CONWAY_HANDLING',
				   'MODULE_SHIPPING_CONWAY_ITEMS1216FT_FEE',
				   'MODULE_SHIPPING_CONWAY_TAX_CLASS',
				   'MODULE_SHIPPING_CONWAY_ZONE',
				   'MODULE_SHIPPING_CONWAY_SORT_ORDER');
    }
  }
  
?>
11 Feb 2008, 11:16 PM
#6
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

Now we have the two files.
The 2nd file is
includes/languages/english/modules/shipping/conway.php

<?php /* Released under the GNU General Public License */ define('MODULE_SHIPPING_CONWAY_TEXT_TITLE', 'Con-way Freight'); define('MODULE_SHIPPING_CONWAY_TEXT_DESCRIPTION', 'Con-way Freight.'); define('MODULE_SHIPPING_CONWAY_TEXT_WAY', 'Con-way Freight'); define('MODULE_SHIPPING_CONWAY_TEXT_ERROR_BAD_COUNTRY', 'Con-way Freight is only available to customer in the United States and Canada.'); define('MODULE_SHIPPING_CONWAY_TEXT_ERROR_BAD_RESPONSE', 'Con-way Freight returned an error or invalid response.'); define('MODULE_SHIPPING_CONWAY_TEXT_ERROR_DESCRIPTION', 'We\'re sorry, but an error occured while calculating the Con-way Freight shipping prices.'); define('MODULE_SHIPPING_CONWAY_TEXT_ERROR_SHIPPING_WITHIN_CA', 'We\'re sorry, but Con-way Freight\'s estimator does not currently support estimates for shipping from one Canadian address to another.'); ?>
12 Feb 2008, 1:17 AM
#7
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

You will need PHP 5. and Curl support,
to use this Con Way rate request PHP script.
If your Host does not support these,
I use Camelot Hosting, they are Zen Cart Hosts
http://www.camelot-hosting.com/hosting/

12 Feb 2008, 2:01 AM
#8
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

First Question
In includes,
about line 150 we see this

function install() {
global $db;

since this is is from a working site,
I assume that my db will have to agree with this,
or the correct changes are made to it,
based on my actual db information.

12 Feb 2008, 2:03 AM
#9
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Con-Way Heavy Freight Custom Module

No you dont need to change anything,

this just defines a global

Zen cart PCI compliant Hosting

13 Feb 2008, 1:57 AM
#10
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

Sorry about that my bad
I was referring to the next 18 lines of PHP
Starting at about 250,
Example 3rd line.
function install() {
global $db;
$db->Execute("insert into " . TABLE_CONFIGURATION . "
(configuration_title, configuration_key,
configuration_value, configuration_description,
configuration_group_id, sort_order, date_added) values
('Shipper's Zip Code', 'MODULE_SHIPPING_CONWAY_SHIP_ZIP',
'ZIPCODE',
'Enter the zip code of where these shipments will be sent from.
(Required)', '6', '30', now())");

The question:
All 18 lines of $db->Execute
are answered from information in the Data Base.

15 Feb 2008, 11:21 PM
#11
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

Answer to last post
The 18 lines add data to the data base
----New
The SimpleXML extension provides a very simple and easily usable toolset
to convert XML to an object that can be processed with
normal property selectors and array iterators.
Requirements
The SimpleXML extension requires PHP 5.
Installation
The SimpleXML extension is enabled by default.

PHP 5 = SimpleXML extension enabled by default.

17 Feb 2008, 4:25 AM
#12
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

If you go to the Zen Cart admin:
Admin -> modules
And click on any of them you will see how they work.
When you click on the install button, the module writes information to the database.
The conway module should function in a similar manner,
when you install it.

If in Admin -> modules
This Warning: was shown,
Warning: Store Zip Code is not defined. See Configuration |
Shipping/Packaging to set it.
This will set your store [ship from zip code].

Drop shipments are another issue,
that I will try to find the solution.

1 Apr 2008, 12:44 AM
#13
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

It has been requested in the Zen Cart Forum that,
the two heavy freight modules, for Freight over 150lbs.
due to copying from the forum errors [blank spaces etc.] that,
FedEx and Con Way be posted in the Downloads section of Zen Cart.
I now feel that they are complete modules.
Register with the Freight company, and use.
I think that someone,
should test them to see, that they will load properly to the, Admin. ,
and the [get shipping quote form], when activated. Also to look at the code.
Remember that they come from a working web site.
I would post them, but I think that testing first is needed,
and I could not support them, for obvious lack of PHP skill..
If you feel you can support these files PM me
your email address.
I will email you the files.

20 Feb 2011, 9:06 PM
#14
Join Date:
Mar 2010
Posts:
9
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

Hello, I've tried to use this and wondered if anyone's made successful additional changes to the code that was last posted here?

I'd like to make sure I'm not using outdated php. Thanks!

22 Feb 2011, 4:40 AM
#15
Join Date:
Mar 2010
Posts:
9
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

CheapStairParts:

we have a working one on our site. http://www.cheapstairparts.com

we had to pay a programmer from https://www.ifreelance.com to build it for us. works perfect.

Hi, is it possible to acquire the shipping files from you or purchase them for use?

Please let me know, thanks!

15 Mar 2011, 10:52 PM
#16
Join Date:
Mar 2010
Posts:
9
Plugin Contributions:
0

Re: Con-Way Heavy Freight Custom Module

Okay, I've got it setup now. If you want to use the Conway custom Freight Module let me know. My client has paid for it's development and we'd like to recoup our costs. I can guarantee that this will work on your system. Again, email me if you'd like to have this.