Supertex Posted September 4, 2017 Share Posted September 4, 2017 Problem was between the seat and the keyboard. function cheapest() { global $is_cont48, $shipping_weight... I never added the bold. Now it works. Just have to figure out what to use for the cart value. I thought maybe: (($is_cont48 != 1) && ($shipping_weight < 0.8125) && ($subtotal < 400.00)) but that's not worked so far. Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
♥kymation Posted September 4, 2017 Share Posted September 4, 2017 Try global $is_cont48, $shipping_weight, $subtotal Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Supertex Posted September 4, 2017 Share Posted September 4, 2017 Yep, tried that. I don't think $subtotal exists at this point, and I didn't want to chance screwing something up down the line that might use it so I added this to shopping_cart.php: $pkg_val = $cart->show_total(); tep_session_register ('pkg_val'); and then used $pkg_val in place of $subtotal in the shipping class. Now it works. Thanks Jim :) Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
ejsolutions Posted September 10, 2017 Share Posted September 10, 2017 A quick question: Rather than uninstalling/reinstalling and having to update settings again, why is it not possible to just update the database field? Example: UPDATE `configuration` SET `configuration_value` =' 0, 70, 0.00, 0, 70, 0.00, First-Class Package Service - RetailTM, 0, 70, 0.50, 0, 70, 0.00, 0, 70, 0.00, USPS Retail GroundTM, 0, 70, 0.50, Priority MailTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, Priority Mail ExpressTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, First-Class Package International ServiceTM, 0, 70, 1.50, Priority Mail InternationalRM, 0, 70, 1.50, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, Priority Mail Express InternationalTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00' WHERE `configuration`.`configuration_key` = `MODULE_SHIPPING_USPS_TYPES`; (I've split the line for readability) I tried but it didn't appear to work, unless some caching was going on. Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted September 10, 2017 Share Posted September 10, 2017 I've made the following revision: Quote You need to update line 522 with the following: Change from: \'First-Class MailRM Parcel\', Replace with: \'First-Class Package Service - RetailTM\', Uninstalled/reinstalled then added all the required information back in. Still no USPS shipping showing. I did notice in Admin that it is displayed as "1st-Class Package Service - Retail" (and all others) rather than "First-Class Package Service - RetailTM". Is this relevant? Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted September 11, 2017 Share Posted September 11, 2017 Panic over (for now, until USPS screw up their clientèle again!) I had done a blanket conversion to https (due to the enforced SSL fiasco!) and of course, USPS doesn't like that in the API - go figure. Until the next time... Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 13, 2017 Share Posted September 13, 2017 If anyone is interested, here's the latest USPS Release Notes. However, the real gem in this one was in the email from the USPS: Quote - The renaming of First-Class Mail Parcel to First-Class Package Service-Retail went into effect September 3 in our domestic price calculator API (RateV4). The name change was mistakenly communicated initially with a September 22 effective date. I was going to say something snarky about that, but I can't come up with anything that tops that quote, so I'll let it speak for itself. Regards Jim Chadduck and ejsolutions 2 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
ejsolutions Posted September 14, 2017 Share Posted September 14, 2017 Hmm. Par for the course. Quote Link to comment Share on other sites More sharing options...
Supertex Posted October 13, 2017 Share Posted October 13, 2017 Anyone happen to know where the test for whether the shipping module is enabled occurs, and if I can add a condition in that test that would disable the module if the subtotal is over a certain value? Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
♥raiwa Posted October 14, 2017 Share Posted October 14, 2017 (edited) @Supertex, within the class constructor: if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } // your check BEGIN if (your order subtotal condition) { $check_flag = false; } // your check END if ($check_flag == false) { $this->enabled = false; } } } Edited October 14, 2017 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Supertex Posted October 14, 2017 Share Posted October 14, 2017 (edited) I have $pkg_val as a session variable. Can I use that in the class constructor, or do I have to make that a global somehow? - and thank you for the reply. I love this community! Edited October 14, 2017 by Supertex Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
mmph Posted October 23, 2017 Share Posted October 23, 2017 Hi Folks, After some several attacks, my heavily modified oscommerce site was getting too much for me to maintain, I started over on oscmax which seems to be pretty darn close to oscommerce. I'm having some issues with USPS module which I believe are addressed in this thread. I have the latest installation of oscmax (2.5.4) and it appears my USPS is functional although I'm seeing "------" in place of the USPS service names. I uninstalled my USPS module and added this USPS Rate V4 module but I am not seeing any changes, all USPS services on admin and catalog side are still showing as "------" and do not post the weight. For example I have first class and priority mail enabled and I see this: Quote Shipping Quotes: United States Postal Service Service (------Approx. delivery time 1 Day):$3.00 United States Postal Service Service (------Approx. delivery time 1 Day):$6.65 United Parcel Service (1 x 0.11lbs) (3 Day Select):$15.70 United Parcel Service (1 x 0.11lbs) (Ground):$12.36Package Weight: 1 x 0.11 | Product Qty: 1 I went back in to usps.php and updated line 522 for "First-Class Package Service - RetailTM", and did an uninstall/reinstall of the module but still no changes. Any suggestions on this? Thanks! Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 23, 2017 Share Posted October 23, 2017 While oscMax started out as a fork of osCommerce, it has deviated quite a bit from that point. Since this module works in osCommerce, the most likely explanation is that something in the oscMax codebase is interfering. Sorry, but I'm not enough of an expert on that code to know where to look. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
mmph Posted October 23, 2017 Share Posted October 23, 2017 2 minutes ago, kymation said: While oscMax started out as a fork of osCommerce, it has deviated quite a bit from that point. Since this module works in osCommerce, the most likely explanation is that something in the oscMax codebase is interfering. Sorry, but I'm not enough of an expert on that code to know where to look. Regards Jim Hi Jim, I'm aware that other oscmax active developers are using this module, they've said the shipping module is 1-1 drop in with oscommerce. Is there a full and current list of the current USPS services? Looking at this module, it appears the list is: $services_list = " \'First-Class MailRM Stamped Letter\', \'First-Class MailRM Large Envelope\', \'First-Class Package Service - RetailTM', \'Media Mail Parcel\', \'Library Mail Parcel\', \'USPS Retail GroundTM\', \'Priority MailTM\', \'Priority MailTM Flat Rate Envelope\', \'Priority MailTM Legal Flat Rate Envelope\', \'Priority MailTM Padded Flat Rate Envelope\', \'Priority MailTM Small Flat Rate Box\', \'Priority MailTM Medium Flat Rate Box\', \'Priority MailTM Large Flat Rate Box\', \'Priority MailTM Regional Rate Box A\', \'Priority MailTM Regional Rate Box B\', \'Priority Mail ExpressTM\', \'Priority Mail ExpressTM Flat Rate Envelope\', \'Priority Mail ExpressTM Legal Flat Rate Envelope\', \'First-Class MailRM International Letter\', \'First-Class MailRM International Large Envelope\', \'First-Class Package International ServiceTM\', \'Priority Mail InternationalRM\', \'Priority Mail InternationalRM Flat Rate Envelope\', \'Priority Mail InternationalRM Small Flat Rate Box\', \'Priority Mail InternationalRM Medium Flat Rate Box\', \'Priority Mail InternationalRM Large Flat Rate Box\', \'Priority Mail Express InternationalTM\', \'Priority Mail Express InternationalTM Flat Rate Envelope\', \'USPS GXGTM Envelopes\', \'Global Express GuaranteedRM (GXG)\' "; Does this list look current? I've included the update at line 522 for First-Class Package Service - RetailTM Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 23, 2017 Share Posted October 23, 2017 Are you using this version of the module: https://apps.oscommerce.com/E3EVx&usps-methods-rates-v4-intl-rates-v2-01 If so, the only change needed would be the name change that you've already done. The rest of the services should work even without that change. I don't remember ever seeing dashes in place of the service names, which made me think it's some external problem. The list of services you posted seems to match the latest version that I have. I think the problem is elsewhere. Sorry I'm not being much help. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
mmph Posted October 23, 2017 Share Posted October 23, 2017 8 minutes ago, kymation said: Are you using this version of the module: https://apps.oscommerce.com/E3EVx&usps-methods-rates-v4-intl-rates-v2-01 If so, the only change needed would be the name change that you've already done. The rest of the services should work even without that change. I don't remember ever seeing dashes in place of the service names, which made me think it's some external problem. The list of services you posted seems to match the latest version that I have. I think the problem is elsewhere. Sorry I'm not being much help. Regards Jim All suggestions are appreciated, thanks Jim. Is the link you provided the same as USPS Rate V4 Intl Rate V2_r3.6? I am using this V2_r3.6. Quote Link to comment Share on other sites More sharing options...
mmph Posted October 23, 2017 Share Posted October 23, 2017 The issues are probably in my installation or database. In this USPS module package, there are some "files to modify" in two directories called 2.3.4 and 2.3.x.x. What are these directories referencing? The first of them appears to have a catalog side file and the other has an admin side file, this doesn't make sense to me. Is 2.3.4 an oscommerce release number and if so, what is 2.3.x.x? Also, everything in the "New_Files" directory of this downloaded package appears to be catalog side files, I make that assumption because the they are not packed in an "admin" directory and the instructions don't say otherwise. Are these meant for the catalog side? Also, why does the module have a readme.txt and an upgrade.txt which appear fairly similar yet have enough differences to confuse the heck out a person? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 23, 2017 Share Posted October 23, 2017 This module has a long history, so some parts of it may not make sense. Basically, the 2.3.x.x files match those found in osC 2.3.1, 2.3.2, etc, while the 2.3.4 files are specific to 2.3.4. Probably none of those match anything in oscMax so you're going to have to patch your files. I suggest the use of a good file comparison program. The Admin file change is needed to make the installer store the database entries correctly. It's used in several modules, so that change may already be in your package. Check to make certain. The catalog side changes were needed to make the module results display correctly in older versions of osC. Check that those patches match your code. This is more likely where your problem lies. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted December 7, 2017 Share Posted December 7, 2017 The USPS has just released the notes for their January update. Other than the usual price increases, they are changing some of the unusual classes, mostly adding more information in the response. I don't see anything that we need to be concerned about, but there could be something lurking in there that I missed. I don't see a link on their website for the January release notes, so I'll attach my copy. Regards Jim 00000261.Web_Tools_Release_Notes_-_January_2018_-_EXTERNALv1.1.pdf mattjt83 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted December 8, 2017 Share Posted December 8, 2017 @crimble crumble You're going to have to find out what the USPS server is returning before you can do anything about it. First, turn on "Send Debug Email" in the admin settings for the module. Then you need to wait until this error happens again. When it does, copy that email and compare it to a valid quote. Post here if you can't figure out the problem from that. I suspect that the USPS server is returning an error message that the module can't handle. We just need to know what it is so the module can be modified to detect it. Of course it could also be something entirely different that I haven't thought of. Regards Jim Smoky Barnable 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 8, 2017 Share Posted December 8, 2017 crimble crumble - I don't think this is related to the USPS module. I recently had this same problem with a site except it was showing a "z". That letter is the first letter of the shipping module. In my case it was Zones. The probably only happened with the paypal express module and only when it was clicked without logging in. I didn't troubleshoot it since my client decided to switch to the paypal standard module instead. So this isn't much help but might get you looking in the correct location. Maybe the option in express settings in admin to allow picking shipping options is causing the problem? Smoky Barnable 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Demitry Posted January 11, 2018 Share Posted January 11, 2018 hi, I just downloaded the latest version of this USPS addon and in the /includes/classes/http.php file every single function starts with a capital first letter - as in "Function" vs. "function" Does this make any difference? I googled it but cannot find anything on this matter. The reason I ask is because DreamWeaver does not recognize anything other than a lower case version as a function per its color coding. Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 11, 2018 Share Posted January 11, 2018 The word function is a php keyword and those are not case-sensitive. See here. But it is considered bad form to use upper-case for keywords. And there is a push to make them case-sensate, which will probably happen at some point. See here. Demitry 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Demitry Posted January 12, 2018 Share Posted January 12, 2018 Thank you Jack. Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
jmelson Posted January 25, 2018 Share Posted January 25, 2018 I am using the USPS Rate V4 Intl Rate V2 , updates as of $Mod: USPS API changes 20160119 a.forever $ in osCmax, and it seems to work. But, I need to add insurance to domestic Priority and International Priority. I have tried the N, S and H checkbuttons, but they have no effect. There are insurance checkbuttons for extra services, both domestic and international, but none specifically for Priority. Anyway, no matter what settings of the N, S H Insurance buttons are set, the USPS quote for domestic postage is always the same (too low). Am I doing anything wrong? Is there an option or update that will fix this? Thanks, Jon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.