Post by i2Paq » Wed Feb 23, 2011 2:16 am

Daniel wrote:
i2Paq wrote:
zrxraver wrote:in the config.php add these lines:

define('COOKIE_DOMAIN', 'www.shops.nl');
define('COOKIE_PATH','/firstshop');
define('COOKIE_UNIQUE_NAME','first_shop_name');

for the admin config add something to the cookie_unique_name

in session.php change to this

session_name(COOKIE_UNIQUE_NAME);
session_set_cookie_params(1*24*60*60, COOKIE_PATH, COOKIE_DOMAIN);

the 1*24*60*60 means 24 hours (in seconds) lifetime for the cookie, change it to your needs.
Would it not be smart to do this default so when logging out of your store front you would not be logged out of your Admin?

logging out of the store front has no effect whatso ever on the admin.

one relies on customer_id and the other is user_id.

they won't get mixed up.
Not in the same browser, logging out of the Store Front will also log out the Admin in the Back Office.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by jang1200 » Thu Feb 24, 2011 1:59 pm

config.php

Code: Select all

/*
| COOKIE
*/
define('cookiePath', '/');
define('cookieDomain', '');
define('cookieSecure', false);
define('cookieHTTPonly', false);
// 3600 = 1godz, 43200 = 12godz, 86400 = 24godz
// 1godz. = 1hour
define('cookieExpire', '3600');
define('cookieName', 'user_1493');
/admin/config.php

Code: Select all

/*
| COOKIE
*/
define('cookiePath', '/');
define('cookieDomain', '');
define('cookieSecure', false);
define('cookieHTTPonly', false);
// 3600 = 1godz, 43200 = 12godz, 86400 = 24godz
// 1godz. = 1hour
define('cookieExpire', '1800');
define('cookieName', 'admin_1493');
/system/library/session.php

Code: Select all

<?php
final class Session {
    public $data = array();

    public function __construct() {
        if (!session_id()) {
            ini_set('session.use_cookies', 'On');
            ini_set('session.use_trans_sid', 'Off');

        session_name(cookieName);
        // Set the session cookie parameters
        session_set_cookie_params
        (
            cookieExpire,
            cookiePath,
            cookieDomain,
            cookieSecure,
            cookieHTTPonly
        );

//         session_set_cookie_params(0, '/');
            session_start();
        }
        $this->data =& $_SESSION;
    }
}

$email = filter_var(filter_var($email, FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);
if($email === false) {
// Houston, we have a problem....
}


Newbie

Posts

Joined
Mon Apr 12, 2010 4:17 pm

Post by fireatwire » Wed Mar 09, 2011 6:11 am

Would it possible to point the "secure" pages in store2.mydomain.com to my SSL cert at mydomain.com/store2 ? Because I have only one SSL cert for my main domain but not for my subdomains. Or is there another workaround?
Thanks for your help!

New member

Posts

Joined
Wed Feb 03, 2010 5:21 am

Post by Daniel » Wed Mar 09, 2011 11:18 pm

fireatwire wrote:Would it possible to point the "secure" pages in store2.mydomain.com to my SSL cert at mydomain.com/store2 ? Because I have only one SSL cert for my main domain but not for my subdomains. Or is there another workaround?
Thanks for your help!
it is but the settings for that domain name will load for that domain.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by badboy39 » Thu Mar 16, 2017 5:56 pm

Did someone face this issue in a dedicated host? Opencart 2.1

Newbie

Posts

Joined
Tue Jul 12, 2016 7:43 pm
Who is online

Users browsing this forum: No registered users and 13 guests