Magento Fedex Shipping Method Currency

后端 未结 1 1568
天命终不由人
天命终不由人 2021-01-28 04:58

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?

1条回答
  •  借酒劲吻你
    2021-01-28 05:18

    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).

          
            
              This attribute indicates the currency the caller requests to have used in all returned monetary values (when a choice is possible).
            
          
    

    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.

    0 讨论(0)
提交回复
热议问题