{"id":544,"date":"2009-11-04T01:23:16","date_gmt":"2009-11-03T17:23:16","guid":{"rendered":"http:\/\/blog.lolyco.com\/sean\/?p=544"},"modified":"2011-02-12T13:50:55","modified_gmt":"2011-02-12T05:50:55","slug":"oscommerce-malaysia-shipping-modules-all-updated","status":"publish","type":"post","link":"https:\/\/blog.lolyco.com\/sean\/2009\/11\/04\/oscommerce-malaysia-shipping-modules-all-updated\/","title":{"rendered":"osCommerce Malaysia shipping modules &#8211; all updated"},"content":{"rendered":"<p><span style=\"color: #ff0000;\">These old shipping modules no longer work since Pos Malaysia&#8217;s last website change in January 2011. I&#8217;ve replaced them all with a single shipping module that should give your customers a faster response, be more reliable and more flexible. See <a href=\"http:\/\/spider.my\/about\/shipping\/Shipping_modules.xhtml\">Shipping widget module page at spider.my<\/a> and the original (now slightly out of date) blog entry <a href=\"http:\/\/blog.lolyco.com\/sean\/2011\/01\/19\/spider-my-shipping-modules-v0-3-for-oscommerce-zen-cart-pos-malaysia\/\">Spider.my shipping modules for Pos Malaysia<\/a>.<\/span><\/p>\n<p><del datetime=\"2011-02-12T05:43:24+00:00\">The osCommerce Malaysian shipping modules (malaysiastate, poslaju, posmyair) have all been updated. The new versions are available from <a href=\"http:\/\/lolyco.com\/contributions\/\">http:\/\/lolyco.com\/contributions\/<\/a><\/del><\/p>\n<h2>Malaysiastate v0.03<\/h2>\n<p>Users of the <strong>malaysiastate<\/strong> shipping module (for local deliveries) will be pleased to see I&#8217;ve finally solved the &#8216;<em>failed to open stream: No such file or directory<\/em>&#8216; problem in malaysiastate. I had always thought I didn&#8217;t have this problem, but while looking at the error log while working on the other two modules, I saw the error! Actually, it&#8217;s only a warning on my server, so that&#8217;s why I didn&#8217;t see it before.<\/p>\n<p>The malaysiastate error is caused by osCommerce seeing the &#8220;.inc.php&#8221; file which contains the shipping prices and interpreting it as a shipping module, so it tries to find a language file for it. There&#8217;s no language file (unless you told me about the problem and\u00a0 I recommended you create an empty one to make the error go away!), hence the error. The new version is exactly the same as the previous version, but the shipping prices file is now just &#8220;.inc&#8221; on the end (minus the .php).<\/p>\n<p>If you want to update your previously installed version to v0.03, all you have to do is:<\/p>\n<ol>\n<li> rename your existing malaysiastate.example.inc.php and malaysiastate.inc.php files to remove the &#8216;.php&#8217; from the end of the filename.<\/li>\n<li>copy the v0.03 shipping module into your includes\/modules\/shipping\/ directory. No need to &#8216;remove\/install&#8217;, unless you absolutely don&#8217;t want a visitor to see a &#8216;cannot quote&#8217; message while you&#8217;re half way through updating.<\/li>\n<\/ol>\n<h2>Poslaju <span style=\"text-decoration: line-through;\">v0.10<\/span> v0.11* and Posmyair v0.11<\/h2>\n<p>Howard Sim from <a href=\"http:\/\/www.cigs-mart.com\/\">www.cigs-mart.com<\/a> reported that his GoDaddy hosting didn&#8217;t support the page-fetching methods I&#8217;d used previously in the shipping modules. He sent me a recommendation he&#8217;d found to use the cURL libraries. I use cURL all the time from the command line, but for some reason didn&#8217;t think of it when I originally wrote the shipping modules. I&#8217;ve added cURL support to these two modules as an editable option on the shipping module admin page.<\/p>\n<p>To upgrade your existing versions of posmyair and poslaju, you&#8217;ll have to:<\/p>\n<ol>\n<li>make a note of your existing module settings<\/li>\n<li>remove the modules using your admin panel (because the editable module options have changed)<\/li>\n<li>copy the posmyair.php or poslaju.php file into your includes\/modules\/shipping\/<\/li>\n<li>install and edit the module settings. Choose cURL or PHPv5 if you can (see below), or PHPv4 if you absolutely have to.<\/li>\n<\/ol>\n<h2>User-Agent change<\/h2>\n<p>I&#8217;ve changed the User-Agent that&#8217;s reported to Pos Malaysia&#8217;s webserver by posmyair and poslaju. Unless you use the PHPv4 setting, the shipping modules send two (extra) items of data to Pos Malaysia&#8217;s webserver. One is the URL of your website as &#8220;<strong>Referer<\/strong>&#8221; &#8211; something like &#8220;http:\/\/fantasticmalaysianeshoppe.com\/&#8221;. The other is the &#8220;<strong>User-Agent<\/strong>&#8220;. I&#8217;ve added my email address at lolyco.com to the end of the User-Agent string, so it now looks like:<\/p>\n<p><em>&#8220;osCommerce posmyair Shipping Module (sean(a)lolyco.com)&#8221;<\/em><\/p>\n<p>or<\/p>\n<p><em>&#8220;osCommerce poslaju Shipping Module (sean(a)lolyco.com)&#8221;<\/em><\/p>\n<p>Previously, it was the same but without my email address. You&#8217;ll never see the User-Agent string, only Pos Malaysia&#8217;s web admin will see it. I&#8217;ve added my email (instead of yours) in case the admin gets upset about the way the shipping module fetches the data from his server. Rather than she sends an angry email to you, and you not know <a title=\"Whiskey!\" href=\"http:\/\/wossis.com\/flashcard\/35e64\/phonetic-alphabet\/35eb3.html\">Whiskey<\/a> <a title=\"Tango!\" href=\"http:\/\/wossis.com\/flashcard\/35e64\/phonetic-alphabet\/35eb0.html\">Tango<\/a> <a title=\"Foxtrot!\" href=\"http:\/\/wossis.com\/flashcard\/35e64\/phonetic-alphabet\/35ea2.html\">Foxtrot<\/a> she is talking about, she can send it to me instead.<\/p>\n<p>I would be prepared to make the email address overridable, so that you can send your shop admin email address, just in case you want to receive the angry emails instead of me. Let me know your opinion on that one.<\/p>\n<p><span style=\"color: #ff0000;\">* Howard Sim pointed out a careless copy-and-paste in poslaju, so one more version!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These old shipping modules no longer work since Pos Malaysia&#8217;s last website change in January 2011. I&#8217;ve replaced them all with a single shipping module that should give your customers a faster response, be more reliable and more flexible. See Shipping widget module page at spider.my and the original (now slightly out of date) blog [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,3],"tags":[21,29,109,4,19,9,8,105,57],"class_list":["post-544","post","type-post","status-publish","format-standard","hentry","category-foss","category-software","tag-e-commerce","tag-email","tag-fixed","tag-lolycocom","tag-malaysia","tag-open-source","tag-oscommerce","tag-software","tag-web"],"_links":{"self":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts\/544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/comments?post=544"}],"version-history":[{"count":11,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":547,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts\/544\/revisions\/547"}],"wp:attachment":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/categories?post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/tags?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}