Magento Fedex Shipping Method Currency

2019-03-06 14:49发布

I have magento site with base currency and display is IDR, but the Fedex shipping was calculated the USD price.

How can I set the Fedex display currency in IDR?

Any help will be appreciate

Thanks

1条回答
▲ chillily
2楼-- · 2019-03-06 15:07

on fedex.com/us/developer/ you will find the fedex developer manual. on page 36 for rate services it offers a solution for your question.

RequestedShipment/ Preferred Currency: optional field - indicates the currency the caller requests to have used in all returned monetary values (when a choice is possible).

      <xs:element name="PreferredCurrency" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This attribute indicates the currency the caller requests to have used in all returned monetary values (when a choice is possible).</xs:documentation>
        </xs:annotation>
      </xs:element>

additional information:

check app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php . the way magento display shiiping costs is defined in that file. as you can see getcurrencycode is called by getxmlquote to display the currency. on the other hand in that file version 1.7 is not displaying the currency you need IDR. check if you have IDR defined in your store and IDR added to the following array:

public function getCurrencyCode ()
    {
        $codes = array(
            'DOP' => 'RDD', // Dominican Peso
            'XCD' => 'ECD', // Caribbean Dollars
            'ARS' => 'ARN', // Argentina Peso
            'SGD' => 'SID', // Singapore Dollars
            'KRW' => 'WON', // South Korea Won
            'JMD' => 'JAD', // Jamaican Dollars
            'CHF' => 'SFR', // Swiss Francs
            'JPY' => 'JYE', // Japanese Yen
            'KWD' => 'KUD', // Kuwaiti Dinars
            'GBP' => 'UKL', // British Pounds
            'AED' => 'DHS', // UAE Dirhams
            'MXN' => 'NMP', // Mexican Pesos
            'UYU' => 'UYP', // Uruguay New Pesos
            'CLP' => 'CHP', // Chilean Pesos
            'TWD' => 'NTD', // New Taiwan Dollars
        );
        $currencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
        return isset($codes[$currencyCode]) ? $codes[$currencyCode] : $currencyCode;
    }

more precisely, you have to check in that array if a conversion like IDR to IDN is neccesary. im focusing on this solution because as far i checked magento displays the base currency when quote, consequently something must be missing in config files for shipping. hope it helps.

查看更多
登录 后发表回答