你可以找到的代碼在這裏:
/catalog/model/checkout/order.php
是:
// Order Totals
$order_total_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_total` WHERE order_id = '" . (int)$order_id . "' ORDER BY sort_order ASC");
foreach ($order_total_query->rows as $total) {
$data['totals'][] = array(
'title' => $total['title'],
'text' => $this->currency->format($total['value'], $order_info['currency_code'], $order_info['currency_value']),
);
}
只需使用VQmod價值指數添加到陣列。 去VQmod文件夾裏面 XML文件夾中創建一個文件,將其命名爲你想要什麼,並寫在它這幾行:
<modification>
<id>Get Value Without Formatting</id>
<version>OC 2</version>
<vqmver>1.0.0</vqmver>
<author>Your Name</author>
<file name="catalog/model/checkout/order.php">
<operation>
<search position="before"><![CDATA['text' => $this->currency->format($total['value'], $order_info['currency_code'], $order_info['currency_value']),]]></search>
<add><![CDATA[
'value' => $order_info['currency_value'] ? ((float)$total['value'] * $order_info['currency_value']) : $total['value'],
]]></add>
</operation>
</file>