Jump to content

Two domains - One database


Recommended Posts

Hi all,

I'm thinking to get two websites done under slightly different domains i.e ".com" and ".ca"
They will be sharing the same database so all the products and customers info will be synchronized.

But here's the question:
Is it possible (and how) to set up different default currency for the two domains?

i.e.
".com" = USD.
".ca" = CAD.

Thanks!

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

That might be possible...

You should have the same config/settings.inc.php (to connect the same MySQL Server)

If they're on different servers, you'll have to set up MySQL Server to accept external connections, then, where you have:
define('_DB_SERVER_', 'localhost');
you must set the IP or alias of the MySQL Server, for example:
define('_DB_SERVER_', '200.175.251.113');

Try that.

DGV

Link to comment
Share on other sites

  • 2 weeks later...

so did this work>? I'm looking at doing something similar, where i have two installations of the cart on different domain names so that i can have one as a wholesale and one as a retail, the only different would be that I will have a different design and hardcoded menu on each one but same database connection and products etc. Are there going to be any quirky issues with cookie issue or logins redirecting or things like that there there is some default domain type of setting saved in the database that will mean that a user gets shuttled back to the primary domain rather than staying on the second one when they are checking out etc?

--- update, ive been reading another thread on this topic and it seems like it will be possible with some careful configuring of the settings files.... ie...


they are just in the settings.inc.php

But you have two settings.inc.php, so the cookie_key from the main have to be copied into the settings.inc.php of the new store.

Link to comment
Share on other sites

  • 2 years later...

i want customer accounts only... the problem is my old database is not like the prestashop database structure so i need to match the fields from my old database to the requirements of pretashop registration.

Link to comment
Share on other sites

Hi,

Thank you for your post and now i can add new customer using my created registration form...

 

And now i want to create login form from another website to my store...

 

<form action="http://mystore/authentication.php" method="post" id="login_form" class="std">

<input type="text" id="email" name="email"/>

<input type="text" name="passwd"/>

<input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="Log in" />

</form>

 

my login works fine and i see my name at the top my website but when i do refresh or clicking another page like checkout it automatically logout... why?

and when i login directly to my store using the user and password i created manually it seems all works fine.

Link to comment
Share on other sites

Hi vekia,

 

how to check my cookie?

 

I tried to check this problem in all browser and i noticed that only google chrome has a problem...

in my first login it shows that the welcome user works fine but when i refresh or go to another page its automatically logout, then when i try second login its all work even if i refresh or go to other page... then when i logout and login again, its automatically logout again and it works round and round when i check login again and agian.

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...