Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Yes of course.
Seems so, it is one file that can't be ocmodified. It applies changes, but never loads the modified version.
The only solution is to hard code it and wait for an official fix.
Thanks anyway.
Sorry, I misunderstood your post. I thought you had made the changes to the core files. If you didn't want to change the core files you could try to modify the Set-Cookie headers with your web server. A quick web search should give you a few examples.
ADD Creative wrote: ↑Sat Aug 22, 2020 9:48 pmFor PHP 7.3, try.
In catalog/controller/startup/session.php change.To.Code: Select all
setcookie($this->config->get('session_name'), $this->session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
In system/framework.php change.Code: Select all
setcookie($this->config->get('session_name'), $this->session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);
To.Code: Select all
setcookie($config->get('session_name'), $session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
For the language and currency cookies, they should be the same as in this post.Code: Select all
setcookie($config->get('session_name'), $session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);
viewtopic.php?f=190&t=216579&start=20#p796020
Regards, WebDesires.
We are a team of developers in the UK - professional and friendly, message us or give us a call anytime and we will be happy to help.
Phone: +44 (0) 121 318 6336 - Web: webdesires.co.uk - Skype: WebDesires
OpenCart Support - OpenCart Web Development - Our OpenCart Plugins
You will have to give more information. Actual OpenCart version (there isn't a 3.0.6). PHP version. Link to your site. What you have tried so far.
Your session cookie looks correct.
Code: Select all
set-cookie: OCSESSID=xxx; path=/; secure; HttpOnly; SameSite=None
This works assuming changes to framework are done on core file.ADD Creative wrote: ↑Sat Aug 22, 2020 9:48 pmFor PHP 7.3, try.
In catalog/controller/startup/session.php change.To.Code: Select all
setcookie($this->config->get('session_name'), $this->session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
In system/framework.php change.Code: Select all
setcookie($this->config->get('session_name'), $this->session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);
To.Code: Select all
setcookie($config->get('session_name'), $session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
For the language and currency cookies, they should be the same as in this post.Code: Select all
setcookie($config->get('session_name'), $session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);
viewtopic.php?f=190&t=216579&start=20#p796020
HOWEVER the link for currency and language only refers to 2.3 OC and it does NOT work on OC 3
does anyone have a solution for language and currency for OC 3 and php 7.3?
many thanks
Change.
Code: Select all
setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
Code: Select all
setcookie('language', $code, ['expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => $this->request->server['HTTP_HOST'], 'samesite' => 'None', 'secure' => true]);
Code: Select all
setcookie('currency', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
Code: Select all
setcookie('currency', $code, ['expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => $this->request->server['HTTP_HOST'], 'samesite' => 'None', 'secure' => true]);
This is the modification method you provided, But it is no longer available in OpenCart 3.0.4.0:ADD Creative wrote: ↑Fri Oct 29, 2021 6:30 pmNot that the language and currency cookies should be an issue, but if you did want to change them.
For PHP 7.3, try.
In catalog/controller/startup/session.php change.
Code: Select all
setcookie($this->config->get('session_name'), $this->session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
Code: Select all
setcookie($this->config->get('session_name'), $this->session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);
Code: Select all
setcookie($config->get('session_name'), $session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
Code: Select all
setcookie($config->get('session_name'), $session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);
Change.
Code: Select all
setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
Code: Select all
setcookie('language', $code, ['expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => $this->request->server['HTTP_HOST'], 'samesite' => 'None', 'secure' => true]);
Code: Select all
setcookie('currency', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
Code: Select all
setcookie('currency', $code, ['expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => $this->request->server['HTTP_HOST'], 'samesite' => 'None', 'secure' => true]);
OpenCart 3.0.4.0setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
Old:setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/');
OpenCart 3.0.4.0setcookie('currency', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
The red code has been removed, So the original code cannot be used again, How can I modify the code to solve this problem?setcookie('currency', $code, time() + 60 * 60 * 24 * 30, '/');
Can you help me?
Thank you!
Change.
Code: Select all
setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/');
Code: Select all
setcookie('language', $code, ['expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'samesite' => 'None', 'secure' => true]);
Code: Select all
setcookie('currency', $code, time() + 60 * 60 * 24 * 30, '/');
Code: Select all
setcookie('currency', $code, ['expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'samesite' => 'None', 'secure' => true]);
Users browsing this forum: gunownergear and 57 guests