Knowledgebase

Making Dropship work with GoogleCheckout

Top :: Dropship :
Top :: Magento :

Configuration:
  1. Go to Admin > System > Configuration > Google API > Shipping - Merchant Calculated
  2. Enable Merchant Calculated rates
  3. Add all Dropship Shipping Methods
There are few bugs in Magento 1.3.2.3 that prevent Dropship from working with GoogleCheckout. Here are the changes that need to be done to make it work correctly:
  1. Edit app/code/core/Mage/Shipping/Model/Shipping.php
    1. Around line 175:
      // ADD:
      $request->setAllItems($address->getAllItems());
      // RIGHT BEFORE:
      return $this->collectRates($request);
      
  2. Edit app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php
    1. Around line 141:
      // ADD:
      $limitCarrier = array_unique($limitCarrier);
      // RIGHT BEFORE:
      foreach($googleAddresses as $googleAddress) {
      
    2. Around line 163:
      // COMMENT OUT:
      #$address->setCollectShippingRates(true)->collectShippingRates();
      
    3. Around line 245:
      // RIGHT AFTER:
          $result->SetShippingDetails($methodName, $rates[$methodName], "true");
          $merchantCalculations->AddResult($result);
      }
      // ADD: 
      else {
          $result->SetShippingDetails($methodName, 0, "false");
          $merchantCalculations->AddResult($result);
      }
      
Even if all is configured and coded correctly, you still might experience issues with GoogleCheckout, because of hardcoded 3 second timeout for merchant calculation API callback, if your vendors are using external API to calculate rates, such as UPS, USPS, FedEx.