Skip to main content
3 of 3
edited tags
7ochem
  • 7.6k
  • 14
  • 52
  • 80

Payment methods "Wrong content type" after upgrade Magento from 1.6 to 1.9.1.1

I've just upgraded magento version from 1.6 to 1.9.1.1. I go to system/configuration/sales/payment methods and got the following error:

wrong content type

I have tried to debug by going to this function on app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php:

public function getAllowedMethods()
    {
        $contentType = $this->getConfigData('content_type');
        $allowedMethods = array();
        if ($this->_isDomestic) {
            $allowedMethods = array_merge(explode(',', $this->getConfigData('doc_methods')),
                explode(',', $this->getConfigData('nondoc_methods'))
            );
        } else {
            switch ($contentType) {
                case self::DHL_CONTENT_TYPE_DOC:
                    $allowedMethods = explode(',', $this->getConfigData('doc_methods'));
                    break;
                case self::DHL_CONTENT_TYPE_NON_DOC:
                    $allowedMethods = explode(',', $this->getConfigData('nondoc_methods'));
                    break;
                default:
                    Mage::throwException(Mage::helper('usa')->__('Wrong Content Type.'));
            }
        }
        $methods = array();
        foreach ($allowedMethods as $method) {
            $methods[$method] = $this->getDhlProductTitle($method);
        }
        return $methods;
    } 

I tried to var_dump($contentType) add get NULL value. What's wrong here ?

UPDATE:

My Content Type config in admin panel:

content type DHL

HungDQ
  • 812
  • 10
  • 31