Magento – Magento Shipping estimate doesn’t work

cartmagento-1.9shippingshipping-methodsshopping-cart

I have a problem with my shipping estimate, I can't trace the problem…

The thing is that when I choose any country from the list and click on Estimate and Update nothing happens…

  • Table rates are set.
  • Shipping methods are contry based, so if you choose any other country than Spain, only internation shipping should appear.

There are no errors, nothing, where should I search for indicators of the problem?

I've found this line in cartController.php:

    /**
 * Estimate update action
 *
 * @return null
 */
public function estimateUpdatePostAction()
{
    $code = (string) $this->getRequest()->getParam('estimate_method');
    if (!empty($code)) {
        $this->_getQuote()->getShippingAddress()->setShippingMethod($code)/*->collectTotals()*/->save();
    }
    $this->_goBack();
}

I don't know if the /* has to do anything with it… I didn't change anything there, so I assume it's by default like that?

If someone interested in seeing it in action, here's the link: Store Link

Thanks guys,

Best Answer

The method looks fine. I would strongly suspect you have a problem in the tablerate carrier with it not matching on a rule.

Switch on flat rates, and first see if this works. If it does then it is a problem with the tablerates.

I suggest you go back to a very simple tablerate, and check in the database after you upload that the data is there - this is table shipping_tablerate.

If you continue to have issues and you are in the tablerate carrier then its going to be because it cannot find a matching rule. You can use PHPStorm to debug this and inspect the sql being sent, but tbh if you get to that point you have to be pretty desperate, you should spot before then.

If its not showing flat rates either then I suggest you ensure that allowed destinations is set on the carriers, and then really you need to debug Shipping_Model_Shipping to see why its failing.

Related Topic