Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

dlpuma

Archived
  • Posts

    23
  • Joined

  • Last visited

Profile Information

  • Real Name
    Dorothy Puma

dlpuma's Achievements

  1. For those looking for a possible solution for having Master Products and Option Type working together, I did some modifications as shown below. I am not a programmer, and these mods are "Use at your Own Risk", but maybe someone else might be able to clean things up a bit. Okay, this is what I did, since I needed the Master Product to keep the price displayed, I altered the original if statement (step 4) and that's why I added the extra field in the database (step 1). I kept the "Option Type" modifications the same as the original contribution (some suggestions in the "Master Products" forum were to change them, but I found out that we need to keep them intact). Step 1: ALTER TABLE products ADD master_list_qty_box INT( 5 ) DEFAULT '1' NOT NULL; (this allows for the if statement to work) Step 2: Change this code: <td width="100%" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> to: if ($product_info['master_list_qty_box']==0) { ?> <td width="100%" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php } else { ?> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php } ?> Step 3: Update the sql statement from this: $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_master_status, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); to add in the "master_list_qty_box": $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, pd.products_url, p.products_price, p.products_master_status, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.master_list_qty_box from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Step 4: change this: if ($product_info['products_price']>0) { to this: if ($product_info['master_list_qty_box']>0) { I also changed the pull down quantity to an input field step 5: change this (I think there are two of these to change): echo TEXT_QUANTITY . ' ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array); to: echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); Step 6: We need to add in the end of the form. So, change this: </table></td> <!-- Master Products EOF //--> <!-- body_text_eof //--> to this: </table></form></td> <!-- Master Products EOF //--> <!-- body_text_eof //--> That should be all the changes. Now, when you add a Master Product, you change the "master_list_qty_box" to a zero and the slaves will add correctly, even if you have options within the slaves. If you have "master_list_qty_box" as a 1, then the option types will work. To see this in action check out my website. For the text input boxes (no slaves): Custom Belt For a Master with Slaves: Hapkido Uniform And, a Master with Slaves and the slaves have options: Graphite Bo Hope this helps :D --- Dorothy
  2. I had a lot of trouble with this. I was able to get the radio buttons and check boxes to work with out a hitch, but the text and text area would not work. So, I have done a "work-around" that allows the Option Type features to work with stand alone products. Any Master/Slave products work as originally intended with just the pull down menus. --- Dorothy
  3. I've been digging through the 135 pages of this thread, but did not find this is a preious post. I have CCGV 5.13 installed and working, but I'm also using LinkPoint which needs the subtotal, shipping and tax to add up to the total for the order to be processed. I've found a few hacks and got the sort order changed for the subtotal to be recalculated. The problem comes in where the discount is a percentage and the rounding not coming out the same Example: Subtotal before disounts etc: $33.25 Discount Coupons:XWP-11002: -$3.33 Sub-Total: $29.93 United States Postal Service (1 x 4.4lbs) (Priority (2 - 3 Days)): $8.85 California Sales Tax: $2.32 Total: $41.09 Because the 10% discount is rounded up to $3.33, when the new subtotal is calculated, it is off by .01 ($33.25-$3.33 is $29.92), so when you add $29.93 + $8.85 + $2.32=$41.10 I'm not a PHP programer, but can dig my way around. I'm not sure where these calculations are done, and why the totals are coming up different. If anyone has any ideas, please let me know. --- Thanks, Dorothy
  4. Well, I did a work around for it. Basically, I have the "text boxes" only working if the product is standalone (no slaves). I added an extra field to the products table, then ran a couple of if statements based on that field. Works great for my application, but it may not work for what you're looking for. If the product has slaves, than the options won't work, as the form action is different for a "slaves" or "non-slaves" product. If you want more info, you can PM me. --- Thanks, Dorothy
  5. I am trying to get Master Products and Option Type v1.71 to work together. So, far my only draw back is the text boxes pulling through to the cart. I'm a newb at php, but I think I have it narrowed down to how Master Products and Option Type parse the variables differently when added to the cart. A correct value for a text input field should have the txt as part of the option value id (as per sample) <input type="hidden" name="products_id[]" value="97{txt_1}12589"> However, when using Master Products to add the items to the cart, the txt is missing: <input type="hidden" name="products_id[]" value="97{1}test123"> I know the missing "txt" is the key to my problem. What I do not know is how to get the Master Products code shown below to append the txt to the option value id //Master Products // customer adds multiple products from the master_listing page case 'add_slave' : reset($HTTP_POST_VARS); while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_") { $prodId = substr($key,11); $qty = $val; if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) { // We have attributes $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]); } else { // No attributes $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty); } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; //Master Products EOF If any one has any ideas, I would greatly appreciate any help, this is the one thing keeping me from turning my site live (I've been running interchange for almost 5 years now, and am anxious to move over to osCommere!) Thanks, Dorothy
  6. I've been running an interchange store for almost 5 years. I'm looking forward to finishing the move over to osCommerce. I'm about to go live but I'm still stuck on getting Master Products and Option Type to work together. I need to be able to use input boxes, but the values are not following to the shopping cart. I'm just a newb when it comes to php. Has anyone been able to get Master Products and Option Type working together? Thanks, Dorothy
  7. Turns out that the previous mod that doesn't play nice with Option Type is Master Products. I really need these two to work together. I've been able to update part of the code to allow the options to follow through to the cart except the text and textarea. If anyone has been able to marry these two contribs please let me know. Thanks, Dorothy
  8. I am running into the same problem trying to integate MP Rev 4 with Option Type 1.71. I got most of it working and pulling through to the shopping cart, except for the text and textarea boxes. Any one have any ideas? Has anyone updated the master_listing.php to allow for the different option types? Any help would be greatly appreciated --- Thanks, Dorothy
  9. Okay, I stepped back my installation and turns out one of my other mods caused the problem. Now I am getting all the options to come across to the shopping cart, except for the text box. I will check the archives, as I think a fix was posted for that already. --- Thanks, Dorothy
  10. I have installed the 1.71 version on a heavily modified store but am having the problem where the options are not following through to the cart, etc. I've gone over the forum several times, gone over my installation several times but still no luck. According to the Readme file, things are dependent on the data input for the TEXT value to have an ID of 0. I've have checked this numerous times, and all is correct. Can some one please point me in the right direction to troubleshoot this futher. I'm pulling my hair out!!! Thanks, Dorothy
  11. Hi all, I have been so busy working on other parts of the site and moving my database over, that I haven't had a chance to look at all of this in awhile. Baby Boy, you said you had a different version on your server, than what you had posted on the contrib. If that's the case, can you post the "clean" version you have. I'll start fresh and see if the $0.00 problem still exists. Like I've said before, I'm not a programmer, but I've been able to fiddle here and there. The only problem I have is International orders, I get: Warning: Invalid argument supplied for foreach() in /path/fedexzipzones.php on line 110 Domestic addresses work flawlessly.
  12. Well, if you have a file comparison program, like Beyond Compare, you can compare your version with my complete file: <?php /* Released under the GNU General Public License */ class fedexzipzones { var $code, $title, $description, $enabled, $num_zones, $surcharge_factor; // class constructor:w function fedexzipzones() { $this->code = 'fedexzipzones'; $this->title = MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE; $this->description = MODULE_SHIPPING_FEDEXZIPZONES_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_FEDEX_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_fedex.gif'; $this->enabled = MODULE_SHIPPING_FEDEXZIPZONES_STATUS; // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_zones = 1; $this->types = array( 'FedEx Standard Overnight' => 'std', 'FedEx Priority Overnight' => 'pri', 'FedEx Ground' => 'gnd', //'FedEx First Overnight' => 'frs', 'FedEx Express Saver' => 'sav', 'FedEx 2Day' => 'two', ); // change this surcharge factor to cover the gas surcharge from fedex, or to bury packaging costs $this->surcharge_factor = 2; } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $rounded_weight = ceil($shipping_weight); // Tim's new code to read the db and come up with a value. // first get the dest zip and check the db for our dest zone $zip = $order->delivery['postcode']; if ( $zip == '' ){ // something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_NO_ZIPCODE_FOUND; return $this->quotes; } $sql = "SELECT * FROM fedex_pcode_to_zone_xref WHERE $zip >= pcode_from and $zip <= pcode_to"; $qResult = tep_db_query($sql); // run the query $rec = tep_db_fetch_array($qResult); // get the first row of the result $zone_id = $rec['zone_id']; if ( $zone_id == '' ){ // something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_NO_ZONE_FOUND; return $this->quotes; } $sql = "SELECT fedex_zone_rates.shiptype_id, fedex_shiptype.shiptype_name, fedex_zones.zone_name, fedex_zone_rates.zonerate_id, fedex_zone_rates.zone_cost FROM fedex_zone_rates, fedex_zones, fedex_shiptype WHERE "; if ($method != ''){ // they asked for a particular method, let's give that to them foreach($this->types as $key=>$type){ if ($type == $method){ break; // we found the right one. } } // limit the query to the specific method listed $sql .= "fedex_shiptype.shiptype_name = '$key' AND "; } $sql .= "fedex_zone_rates.zone_id = fedex_zones.zone_id and fedex_zone_rates.shiptype_id = fedex_shiptype.shiptype_id and fedex_zone_rates.weight = $rounded_weight and fedex_zone_rates.zone_id = $zone_id ORDER BY fedex_zone_rates.zone_cost"; $qResult = tep_db_query($sql); // run the query while($rec = tep_db_fetch_array($qResult)) { $retArr[] = $rec; } foreach( $retArr as $aquote){ $cost = $aquote['zone_cost']; $title = $aquote['shiptype_name']; $methods[] = array( 'id' => $this->types[$title], 'title' => $title, 'cost' => (round(($cost * $this->surcharge_factor * $shipping_num_boxes),2)) + ' . MODULE_SHIPPING_FEDEXZIPZONES_HANDLING .'); } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_FEDEXZIPZONES_TEXT_UNITS .')' , #'module' => MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE, 'methods' => $methods); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_INVALID_ZONE; return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FEDEXZIPZONES_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Enable Fedex Zipcode Zones Method', 'MODULE_SHIPPING_FEDEXZIPZONES_STATUS', '1', 'Do you want to offer fedex zip zone rate shipping?', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_FEDEXZIPZONES_HANDLING', '0', 'Handling Fee for this shipping method', '6', '0', now())"); tep_db_query("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_FEDEX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); for ($i = 1; $i <= $this->num_zones; $i++) { $default_countries = ''; if ($i == 1) { $default_countries = 'US,CA'; } # tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Fedex Zone " . $i ." Countries', 'MODULE_SHIPPING_FEDEXZIPZONES_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())"); # tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Fedex Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_FEDEXZIPZONES_COST_" . $i ."', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '6', '0', now())"); } } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } function keys() { $keys = array('MODULE_SHIPPING_FEDEXZIPZONES_STATUS', 'MODULE_SHIPPING_FEDEXZIPZONES_HANDLING','MODULE_SHIPPING_FEDEX_SORT_ORDER'); for ($i=1; $i<=$this->num_zones; $i++) { $keys[] = 'MODULE_SHIPPING_FEDEXZIPZONES_COUNTRIES_' . $i; $keys[] = 'MODULE_SHIPPING_FEDEXZIPZONES_COST_' . $i; } return $keys; } } ?> Hope this helps
  13. Here is the entire fedexzones.php file, including the "sorting" changes. <?php /* Released under the GNU General Public License */ class fedexzipzones { var $code, $title, $description, $enabled, $num_zones, $surcharge_factor; // class constructor:w function fedexzipzones() { $this->code = 'fedexzipzones'; $this->title = MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE; $this->description = MODULE_SHIPPING_FEDEXZIPZONES_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_FEDEX_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_fedex.gif'; $this->enabled = MODULE_SHIPPING_FEDEXZIPZONES_STATUS; // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_zones = 1; $this->types = array( 'FedEx Standard Overnight' => 'std', 'FedEx Priority Overnight' => 'pri', 'FedEx Ground' => 'gnd', //'FedEx First Overnight' => 'frs', 'FedEx Express Saver' => 'sav', 'FedEx 2Day' => 'two', ); // change this surcharge factor to cover the gas surcharge from fedex, or to bury packaging costs $this->surcharge_factor = 2; } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $rounded_weight = ceil($shipping_weight); // Tim's new code to read the db and come up with a value. // first get the dest zip and check the db for our dest zone $zip = $order->delivery['postcode']; if ( $zip == '' ){ // something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_NO_ZIPCODE_FOUND; return $this->quotes; } $sql = "SELECT * FROM fedex_pcode_to_zone_xref WHERE $zip >= pcode_from and $zip <= pcode_to"; $qResult = tep_db_query($sql); // run the query $rec = tep_db_fetch_array($qResult); // get the first row of the result $zone_id = $rec['zone_id']; if ( $zone_id == '' ){ // something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_NO_ZONE_FOUND; return $this->quotes; } $sql = "SELECT fedex_zone_rates.shiptype_id, fedex_shiptype.shiptype_name, fedex_zones.zone_name, fedex_zone_rates.zonerate_id, fedex_zone_rates.zone_cost FROM fedex_zone_rates, fedex_zones, fedex_shiptype WHERE "; if ($method != ''){ // they asked for a particular method, let's give that to them foreach($this->types as $key=>$type){ if ($type == $method){ break; // we found the right one. } } // limit the query to the specific method listed $sql .= "fedex_shiptype.shiptype_name = '$key' AND "; } $sql .= "fedex_zone_rates.zone_id = fedex_zones.zone_id and fedex_zone_rates.shiptype_id = fedex_shiptype.shiptype_id and fedex_zone_rates.weight = $rounded_weight and fedex_zone_rates.zone_id = $zone_id ORDER BY fedex_zone_rates.zone_cost"; $qResult = tep_db_query($sql); // run the query while($rec = tep_db_fetch_array($qResult)) { $retArr[] = $rec; } foreach( $retArr as $aquote){ $cost = $aquote['zone_cost']; $title = $aquote['shiptype_name']; $methods[] = array( 'id' => $this->types[$title], 'title' => $title, 'cost' => (round(($cost * $this->surcharge_factor * $shipping_num_boxes),2)) + ' . MODULE_SHIPPING_FEDEXZIPZONES_HANDLING .'); } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_FEDEXZIPZONES_TEXT_UNITS .')' , #'module' => MODULE_SHIPPING_FEDEXZIPZONES_TEXT_TITLE, 'methods' => $methods); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_FEDEXZIPZONES_INVALID_ZONE; return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FEDEXZIPZONES_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Enable Fedex Zipcode Zones Method', 'MODULE_SHIPPING_FEDEXZIPZONES_STATUS', '1', 'Do you want to offer fedex zip zone rate shipping?', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_FEDEXZIPZONES_HANDLING', '0', 'Handling Fee for this shipping method', '6', '0', now())"); tep_db_query("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_FEDEX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); for ($i = 1; $i <= $this->num_zones; $i++) { $default_countries = ''; if ($i == 1) { $default_countries = 'US,CA'; } # tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Fedex Zone " . $i ." Countries', 'MODULE_SHIPPING_FEDEXZIPZONES_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())"); # tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Fedex Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_FEDEXZIPZONES_COST_" . $i ."', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '6', '0', now())"); } } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } function keys() { $keys = array('MODULE_SHIPPING_FEDEXZIPZONES_STATUS', 'MODULE_SHIPPING_FEDEXZIPZONES_HANDLING','MODULE_SHIPPING_FEDEX_SORT_ORDER'); for ($i=1; $i<=$this->num_zones; $i++) { $keys[] = 'MODULE_SHIPPING_FEDEXZIPZONES_COUNTRIES_' . $i; $keys[] = 'MODULE_SHIPPING_FEDEXZIPZONES_COST_' . $i; } return $keys; } } ?> Hope this helps
  14. Well, I got some things working and changed, but I'm not a PHP programmer, so I don't know if what I did is correct, but I did get the rates to show up. I changed this line (approx line 113): foreach( $retArr as $aquote ); to: foreach( $retArr as $aquote){ by removing the semicolon, it allowed the foreach loop to actually loop through each item. I also changed (approx line 116): $title = $aquote['shiptype_id']; to: $title = $aquote['shiptype_name']; which allowed for the Name to showup on the checkout page, rather than the ID I made some additional changes to allow for corrected rounding (approx line 124) from: ' (' . $shipping_num_boxes . ' x ' . round($shipping_weight, 1) . ' ' . MODULE_SHIPPING_FEDEXZIPZONES_TEXT_UNITS .')' , to: ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_FEDEXZIPZONES_TEXT_UNITS .')' , Now, most of this works, my only problem comes when I have a shipping address other than US or CA, I get the following error: Warning: Invalid argument supplied for foreach() in /home/soma/WWW/catalog/includes/modules/shipping/fedexzipzones.php on line 110 I understand that this module does not support International shipping, but I have UPS and USPS modules installed that do, so it should just show the UPS and USPS options for International, and not even list FedEx. So, I do not know why I am getting the error, so if anyone knows why I get this error, that would be great. Since I am using other modules other than just the FedEx, I wanted the option to be able to sort the shipping methods, and this module did not support sorting, so I added the code to allow me to do the sorting, so if you're interested, I can also post those additons.
  15. Well, I got some things working and changed, but I'm not a PHP programmer, so I don't know if what I did is correct, but I did get the rates to show up. I changed this line (approx line 113): foreach( $retArr as $aquote ); to: foreach( $retArr as $aquote){ by removing the semicolon, it allowed the foreach loop to actually loop through each item. I also changed (approx line 116): $title = $aquote['shiptype_id']; to: $title = $aquote['shiptype_name']; which allowed for the Name to showup on the checkout page, rather than the ID I made some additional changes to allow for corrected rounding (approx line 124) from: ' (' . $shipping_num_boxes . ' x ' . round($shipping_weight, 1) . ' ' . MODULE_SHIPPING_FEDEXZIPZONES_TEXT_UNITS .')' , to: ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_FEDEXZIPZONES_TEXT_UNITS .')' , Now, most of this works, my only problem comes when I have a shipping address other than US or CA, I get the following error: Warning: Invalid argument supplied for foreach() in /home/soma/WWW/catalog/includes/modules/shipping/fedexzipzones.php on line 110 I understand that this module does not support International shipping, but I have UPS and USPS modules installed that do, so it should just show the UPS and USPS options for International, and not even list FedEx. So, I do not know why I am getting the error, so if anyone knows why I get this error, that would be great. Since I am using other modules other than just the FedEx, I wanted the option to be able to sort the shipping methods, and this module did not support sorting, so I added the code to allow me to do the sorting, so if you're interested, I can also post those additons.
×
×
  • Create New...