Jump to content

Migrating my shop


Recommended Posts

Hello everyone, 

my company runs prestashop and I am having a bit of an issue with something.

 

Currently we run a shop at a subdomain  ( example.test.com )

 

we would like to migrate that same shop to a different subdomain (example2.test.com ) to retain the theme and settings but later on have different products.

 

If my understanding is correct, I should just be able to :

 

1) download example.test.com

2) upload example2.test.com

3) create a new mysql db

4) export the old db and import into the new one

5) change the settings.inc.php file

 

I have done all of this but I now receive a 

'Bad SubDomain SQL query.'

error on my example2.test.com

 

 

any ideas?

Link to comment
Share on other sites

Here is my suggestion as I did not see in your post it was done.

 

if you are able to log into the back office on 2nd domain,

 

check that you have set the shop domain name (url) to 2nd domain, best to copy this and put in shop domain ssl as well.

 

if you can not access the back office

 

then you can modify this by editing (phpmyadmin) table configuration

your prefix_SHOP_DOMAIN

your prefix_SHOP_DOMAIN_SSL

 

also I have a module that will allow this using one back office (but it is very difficult to have different products by shop so I don't recommend that)

Link to comment
Share on other sites

Here is my suggestion as I did not see in your post it was done.

 

if you are able to log into the back office on 2nd domain,

 

check that you have set the shop domain name (url) to 2nd domain, best to copy this and put in shop domain ssl as well.

 

if you can not access the back office

 

then you can modify this by editing (phpmyadmin) table configuration

your prefix_SHOP_DOMAIN

your prefix_SHOP_DOMAIN_SSL

 

also I have a module that will allow this using one back office (but it is very difficult to have different products by shop so I don't recommend that)

I do not have access to the back office but I can access phpmyadmin. What exactly do I modify?

Edited by stets (see edit history)
Link to comment
Share on other sites

using phpmyadmin


 


table your prefix_configuration


 


update these two fields:


 


your prefix_SHOP_DOMAIN


your prefix_SHOP_DOMAIN_SSL


 


here put your 2nd domain name (not www as they are subdomains)


 


note: this usually does not keep one from accessing the back office..so there may be other changes required


Link to comment
Share on other sites

 

using phpmyadmin

 

table your prefix_configuration

 

update these two fields:

 

your prefix_SHOP_DOMAIN

your prefix_SHOP_DOMAIN_SSL

 

here put your 2nd domain name (not www as they are subdomains)

 

note: this usually does not keep one from accessing the back office..so there may be other changes required

 

I've found the prefix_SHOP_DOMAIN field but there is no prefix_SHOP_DOMAIN_SSL

currently the Shop domain field contains 

 

'SELECT * 

FROM `ps_subdomain` 

LIMIT 0 , 30'

 

 

I've also found a field where it says 'www'. Do I edit this or add a new one?

Edited by stets (see edit history)
Link to comment
Share on other sites

change config/config.inc.php

/* Debug only */
@ini_set('display_errors', 'on');
define('_PS_DEBUG_SQL_', true);

and reproduce the error to see if more information

Aha! I get this

 

Warning: Invalid argument supplied for foreach() in mysite.com/classes/Language.php on line 606 Bad SubDomain SQL query.

 

Line 606 reads:

 

foreach ($result AS $row)

Edited by stets (see edit history)
Link to comment
Share on other sites

So I've found my issue...the database was not complete. It is not complete and up to date but I have another issue it seems.

The two sites are identical, but they use different mysql databases.

When I try to navigate to my second site ( example2.test.com ) it takes me to the first (example.test.com) !

This is driving me crazy.

Link to comment
Share on other sites

So I've found my issue...the database was not complete. It is not complete and up to date but I have another issue it seems.

The two sites are identical, but they use different mysql databases.

When I try to navigate to my second site ( example2.test.com ) it takes me to the first (example.test.com) !

This is driving me crazy.

 

ah progress!

 

try regenerating the .htaccess for your 2nd sub domain.  (you did change the shop url's under seo&url's) yes?

 

little by little

Link to comment
Share on other sites

×
×
  • Create New...