Quale valuta utilizza Magento nella tabella del database `sales_flat_order` se abbiamo diversi ordini con valute di base diverse

magento.stackexchange https://magento.stackexchange.com/questions/117494

Domanda

Ad esempio voglio usare base_grand_total. So che questo valore viene visualizzato nella valuta di base su carta.

Ho i dati a sales_flat_order:

base_cur.   global_cur. order_cur.  store_cur.  base_to_gl_rate base_to_ord_rate    store_to_base_rate  store_to_ord_rate
CZK         CZK         CZK         CZK         1.0000          1.0000              1.0000              1.0000
EUR         EUR         EUR         EUR         1.0000          0.0385              1.0000              0.0385
CZK         CZK         CZK         CZK         1.0000          1.0000              1.0000              1.0000
PLN         PLN         PLN         PLN         1.0000          0.1667              1.0000              0.1667

La valuta di base del sito Web è CZK.

In quale valuta Magento mantiene i valori base_grand_total in questo caso?Ordinare valute?

MODIFICARE. Quale valuta viene utilizzata se le valute di base e dell'ordine sono diverse? Ad esempio, valuta di base CZK, valuta dell'ordine EUR.

Grazie!

È stato utile?

Soluzione 2

Il file /app/code/core/Mage/Sales/Model/Quote.php contiene un commento:

/**
 * Currency logic
 *
 * global - currency which is set for default in backend
 * base - currency which is set for current website. all attributes that
 *      have 'base_' prefix saved in this currency
 * store - all the time it was currency of website and all attributes
 *      with 'base_' were saved in this currency. From now on it is
 *      deprecated and will be duplication of base currency code.
 * quote/order - currency which was selected by customer or configured by
 *      admin for current store. currency in which customer sees
 *      price thought all checkout.
 *
 * Rates:
 *      store_to_base & store_to_quote/store_to_order - are deprecated
 *      base_to_global & base_to_quote/base_to_order - must be used instead
 */

Altri suggerimenti

normalmente il base_grant_total (e tutti gli altri campi che iniziano con base_) sono mantenuti nel valore che hai impostato come valuta predefinita nel backend in sistema->configurazione. Il grant_total è conservato nella valuta utilizzata per effettuare l'ordine.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top