Richard S Posted April 8, 2014 Share Posted April 8, 2014 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 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.comSSL domain: domain1.comPhysical URI: /Virtual URI:Your final URL will be: http://shop1.com/Multi-shop 2 configuration in admin panel:Domain: domain2.comSSL domain: domain2.comPhysical 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 More sharing options...
Richard S Posted April 8, 2014 Author Share Posted April 8, 2014 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 More sharing options...
Richard S Posted April 8, 2014 Author Share Posted April 8, 2014 Found a stupid mistake in my code which I do not remember adding it. I was logging out customers in FrontController. Moderators can delete topic if needed. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now