0

I have 3 domains pointing to same drupal instance (possible without domain access module).
Setup:
DomainA,DomainB,DomainC.
Based on domains, the appropriate translated content is used. This is because they are older domains with existing links. -DomainA: serves for customers from country A
-DomainB: serves for customers from country B
-DomainC: is new and will be serving for customers worldwide.

Now, with this setup, when customer switches language (another domain is shown), the content of cart remains.

Question: how to be able to redirect customer to home page of appropriate domain and use new session/cookie for cart? I tried to use domain access entity module which works, but after switching to new domain, the old session is deleted (so after returning back to previous domain, the cart is empty)

Side question: regarding DomainC. There will be more languages with prefixes (domainC/en, domainC/es ...). Is it possible to have separate session/cookie for each language ? (My intention is to have languages representing countries.)

  • The issue here is that the cart content for authenticated users is not stored in cookies or session; it is stored in the database using the user ID, and the user ID is the same for every domain-language combination. – juankvillegas Oct 10 '16 at 19:08
  • @juankvillegas Ok, I understand. So in this case the only option is to completely clean the cart content for anonymous and authenticated users (when switching to another language/country). – loparr Oct 10 '16 at 19:12
  • You could do some programming and before to clean the cart you can copy the cart content to your own table and restore this data later when the user comes back to the same domain and language. So, it is not the only option, but it is the easiest one. – juankvillegas Oct 10 '16 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.