Post by nemesisjack » Fri Aug 23, 2013 2:20 am

I'm trying to change

$_['text_welcome'] = 'Welcome visitor you can <a href="%s">login</a> or <a href="%s">create an account</a>.';

To

$_['text_welcome'] = '<a href="%s">create an account</a> or <a href="%s">login</a>.';

Problem is that now the "create account" link is going to account/login and the "login" link is going to account/register.

Newbie

Posts

Joined
Wed Jan 16, 2013 6:55 am

Post by nemesisjack » Fri Aug 23, 2013 2:27 am

Nevermind. I got it.

For future reference, this post explains it: http://forum.opencart.com/viewtopic.php ... 8&p=330403

The trick was to replace

$this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));

with

$this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/register', '', 'SSL'), $this->url->link('account/login', '', 'SSL'));

in catalogue/controller/commen/header.php

Newbie

Posts

Joined
Wed Jan 16, 2013 6:55 am

Post by butte » Fri Aug 23, 2013 5:23 am

You can mark your opening title Solved to flag it for others running searches later.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by parkookk » Thu Jul 27, 2023 6:49 pm

So how does %s and all the other %x work in operncart?
Where can I find a reference to all the %A2Z ?

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by ADD Creative » Thu Jul 27, 2023 7:51 pm

parkookk wrote:
Thu Jul 27, 2023 6:49 pm
So how does %s and all the other %x work in operncart?
Where can I find a reference to all the %A2Z ?
OpenCart just passes the strings to the PHP sprintf function.
https://www.php.net/manual/en/function.sprintf.php

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by parkookk » Thu Jul 27, 2023 9:27 pm

ADD Creative wrote:
Thu Jul 27, 2023 7:51 pm
parkookk wrote:
Thu Jul 27, 2023 6:49 pm
So how does %s and all the other %x work in operncart?
Where can I find a reference to all the %A2Z ?
OpenCart just passes the strings to the PHP sprintf function.
https://www.php.net/manual/en/function.sprintf.php
Many Thanks

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london
Who is online

Users browsing this forum: No registered users and 20 guests