Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default 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/sampleco...tePHP5code.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

  2. #2
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: I would like to create a 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.

  3. #3
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: I would like to create a 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

  4. #4

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

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

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

  5. #5
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: I would like to create a 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
    Code:
    <?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');
        }
      }
      
    ?>

  6. #6
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Con-Way Heavy Freight XML 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.');
    ?>

  7. #7
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Con-Way Heavy Freight XML 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/

  8. #8
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Con-Way Heavy Freight XML 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.

  9. #9
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Con-Way Heavy Freight Custom Module

    No you dont need to change anything,

    this just defines a global

  10. #10
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Con-Way Heavy Freight XML 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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a Calculating shipping for heavy items freight by truck
    By icecold in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 5 Apr 2012, 10:35 PM
  2. UPS Heavy Freight Module UPS Freight over 150 lbs.
    By Relentless in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 13 Jan 2011, 12:10 AM
  3. FedEx Xml Heavy Freight Module
    By Relentless in forum Addon Shipping Modules
    Replies: 9
    Last Post: 15 Sep 2010, 02:34 PM
  4. Way to choose Freight or UPS/FedEx
    By calvinmcdaniel in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 3 Mar 2010, 02:09 AM
  5. Con-Way shipping module
    By dmarrero in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2007, 05:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg