greasemonkey Posted May 11, 2017 Share Posted May 11, 2017 @@Druid6900 I have replied to your post on the CP developers forum... I can't figure it out - but have supplied the XML request and response It is easy to create BTW.... in canadapost.php just "un" comment // print_r($aryProducts); And //echo $xmlRequest; Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 12, 2017 Share Posted May 12, 2017 Yup, easy for YOU, but, how are you at aligning 30 year old floppy drives LOL. Thanks for covering that, GM. Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
Druid6900 Posted May 13, 2017 Share Posted May 13, 2017 GM, Have you been following this on the Developer's forum? Strange stuff going on. Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 13, 2017 Share Posted May 13, 2017 No... I'll look this aft. Quote Link to comment Share on other sites More sharing options...
greasemonkey Posted May 13, 2017 Share Posted May 13, 2017 @@Druid6900 looks like this is all solved. For everyone else - Small Packet Air and Tracked Package to the USA require the Insurance option in the admin to be set to false. Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 13, 2017 Share Posted May 13, 2017 (edited) Not all solved. If you pick an item (with your handling set to 0%) and get the services and rates, then take those same height. length, width and weight parameters and plug them into Canada Post's Find a Rate (even without logging into your account), you will find that the rates you are getting on your site are higher (in the case of small packet USA air up to 95% higher). For instance, I'm selling a product that (packaged) is 23 x 16 x 4 cm and weights 0.150 KGs. Shipping price on my site (no handling charges) = $16.82 to California by Small Packet USA - Air. Counter price on CP for same dimensions and weight to same destination via same service = $8.61........However, if you plug those same prices into EST the shipping cost is $8.61 The other prices are higher too, to varying degrees. I could see if they were all the same percentage higher, but, it seems at first glance, that the more expensive the service, the closer it is to the price that anyone walking into a Canada Post office would get. There is either something wrong at Canada Post since they are sending us higher shipping price options or something wrong with the shipping module. Either way, higher prices, especially if they are wrong, translate into lost sales. Perhaps GreaseMonkey and I are the only ones in the country using the Canada Post module. Edited May 13, 2017 by Druid6900 Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
Druid6900 Posted May 13, 2017 Share Posted May 13, 2017 Sorry, that should be "However, if you plug those same prices into EST the shipping cost is $8.61 MINUS your discount". Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 14, 2017 Share Posted May 14, 2017 @@Druid6900 can you PM me the zip in California you are working with? I'll do some checking.. Also what province are you in? Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 14, 2017 Share Posted May 14, 2017 Yes, I sure can, GM, but, I found that, with SP.USA.A, the cost for shipping anywhere in the continental US is the same, so, you can just pick any state, any Zip and (on CP rates and EST) it's $8.61 counter and 8.49 account. I'm shipping from SW Ontario. Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 16, 2017 Share Posted May 16, 2017 @@Druid6900 I did some checking this morning... and replied to your post at the CP developers forum. I found some slight differences in the quotes (but very minor). We should probably keep this convo there (at CP).... until such time we can confirm any issue you are having is with the module (at not CP). I will watch for their reply's. Keep in mind... CP will require both the request and the reply to help. You need to un-comment both pieces of code (as suggested above) and then... the best way to see the request and reply is from "view source" in your browser. If you have a specific quote that you can replicate where there is a huge difference as suggested above... Give them both the request and reply. So far in my testing all seems ok... Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 16, 2017 Share Posted May 16, 2017 Agreed. Now, there are two instances of the first term to in-comment, do I do them both? I should have thought of the "view source" thing myself. If your stuff seems OK, that would mean that there was a problem with my site. Thanks for your help with this.... Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 16, 2017 Share Posted May 16, 2017 @@Druid6900 ok it looks like we have the issue (not the solution however). Your request is not sending dimensions - I presume you have made some changes to your site for dimensional support? The original author of this module did build this feature in... but did not include instructions on how to use it.... and it is not something i have ever used or are familiar with. From the code in the module: if (($this->dimensions_support>0) && ($width>0) && ($height>0) && ($length>0)) { $xmlRequest .= "<dimensions><length>$length</length> <width>$width</width> <height>$height</height> </dimensions>"; Basically says... if dimensional support is "there (greater than 0)" then add the the dimensions.... So... you need to find out why that is not working.... If I recall the original author used the code from this module http://addons.oscommerce.com/info/7848 And there are instructions on how to install dimensional support. Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 16, 2017 Share Posted May 16, 2017 OK, here is the problem, I have to install this code; ALTER TABLE productsADD products_length DECIMAL(6,2) DEFAULT '12' NOT NULL,ADD products_width DECIMAL(6,2) DEFAULT '12' NOT NULL,ADD products_height DECIMAL(6,2) DEFAULT '12' NOT NULL,ADD products_ready_to_ship INT(1) DEFAULT '0' NOT NULL; But, how do I do it without changing all the dimensions that are already in there? Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 16, 2017 Share Posted May 16, 2017 @@Druid6900 Again, I'm not that familiar with this addon - you may want to find the support thread for the UPS XML - there are probably more people with dimensional support install questions there... That said, if you have dimensions in your database already.... then you shouldn't have too. So the questions becomes... where did the tables with dimensions that you have come from? If you have installed another addon that adds dimensions to your database then the code would probably be pointing to the wrong table. Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 16, 2017 Share Posted May 16, 2017 I understand that and I will try that. However, to answer your question, they are from the original CP with dimensions package and just came along with the database update from 2.2 to 2.3.4. No, this whole shipping thing used to work just fine in the past, after the upgrade to 2.3.4 If I run this script, it will change the length width and height of everything to 12, so, it's using the same tables. What I want to know is how to run the script without it changing everything to the default of 12 and just leave the table with the values that exist. Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 16, 2017 Share Posted May 16, 2017 @@Druid6900 if the tables are the exact same name..., yes they may be overwritten. Let me look a little closer... I'll get back soon. Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 16, 2017 Share Posted May 16, 2017 Not may, DO. Then I have to plug in all the product tables from the SQL save I did just before I ran those scripts which, of course, kills that UPS XML script above. I ran just the first line and the last line of the above script and it changed all the values to 1 (I change the last line value from 0 to 1 because all my stuff is Ready To Ship). Ok, I'll be waiting patiently..... Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 16, 2017 Share Posted May 16, 2017 Ok @@Druid6900 have you follow the instructions in the included file install_dimensional_support.txt? Including the DB changes to your configuration table? The instructions are very detailed.... Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 16, 2017 Share Posted May 16, 2017 Yes, I did, and even went over them again, each line, each module, just to be sure, except for re-installing that script above because I don't want to have to redo the dimensions of 600 items.... I have event re-installed the whole package to the point of using the supplied admin categories file with the same exception and it's still the same... Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
Druid6900 Posted May 19, 2017 Share Posted May 19, 2017 OK, just to update this topic; I went through my database (which was upgraded through all the versions from 2.2MS to 2.3.4 BS responsive because I didn't want to lose the hundreds of items I had already put the dimensions in for the original CP with dimensions package using a program that is designed to upgrade your DB) and pulled out all the artifacts that were placed there by the Canada Post with Dimensions package and the SellOnLine package after that. I just wanted to make sure that there was nothing in the database but the Canada Post Services (REST) tables, which I checked against version 1 and 1.2. Then I reverse the instructions and took al that out, putting back whatever was replaced in the initial installations. First I put in all the changes from the 1.2 version (which had a single change from the version 1) that put the basic package in there. Then I started with the dimensional aspect/packaging portion of the program installing the modified UPSXML SQL except for the part that would have defaulted all my dimensions to 12 x 12 x 12. The very fact that it does this shows that the table names are the same, so, the tables I had with the dimensions in it, obviously, is correct. Here's what happened; I still get the wrong prices. However, printing the XML request shows that, while it picks up the length and height correctly for a package, the weight and width still show a value of 1. This is how it works when in the Ready To Ship mode since all the sizes for all my products have been calculated boxed and all products are set as Ready to Ship. If I pick the dimensional mode, it errors out telling me that I don't have any boxes selected and doesn't provide prices. The reason I get that error is that the packaging thing turned out to be a dog's breakfast with giant text all over the screen in the admin section, won't let me create or edit a box that it will save as anything useful. I don't care about that because all my stuff is Ready to Ship, so I won't be using the Full Dimensional mode, but, it was in the package, so, I made the changes. Twice. Same results. Now, does anyone have this contribution working right, even if it's just for the Ready to Ship mode and did you have to make any corrections or changes to the code to get it to work? This isn't the first contribution that I've hand-coded into my site, not by a long shot, but, no matter how many times I go over the code changes, it continues to not work correctly for me. Prices for low shipping price items are too high and prices for the high shipping cost items are too low. Basically because I am only getting 2 of the 4 values that I need going out in the XML request. Any ideas, anyone? Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 21, 2017 Share Posted May 21, 2017 @druid6900 ok... i think I have found the issue with the weight - on US it is rounding values less than 1kg to 1 here: // Add box or item to shipment list. Round weights to 1 decimal places. if ((float)$weight < 1.0) { $weight = 1; } else { $weight = round($weight, 3); } // Add box or item to shipment list. Round weights to 1 decimal places. if ((float)$weight < 1.0) { $weight = 1; } else { $weight = round($weight, 3); } From the added comment it seems the author was intending to round the weight figure - which I don't believe is necessary (unless you are entering weights with multiple decimals places.... Try deleting the above lines and retest (works for me). Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 24, 2017 Share Posted May 24, 2017 GM, sorry, I wasn't notified of this addition to the thread and just was checking in today. OK, I'll delete that statement if you tell me what module it's in..... Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
Druid6900 Posted May 24, 2017 Share Posted May 24, 2017 OK, I figured out that you meant /catalog/includes/modules/shipping/canadapost.php I deleted the section and it made no different; here's what I still get <?xml version="1.0" encoding="UTF-8"?> <mailing-scenario xmlns="http://www.canadapost.ca/ws/ship/rate"> <customer-number>0000000</customer-number> <quote-type>commercial</quote-type><expected-mailing-date>2017-05-27</expected-mailing-date> <parcel-characteristics> <weight>1</weight><dimensions><length>23</length> <width>1</width> <height>4</height> </dimensions></parcel-characteristics> <origin-postal-code>L8R1X2</origin-postal-code> <destination><united-states> <zip-code>95212</zip-code> </united-states> </destination> </mailing-scenario>Array ( [0] => Array ( [service-name] => Expedited Parcel USA [base] => 23.2 [service-code] => USA.EP [expected-delivery-date] => 2017-06-02 ) [1] => Array ( [service-name] => Priority Worldwide pak USA [base] => 72.8 [service-code] => USA.PW.PAK [expected-delivery-date] => ) [2] => Array ( [service-name] => Small Packet USA Air [base] => 16.82 [service-code] => USA.SP.AIR [expected-delivery-date] => ) [3] => Array ( [service-name] => Tracked Packet - USA [base] => 20.09 [service-code] => USA.TP [expected-delivery-date] => 2017-06-06 ) [4] => Array ( [service-name] => Xpresspost USA [base] => 35.74 [service-code] => USA.XP [expected-delivery-date] => 2017-06-02 ) ) Quote No Good Deed EVER Goes Unpunished Link to comment Share on other sites More sharing options...
greasemonkey Posted May 24, 2017 Share Posted May 24, 2017 @Druid6900 Can you PM me your /includes/modules/shipping/canadapost.php file.... Quote Link to comment Share on other sites More sharing options...
Druid6900 Posted May 24, 2017 Share Posted May 24, 2017 It would be my pleasure.... Quote No Good Deed EVER Goes Unpunished 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.