Post by duende002 » Tue Apr 12, 2016 7:43 pm

Hi there! I get an error message when a customer register a new account:
Warning: sprintf(): too few arguments in xxxx/catalog/controller/account/success.php line 32
I'm using Opencart 2.1.0.2 version
Does anyone know how to fix it?
Thanks in advance

Newbie

Posts

Joined
Fri Jul 17, 2015 6:23 pm

Post by oc-extensions » Wed Apr 13, 2016 6:20 am

Hi,

Have you made changes in langauge files?

In catalog/language/english/account/success.php you can find message like this:

Code: Select all

$_['text_message']  = '<p>Congratulations! Your new account has been successfully created!</p> <p>You can now take advantage of member privileges to enhance your online shopping experience with us.</p> <p>If you have ANY questions about the operation of this online shop, please e-mail the store owner.</p> <p>A confirmation has been sent to the provided e-mail address. If you have not received it within the hour, please <a href="%s">contact us</a>.</p>';
In controller you can find:

Code: Select all

$data['text_message'] = sprintf($this->language->get('text_message'), $this->url->link('information/contact'));
This means that in text_message is replaced %s with contact link;

If in catalog/language/english/account/success.php, $_['text_message'] don't have %s then that reason for your error;

If you don't use english then path is catalog/language/your_language/account/success.php

Goog luck ! ;)

Image | Extensions and Custom Development


User avatar
Active Member

Posts

Joined
Fri Jan 06, 2012 11:31 pm

Post by Nyrk0 » Wed Mar 08, 2017 11:47 am

Hi.
Same error with OC 2.3.0.2
account/success.php language file has:

Code: Select all

"$_['text_message']  = '<p>Su cuenta ha sido registrada.</p> <p> Se ha enviado confirmaci&oacute;n a su email. Si no lo ha recibido, por favor <a href="%s"> cont&aacute;ctenos </a>.</p>';
So, what? ???

New member

Posts

Joined
Tue Sep 18, 2012 4:46 am

Post by Thingy Developer » Tue Mar 28, 2017 11:14 pm

I get exactly the same error when registering as a customer. OC-2.2


Posts

Joined
Thu Jan 26, 2017 8:48 am

Post by Nyrk0 » Wed Mar 29, 2017 1:09 pm

Don't remember what error was, but was related to foreign language (there was no error when set to en-gb)... something was isolated and solved.

New member

Posts

Joined
Tue Sep 18, 2012 4:46 am
Who is online

Users browsing this forum: No registered users and 4 guests