Debug Realtime Shipping Methods?

I've spent some time trying to find some (any) logs for our realtime shipping methods, but even though everyone says they should “just be there”, they are not.



We're getting results returned in the cart from shipping rate servers that vary greatly from their quoted rates, much to the displeasure of our vendors (this is on a multivendor 4.0x site).



Need to see what values we're passing to the servers that are returning such incorrect quotes - but impossible (for me at least) without logs.



Ready to pay someone for help wit this…anyone got a few minutes?

Go to Administration/Logs

Click the settings tab

Enable logging for Requests

All options for logging are checked and always have been.



And your logs do not show any Requests to your shipping provider(s)?

You should see the POSTed content (usually XML) of the data sent and received.



All Requests should have log entries (assuming your shipping code uses the Http class).

Do you use non-default shipping processor?

Our vendors are running UPS, FedEx and Canada Post realtime methods.



While we see typical request/response in the log from Paypal, we see nothing from any of these shipping services.



We're using the stock shipping modules that shipped with our original install - how can we confirm that they're using the http class?





cheers

[quote name='screenimages' timestamp='1409065691' post='190692']

Our vendors are running UPS, FedEx and Canada Post realtime methods.



While we see typical request/response in the log from Paypal, we see nothing from any of these shipping services.



We're using the stock shipping modules that shipped with our original install - how can we confirm that they're using the http class?





cheers

[/quote]



All default shipping processors use http class and you should see requests in the logs

I know, I should. Everyone keeps telling me.



I've made rate requests/tests on checkout, and scrolled through pages of logs and there's nothing showing. Paypal, Google Analytics, logins and session, some errors all show - but not the courier's servers.



This is why I've come looking for assistance. I've got cash money for someone willing to take a look…





cheers

Can only assume then that you are not ending up with real time quotes. You must have some other configuration problem. In mve, does each Vendor need to have separate shipping setups? you might be defaulting to a common method which could also explain the variation.

[quote]In mve, does each Vendor need to have separate shipping setups?[/quote]



Yes, they're are a great variety of shipping needs - while many users use the “manual” methods - many have existing courier accounts they want to maintain, and others have negotiated rates they want to keep. We don't want to dictate how they have to ship.




[quote][color=#282828][font=arial, verdana, tahoma, sans-serif]you might be defaulting to a common method which could also explain the variation.[/font][/color][/quote]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Not sure I understand what you mean here…[/font][/color]

[quote]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Not sure I understand what you mean here…[/font][/color]

[/quote]



I'm just saying that based on your information, I don't believe you're actually getting a realtime quote. So my guess is that it is defaulting to a non-realtime method to give the shipping rate. Hence I believe the issue is in configuration, not logging.

I know that I may sound like a rank amateur, but I don't think that's the case.



We're seeing variable dollar value rates in testing mode when we change product weights and get specific errors back if we try to use a service not available in our region or have authentication problems.

Only thing I would suggest is for you to instrument up the fn_update_shipping_rates() function and see if/when realtime rates are called. You can look in the customer's SESSION to see the saved rates.



Probably easiest to just disable all other methods and work with one. Assuming you have a test site so you wouldn't affect customers/vendors.

What's the fastest way to disable all the methods? We probably have 500+ on a single page…

500+ shipping methods? That sounds a bit odd.



To disable all, just use the 'check all' checkbox on the admin panel shipping methods manage page.

[quote]500+ shipping methods? That sounds a bit odd.[/quote]



[color=#282828][font=arial, verdana, tahoma, sans-serif]We have 400+ vendors, and they each have a variety of shipping methods assigned to their products - some manual, some realtime.[/font][/color]


[quote]To disable all, just use the 'check all' checkbox on the admin panel shipping methods manage page.[/quote]



Yes, you can select all, but their are no menu functions to then simultaneously “disable” them (the “gear” dropdown only offers a “delete” option).

UPDATE cs_cart_shippings SET status='D' WHERE status='A';



It would really help in these forums to state the version and edition of the product you are referencing in the OP. I do notice that you mentioned vendors in a subsequent post. Also helps if you mention admin panel since I had assumed you were talking about the customer view in checkout for the 500+ shipping methods being listed.

[quote name=‘tbirnseth’ timestamp=‘1410028023’ post=‘191601’]

UPDATE cs_cart_shippings SET status='D' WHERE status='A';
```<br />
<br />
It would really help in these forums to state the version and edition of the product you are referencing in the OP.  I do notice that you mentioned vendors in a subsequent post.[/quote]<br />
<br />
I believe I mentioned the version (4.0x) in the first post of this thread.<br />
<br />
[quote]  Also helps if you mention admin panel since I had assumed you were talking  about the customer view in checkout for the 500+ shipping methods being listed.<br />
[/quote]<br />
<br />
Upthread you had recommended I "instrument up" a template and suggested it was "[color=#282828][font=arial, verdana, tahoma, sans-serif]Probably easiest to just disable all other methods and work with one." [/font][/color]so I guess I assumed you were talking about admin level operations. My apologies!<br />
<br />
Thanks for the query! I had kinda hoped I wouldn't have to go into the db…oh well! <img src="upload://b6iczyK1ETUUqRUc4PAkX83GF2O.gif" class="bbc_emoticon" alt=":-)">

the more info you can give in one chunk in the OP about the environment, the easier it is to help. I may back up a couple of posts to get context, but rarely re-read the whole thing. Just not enough time to do that for each thread I follow.

easy to fix

edit /app/Tygh/Shippings/Services/Can.php



public function processResponse($response)

{

$return = array(

'cost' => false,

'error' => false,

);

file_put_contents("/var/log/epost.log",$response,FILE_APPEND);



$rates = $this->_getRates($response);

if (!empty($rates['cost'][$this->_shipping_info['service_code']])) {

$return['cost'] = $rates['cost'][$this->_shipping_info['service_code']];

} else {

$return['error'] = !empty($rates['error']) ? $rates['error'] : __('service_not_available');

}

return $return;

}



and at the end





$destination_postal





XML;


file_put_contents("/var/log/epost.log",$request."\n",FILE_APPEND);

$request_data = array(

'method' => 'post',

'url' => 'http://sellonline.canadapost.ca:30000',

'data' => $request,

);



return $request_data;

}