Jump to content

Multistore different domans context being empty issue


Recommended Posts

I having a strange issues. I have three shops which are connected with mulstistore on the same group and each of them is on separate domain: shop1.com shop2.com shop3.com.

 

I want to have separate users, separate carts, the same products on those shops.

 

Product showing works fine. I've enabled cart on shop1.com and shop2.com and on shop1.com everything works fine - context, cookie, registrations, checkout works fine.

I've now decided to enable cart on another shop, but I cannot login or add products to the card or do anything what is saved in cookie because the context object seems to be NULL.

 

I am using 1.5.4.1 version.

I've debugged the code and it just does not have cookie on line 65 in CartController.php which is

  1. if ($this->context->cookie->exists() && !$this->errors && !($this->context->customer->isLogged() && !$this->isTokenValid()))

the part here false is

$this->context->cookie->exists()

is there any solution to this?

 

I am aware that you cannot share the same cookie trough out different domains and it creates two separate cookies, but as I am not sharing anything really that is held in cookie between shops they should work properly separately.

 

My set-up is Multi-shop 1 configuration in admin panel:

Domain: domain1.com
SSL domain: domain1.com
Physical URI: /
Virtual URI:
Your final URL will be: http://shop1.com/


Multi-shop 2 configuration in admin panel:

Domain: domain2.com
SSL domain: domain2.com
Physical URI: /
Virtual URI:
Your final URL will be: http://shop2.com/

 

Using Plesk panel domains of secondary shops are alias to the main domain.

 

Link to comment
Share on other sites

In addition, I've spotted another strange behavior if I get to the shop for the first time, it generates guest cookies, but when I try to login, for example, it just refreshes and the cookies ->exists() becomes false instead of true.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...