Post by rale » Wed May 18, 2016 6:02 am

I dont know what is problem and I need help!
When click add i have is next problem:

Code: Select all

Warning: Missing argument 2 for Cart\Currency::format(), called in /home/nadohvatruke/public_html/catalog/controller/account/voucher.php on line 16 and defined in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 24Notice: Undefined variable: currency in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 25Notice: Undefined index: in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 25Notice: Undefined variable: currency in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 26Notice: Undefined index: in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 26Notice: Undefined variable: currency in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 27Notice: Undefined index: in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 27Notice: Undefined variable: currency in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 30Notice: Undefined index: in /home/nadohvatruke/public_html/system/library/cart/currency.php on line 30Warning: Cannot modify header information - headers already sent by (output started at /home/nadohvatruke/public_html/catalog/controller/startup/error.php:34) in /home/nadohvatruke/public_html/system/library/response.php on line 12
BUt, when you go to back , on cart have that order for gift, and every on admin and customer when use code for gift work good.
If someone know what is problem im here.
OC 2.2.0.0

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by gulffresh » Wed May 18, 2016 10:16 am

I just ran into this problem with a Fresh install from a couple of days ago. It looks like there is a problem with the core files.
Here's how I fixed it.
go to catalog/controller/account/voucher.php
line 16 find

Code: Select all

'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']),
Replace with

Code: Select all

'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']),
It's kind of hard to imagine we are the only ones to find this problem.

hope this helps you if not It's a different problem then I had

Newbie

Posts

Joined
Wed May 18, 2016 10:09 am

Post by rale » Sat May 21, 2016 9:54 pm

O yeah! Mint masters, you solved the problem.
Works great, I knew that the problem is in the line 16, but did not know what of the codes can solve it until you wrote.
Maybe we're not the only one who found the problem, I think a lot of people do not test all on its website, it is important to have a solution for others.
Many thanks bro!
Now and others who have the problem easy to solve it thanks to you. :D

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by Pandamad » Mon May 23, 2016 7:06 pm

I have OC 2.2.0.0 and I was experiencing the same problem with the Gift Certificate.

Thanks for the help.

Newbie

Posts

Joined
Fri Mar 25, 2016 8:47 am

Post by robbie269 » Thu May 26, 2016 5:49 am

Realised I had the same problem last night on a recently live V2.2 site. Had not tested the Gift Certificate option :-[
Thanks for the fix.

Newbie

Posts

Joined
Thu May 26, 2016 5:46 am

Post by wbd » Mon Jul 18, 2016 3:25 pm

Just wanted to add my thanks for this fix - same problem, running v2.2.0.0.

wbd
New member

Posts

Joined
Sat Mar 26, 2011 1:34 pm
Location - Australia

Post by HealthGeek » Wed Aug 31, 2016 10:31 pm

Thanks guys!
Helped me too, running OpenCart 2.2.0.0.

Newbie

Posts

Joined
Wed Jul 20, 2016 12:44 am

Post by icestudios » Tue Mar 07, 2017 9:38 pm

Hi,

I'm getting the same issue with OC Version 2.3.0.2. I've just checked the Voucher.php file and it's different to the one above ... it's

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

... any ideas as to where I need to edit the code?

Many thanks,

Newbie

Posts

Joined
Fri Feb 15, 2013 6:14 am

Post by icestudios » Thu Mar 09, 2017 7:13 pm

Sorted. Followed this and all now OK ... https://github.com/opencart/opencart/issues/4664

Newbie

Posts

Joined
Fri Feb 15, 2013 6:14 am

Post by dragonfly-ie » Wed May 24, 2017 11:48 pm

gulffresh wrote:
Wed May 18, 2016 10:16 am
It's kind of hard to imagine we are the only ones to find this problem.

Cheers. - took me a year to find it. ;D

How can one test the whole site including all features??



.

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am

Who is online

Users browsing this forum: Ahrefs [Bot] and 23 guests