Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

  • Days Won


a.forever last won the day on January 3 2016

a.forever had the most liked content!


About a.forever

  • Birthday 06/14/1988

Profile Information

  • Real Name
  • Gender

Recent Profile Visitors

18,255 profile views
  1. So upon further review of the USPS API it appears that they restricted pulling rates to only 13 ounces. So even though you can go to the post office and ship a 1 pound item, you can't use their online postage calculator to estimate postage costs for anything over 13 ounces. My only solution to this was to utilize and modify the Table shipping method that's already within osC. Props for still being alive. This module is still pretty great. Thanks for all your hard work many years ago!
  2. I would make any necessary line-by-line changes on the usps.php file that applies to you, since fortunately this is not a major upgrade. You don't even need to make updates for the Retail Ground services if you don't use them. The new 16/16 weight limit is probably required if you use Online, not Retail, rates since you can finally ship parcels under a pound. If what you have works for you, I wouldn't do anything ultra crazy and risk it breaking afterwards. Perhaps the next USPS change will prove more complicated.
  3. Updated the module. Only the includes/modules/shipping/usps.php file needs to be updated if you had the latest version prior to this new one. It looks like the new First-Class weight limit isn't in full effect anywhere. When USPS realizes this oversight and changes it, this module update will allow the new weight limits. One very important note is that the new defaulted pricing is Retail, not Online. This is because Commercial Base is being phased out, which means if you don't have a third-party postage provider account then you won't be getting discounted postage anyways. One less reason to use USPS' own Click-N-Ship now.
  4. a.forever

    Shipping Insurance - 2.3?

    I had a magical thought on this just now since I was testing the USPS API changes for the month. Did any of you change the Module -> Order Total -> Sort Order to 1) Subtotal, 2) Shipping, 3) Insurance, 4) Tax?
  5. It'll be replacing code and it's not just that one line. Two lines need to change, and you'll need to uninstall and reinstall the module for it to accept those changes (because the changes affect how the shipping module installs the new USPS Retail Ground). Will likely post an updated module on Sunday evening for this since I already have it working in testing, although I still think people should just use Priority Mail. But if you want to change it sooner (although the change won't be visible until January 17, 2016), for this particular module, all two instances of Standard PostRM should be replaced with USPS Retail GroundTM For the most part the USPS API changes won't affect most users, with the exception of First-Class Mail Parcel for shipments within the USA. The test server hasn't updated the new 16 ounce limit. And the current module is coded to only 13 ounces. That is a very simple 1-line change where in includes/modules/shipping/usps.php you find 13/16 and change it to 16/16
  6. a.forever

    Shipping Insurance - 2.3?

    Hmm. I can't seem to replicate the error using the settings provided. Here's a thought: if you changed Customer Chooses? Does the customer have a choice to elect insurance? from True to False and force insurance on an international order, does it still calculate incorrectly? Or perhaps everything is tallying correctly at customer checkout and something else is modifying the amount once the customer goes from your site to PayPal (I'm assuming a PayPal payment). If a PayPal payment is used, perhaps a review of the IPN History would be ideal for that transaction. The Message ID that PayPal keeps should identify all variables PayPal used to calculate the total payment.
  7. a.forever

    Shipping Insurance - 2.3?

    Sure; I can try to replicate the error using the info you give me.
  8. a.forever

    Shipping Insurance - 2.3?

    The domestic and international sections are pretty much copy/paste in the coding. Do you have an example for me that I could try and replicate? I can't seem to duplicate this error and can only assume either a tax error, zone error, or rounding error to be the cause for the overcharge.
  9. I thought about testing/fixing the Extra Services portion of this module, but been too busy. I've never tested it and assume it's just broken. Perhaps this summer and definitely not this month. The workaround seems to be okay and I too have recently restructured the sort order on my own store. Will look into it someday... Just wanted to point out that if your Configuration > Shipping/Packaging > Max Package Weight is set AND your customer's shopping cart exceeds that weight, this module will [ (shopping cart weight / max package weight) * shipping cost for one package] to calculate postage costs. Max Package Weight essentially assumes each box you plan to ship will not exceed that weight. I've memorized most of them, since USPS sneakily prints those weight limits on most of their Flat Rate/Regional Rate boxes. But low and behold USPS has intentions to change domestic First-Class (including its CLASSID for parcels) and almost all Extra Service <ServiceID> around May 31, 2015.
  10. It shouldn't put Express on top. Are you sure $sort_id is first in the array_multisort() and not $sort_cost? And I don't think this particular module even cares about address. It just pulls postal code and weights.
  11. I'm assuming that First-Class International Package, Priority Mail International, and Priority Mail Express International are the only three service methods available. If so, then your personal fix to the usps.php code should be something like: FIND: array_multisort($sort_cost, (MODULE_SHIPPING_USPS_RATE_SORTER == 'Ascending' ? SORT_ASC : SORT_DESC), $sort_id, SORT_ASC, $methods); REPLACE WITH: array_multisort($sort_id, (MODULE_SHIPPING_USPS_RATE_SORTER == 'Descending' ? SORT_ASC : SORT_DESC), $sort_id, SORT_ASC, $methods); That should put Priority Mail International on top, Priority Mail Express International in the middle, and First-Class Package International Service at the bottom. Does this trick work for you?
  12. I feel game to figure this out, even though I don't check these boards as often as I once did. I assume you cloned this contribution: http://addons.oscommerce.com/info/164 I have an older version of that installed and did clone it a long time ago. There appears to be 5 instances of "spu" (including the $Id on line 3) and 21 instances of "_SPU_" that need to be changed. Personally I wouldn't use additional special characters or common words in the renaming process, so I'd opt for something like "frcoll" and "_FRCOLL_" and "frcoll.php" instead. Additionally this module has some kind of zone check, so ensure your cloned module settings and the shipping zone for your purchase allows the module to even activate properly. And if that doesn't work, you can compare to my cloned version of spu.php to vaspu.php (this is version 1.4 and I had commented out some of the zone checks to suit my store's needs): <?php /* $Id: vaspu.php,v 1.4 2002/11/10 14:29:56 mattice Exp $ CONTRIB is Store Pickup Shipping Module (http://www.oscommerce.com/community/contributions,164'>http://www.oscommerce.com/community/contributions,164) Based upon flat.php / vaspu.php by M. Halvorsen (http://www.arachnia-web.com) Made to work with latest check-out procedure by Matthijs (Mattice) >> e-mail: mattice@xs4all.nl >> site: http://www.matthijs.org TO TRANSLATE IN GERMAN !! osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License CHANGES: - formatted to work with latest checkout procedure - removed icon references - updated the db queries */ class vaspu { var $code, $title, $description, $icon, $enabled; // class constructor function vaspu() { global $order; $this->code = 'vaspu'; $this->title = MODULE_SHIPPING_VASPU_TEXT_TITLE; $this->description = MODULE_SHIPPING_VASPU_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_VASPU_SORT_ORDER; $this->icon = ''; $this->enabled = ((MODULE_SHIPPING_VASPU_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_VASPU_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id, zone_country_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_VASPU_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']) { } elseif ($check['zone_country_id'] == $order->delivery['country']['id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function quote($method = '') { global $order,$customer_id; $codep_query = tep_db_query("select c.configuration_value, ab.entry_postcode from " . TABLE_CONFIGURATION . " c, " . TABLE_ADDRESS_BOOK . " ab where c.configuration_key = 'MODULE_SHIPPING_VASPU_ZIP' and ab.customers_id = '" . (int)$customer_id . "'"); $codep = tep_db_fetch_array($codep_query); $dept_allow = split("[, ]", $codep['configuration_value']); $cust_cp = substr($codep['entry_postcode'], 0, 2); if((in_array($cust_cp, $dept_allow))||($codep['configuration_value'] == '')){ $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_VASPU_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_VASPU_TEXT_WAY, 'cost' => MODULE_SHIPPING_VASPU_COST))); return $this->quotes; }else{ return; } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_VASPU_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, set_function, date_added) values ('Enable Store Pick Up', 'MODULE_SHIPPING_VASPU_STATUS', 'True', 'Do you want to offer Store Pickup?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Store Pickup Cost', 'MODULE_SHIPPING_VASPU_COST', '0.00', 'What is the pickup cost? (The Handling fee will NOT be added.)', '6', '0', now())"); tep_db_query("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_VASPU_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Store Pick Up Zip Code Allowed', 'MODULE_SHIPPING_VASPU_ZIP', '01, 07, 26, 38, 42, 69, 74', 'Departement autorisé pour le retrait magasin ?', '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', 'MODULE_SHIPPING_VASPU_SORT_ORDER', '0', 'Sort order of display.', '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() { return array('MODULE_SHIPPING_VASPU_STATUS', 'MODULE_SHIPPING_VASPU_COST', 'MODULE_SHIPPING_VASPU_SORT_ORDER', 'MODULE_SHIPPING_VASPU_ZONE', 'MODULE_SHIPPING_VASPU_ZIP'); } } ?>
  13. Yeah, my bad. I wasn't thinking when I did this 18 months ago as I was still working under osC 2.2 RC2a. It works fine with osC 2.3.4, and I suppose we should mention that more often each time we push a new update. Perhaps in a readme.txt, new update description, etc.
  14. a.forever

    USPS Methods and South Korea

    This might be a country issue. USPS has South Korea listed as: South Korea (Korea, Republic of) Is it listed like that in your osCommerce?
  15. So that error I reported went away. +1. Here are some new problems: Media Mail and Library Mail no longer function. I'm assuming it's the change to Flat. So, I just reverted back to the Parcel coding back in your #3 version. I also figured out why Small FRB wasn't showing up for international. The dimensions are causing this. Length, Width, and Height should probably be hard-coded to 0.2 for now. Doing so makes the service appear! Finally, this is a cosmetic issue I found on Chrome. It's been bugging me, but I never bothered to push a fix. I personally think that 5px matters. Around line 739, FIND: <div style="width:50px;float:right;text-align:center;">Handling</div> CHANGE TO: <div style="width:55px;float:right;text-align:center;">Handling</div> Around line 749, FIND: $string .= '<div style="float:left;">' . preg_replace(array ( CHANGE TO: $string .= '<div style="float:left;padding:5px;">' . preg_replace(array ( Around line 780, FIND: $string .= '<div style="width:50px;float:right;text-align:center;">$ CHANGE TO: $string .= '<div style="width:55px;float:right;text-align:center;">$ EDIT: I think I've attached my file to this post. Plus, some pictures of the working attached file. usps.php