Post by benloi » Tue Apr 19, 2016 6:41 pm

Hello, need help , I am testing the gift certificate feature of ver 2.2.0, and after filling in all the fields and clicking continue, I get this :
Warning: Missing argument 2 for Cart\Currency::format(), called in /home/benloi/public_html/catalog/controller/account/voucher.php on line 16 and defined in /home/benloi/public_html/system/library/cart/currency.php on line 24Notice: Undefined variable: currency in /home/benloi/public_html/system/library/cart/currency.php on line 25Notice: Undefined index: in /home/benloi/public_html/system/library/cart/currency.php on line 25Notice: Undefined variable: currency in /home/benloi/public_html/system/library/cart/currency.php on line 26Notice: Undefined index: in /home/benloi/public_html/system/library/cart/currency.php on line 26Notice: Undefined variable: currency in /home/benloi/public_html/system/library/cart/currency.php on line 27Notice: Undefined index: in /home/benloi/public_html/system/library/cart/currency.php on line 27Notice: Undefined variable: currency in /home/benloi/public_html/system/library/cart/currency.php on line 30Notice: Undefined index: in /home/benloi/public_html/system/library/cart/currency.php on line 30Warning: Cannot modify header information - headers already sent by (output started at /home/benloi/public_html/catalog/controller/startup/error.php:34) in /home/benloi/public_html/system/library/response.php on line 12


Help me pls, how do I fix it?

Newbie

Posts

Joined
Tue Apr 19, 2016 6:39 pm

Post by wslewis72 » Wed May 04, 2016 2:06 am

I am having the same problem. Was just going through testing things and I came up with this same error when I try to use the gift certificate option.

Newbie

Posts

Joined
Wed May 04, 2016 2:05 am

Post by souravkarmakar » Thu Jun 16, 2016 11:47 pm

Open the file catalog/controller/account/voucher.php line 16;

Find

'description' => sprintf($this->language->get('text_for'), $this->currency->format($this->currency->convert($this->request->post['amount'], $this->session->data['currency'], $this->config->get('config_currency'))), $this->request->post['to_name']),

Change to:

'description' => sprintf($this->language->get('text_for'), $this->currency->format($this->currency->convert($this->request->post['amount'], $this->session->data['currency'], $this->config->get('config_currency')), $this->session->data['currency']), $this->request->post['to_name']),


Posts

Joined
Thu Jun 16, 2016 11:45 pm

Post by windows95 » Wed Apr 04, 2018 5:49 am

souravkarmakar wrote:
Thu Jun 16, 2016 11:47 pm
Open the file catalog/controller/account/voucher.php line 16;

Find

'description' => sprintf($this->language->get('text_for'), $this->currency->format($this->currency->convert($this->request->post['amount'], $this->session->data['currency'], $this->config->get('config_currency'))), $this->request->post['to_name']),

Change to:

'description' => sprintf($this->language->get('text_for'), $this->currency->format($this->currency->convert($this->request->post['amount'], $this->session->data['currency'], $this->config->get('config_currency')), $this->session->data['currency']), $this->request->post['to_name']),
Thank you. This solved my issue

Opencart version: 2.2.0.0
PHP: 7.2.3
OS: Windows Server 2016 IIS 10

Newbie

Posts

Joined
Wed Aug 16, 2017 6:22 am
Who is online

Users browsing this forum: Maxidays and 31 guests