Post by jge » Thu Jun 16, 2016 2:36 am

Hello,

I run OC 2.0.1.1, and installed a French extension pack in order to add FR to the web front end.
This is the extension : http://www.opencart.com/index.php?route ... load_id=39

When i run the front end in EN, it works great.

When i switch to FR, a warning message says :
Warning: sprintf(): Too few arguments in /home/operap6/public_html/system/modification/catalog/controller/common/footer.php on line 78
Line 78 of this file is :

Code: Select all

$data['powered'] = sprintf($this->language->get('text_powered'));
So I ccompared the language files...

EN version (line 17):
$_['text_powered'] = 'Powered By <a href="http://www.opencart.com">OpenCart</a><br /> %s &copy; %s';
FR version (same line) :

Code: Select all

$_['text_powered']		= 'D&eacute;velopp&eacute; Par <a href="http://www.opencart.com" onclick="window.open(this.href)">OpenCart</a><br /> %s &copy; %s';
So I tried instead for FR, to copy the exact same line that in the EN version:

Code: Select all

$_['text_powered']		= 'Powered By <a href="http://www.opencart.com">OpenCart</a><br /> %s &copy; %s';
Note that in FR, the message "Développé Par" which is before "Opencart" is not displayed.

That was unsuccessfull !


I have the same problems : warning msg, and "Powered By" not displayed by OpenCart.


Please note ,I am a newbie, so don't kill me if this is an obvious issue ;-)

Thank you,

Opéra Perles
Cultured pearl jewelry
https://www.operaperles.com


User avatar
jge
New member

Posts

Joined
Thu Jun 09, 2016 10:34 pm

Post by artcore » Thu Jun 16, 2016 2:47 am

The problem is in the controller so I din't know why it worked for English.

Here is an example with the missing variables hard coded in.
$data['powered'] = sprintf($this->language->get('text_powered'), 'YOUR SHOP NAME', date('Y'));

Note that %s is supposed to be replaced by shopname and the other with a date.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by jge » Thu Jun 16, 2016 3:00 pm

Thank you Artcore,

I finally managed to get rid of the problem... by getting rid of the whole "Powered by..."
But I am still unclear why this would not work...

Opéra Perles
Cultured pearl jewelry
https://www.operaperles.com


User avatar
jge
New member

Posts

Joined
Thu Jun 09, 2016 10:34 pm

Post by artcore » Thu Jun 16, 2016 3:35 pm

I just noticed the errror is in
Warning: sprintf(): Too few arguments in /home/operap6/public_html/system/modification/catalog/controller/common/footer.php on line 78
So you have an extension that changed your footer

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 0 guests