Fórum OpenCart Brasil

Por um e-commerce livre, confiável e profissional

Suporte geral sobre problemas técnicos para OpenCart v2.x.
#69222
Bom dia !

estou com o seguinte erro abaixo e já pesquisei e tentei, mas continua o problema, isso ao enviar o vale presente.

2016-08-06 9:06:49 - PHP Notice: Array to string conversion in /home/XXXX/public_html/system/library/cart/currency.php on line 25
2016-08-06 9:06:49 - PHP Notice: Array to string conversion in /home/XXXX/public_html/system/library/cart/currency.php on line 25
2016-08-06 9:06:49 - PHP Notice: Array to string conversion in /home/XXXX/public_html/system/library/cart/currency.php on line 25
2016-08-06 9:06:49 - PHP Notice: Array to string conversion in /home/XXXX/public_html/system/library/cart/currency.php on line 25

no aguardo e agradeço desde já.
#69249
criei o vale presente, em vendas, vale presentes, quando seleciono o vale presente e envio, o e-mail é enviado mas aparece o seguinte alert:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined index: in <b>/home/armaz985/public_html/system/library/cart/currency.php</b> on line <b>26</b><b>Notice</b>: Undefined index: in <b>/home/armaz985/public_html/system/library/cart/currency.php</b> on line <b>27</b><b>Notice</b>: Undefined index: in <b>/home/armaz985/public_html/system/library/cart/currency.php</b> on line <b>28</b><b>Notice</b>: Undefined index: in <b>/home/armaz985/public_html/system/library/cart/currency.php</b> on line <b>31</b>{"success":"O e-mail com o vale presentes foi enviado !"}
#69259
Perfeito, agora ficou mais fácil!

Edite o arquivo:
admin/model/sale/voucher.php

Localize a linha abaixo:
Código: Selecionar todos
$data['text_greeting'] = sprintf($language->get('text_greeting'), $this->currency->format($voucher_info['amount'], $order_info['currency_code'], $order_info['currency_value']));
E substitua pela linha abaixo (é uma única linha):
Código: Selecionar todos
$data['text_greeting'] = sprintf($language->get('text_greeting'), $this->currency->format($voucher_info['amount'], (!empty($order_info['currency_code']) ? $order_info['currency_code'] : $this->config->get('config_currency')), (!empty($order_info['currency_value']) ? $order_info['currency_value'] : $this->currency->getValue($this->config->get('config_currency')))));
Salve as alterações no arquivo, acesse na administração da loja o menu Extensões->Modificações e clique no botão Atualizar (cor azul), e faça um novo teste.

Observação:
Utilize o editor Notepad++ para editar os arquivos:
https://notepad-plus-plus.org/

Espero ter ajudado. :)