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.
$_['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.
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
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
So how does %s and all the other %x work in operncart?
Where can I find a reference to all the %A2Z ?
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.)
OpenCart just passes the strings to the PHP sprintf function.
https://www.php.net/manual/en/function.sprintf.php
Many ThanksADD Creative wrote: ↑Thu Jul 27, 2023 7:51 pmOpenCart just passes the strings to the PHP sprintf function.
https://www.php.net/manual/en/function.sprintf.php
I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)
Who is online
Users browsing this forum: No registered users and 20 guests