File: admin/model/sale/voucher.php
Function: sendVoucher($voucher_id)
Code: Select all
public function sendVoucher($voucher_id) {
...
$order_info = $this->model_sale_order->getOrder($order_id);
// If voucher belongs to an order
if ($order_info) {
...
else {
...
$data['text_greeting'] = sprintf($this->language->get('text_greeting'), $this->currency->format($voucher_info['amount'], $order_info['currency_code'], $order_info['currency_value']));
...
Code: Select all
PHP Notice: Undefined index: in system/library/cart/currency.php on line 25
PHP Notice: Undefined index: in system/library/cart/currency.php on line 26
PHP Notice: Undefined index: in system/library/cart/currency.php on line 27
PHP Notice: Undefined index: in system/library/cart/currency.php on line 30
But to solve this, i made this little VQMOD:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Voucher Send Fix</id>
<version>2.3.0.2</version>
<vqmver required="true">2.6.1</vqmver>
<author>Kinetsu</author>
<file name="admin/model/sale/voucher.php">
<operation info="Fix Send Voucher">
<search position="before">
<![CDATA[
$data['text_greeting'] = sprintf($this->language->get('text_greeting'), $this->currency->format($voucher_info['amount'], $order_info['currency_code'], $order_info['currency_value']));
]]>
</search>
<add trim="true">
<![CDATA[
$order_info['currency_code'] = 'USD'; $order_info['currency_value'] = 1;
]]>
</add>
</operation>
</file>
</modification>