4.2.4 To 4.7.1 Sp2 - Big Step

Hi all

I have at https://www.domain.com V4.2.4

I install at: http://subdomain.domain.com V4.7.1

In fact i create a new website there... i move, products, users, orders, settings, all i want

Now it is the big challenge

Which is the easy way to move 4.7.1 to root domain ?!

I now it is the more ways and settings and i don`t want to miss something.

My customer don`t must to see any major change or downtime

Thanks

http://docs.cs-cart.com/4.7.x/install/useful_info/moving_to_different_folder.html

Additional step which is not described in the article:

Go to Administration -> Stores page and change http and https locations for the store-front

Would be to easy to be just this :)

Additional step which is not described in the article:

Go to Administration -> Stores page and change http and https locations for the store-front

Under Administration → Stores, choose a store, and replace the Storefront URL value with the new one.

WOW, looks like I searched in the end or article only :)

Hi all

I have at https://www.domain.com V4.2.4

I install at: http://subdomain.domain.com V4.7.1

In fact i create a new website there... i move, products, users, orders, settings, all i want

Now it is the big challenge

Which is the easy way to move 4.7.1 to root domain ?!

I now it is the more ways and settings and i don`t want to miss something.

My customer don`t must to see any major change or downtime

Thanks

Did you export/import orders/products/users? Or how did you migrate that data?

Did you export/import orders/products/users? Or how did you migrate that data?

With .csv export .. !!!

Wat is so strange in that ?

It is allready done... i need just to move it... i guess this week

With .csv export .. !!!

Wat is so strange in that ?

It is allready done... i need just to move it... i guess this week

Didn't say it was anything strange.it's just that it usually doesn't work completely or properly given the differences in schemas between versions.

Please make sure that orders are assigned to correct users. Since user ID is not exported to the users feed, users in the new store can have wrong IDs

I haven't faced this type of things, but I believe who uses multi-vendor will face on some case. just want to learn, what is solution then?

how do you migrate the correct user ID?

Small modification is required to add user ID to the feed

And you can use the following function (NOT TESTED) to re-adjust them after you do the orders import.

function my_check_order_users() {
  echo "
";
  db_query("CREATE TABLE IF NOT EXISTS ?:orders_bkp LIKE ?:orders");
  db_query("REPLACE ?:orders_bkp SELECT * FROM ?:orders");
  printf("Backed up orders table to orders_bkp\n");

foreach(db_get_array(“SELECT o.order_id, o.email, o.user_id, u.user_id AS uid
LEFT JOIN ?:users AS u ON o.email=u.email
FROM ?:orders AS o”) as $order_data) {
if( empty($order_data[‘user_id’]) || $order_data[‘uid’] == '$order_data[‘user_id’] )
continue; // skip anonymous and valid

db_query("UPDATE ?:orders SET user_id=?i WHERE order_id=?i", $order_data['uid'], $order_data['order_id']);
printf("Reset user_id in order '%s' from '%d' to '%d'\n",
     $order_data['order_id'], $order_data['user_id'], $order_data['uid']);

}
die(“Done”);
}

And you can use the following function (NOT TESTED) to re-adjust them after you do the orders import.

function my_check_order_users() {
  echo "
";
  db_query("CREATE TABLE IF NOT EXISTS ?:orders_bkp LIKE ?:orders");
  db_query("REPLACE ?:orders_bkp SELECT * FROM ?:orders");
  printf("Backed up orders table to orders_bkp\n");

foreach(db_get_array(“SELECT o.order_id, o.email, o.user_id, u.user_id AS uid
LEFT JOIN ?:users AS u ON o.email=u.email
FROM ?:orders AS o”) as $order_data) {
if( empty($order_data[‘user_id’]) || $order_data[‘uid’] == '$order_data[‘user_id’] )
continue; // skip anonymous and valid

db_query("UPDATE ?:orders SET user_id=?i WHERE order_id=?i", $order_data['uid'], $order_data['order_id']);
printf("Reset user_id in order '%s' from '%d' to '%d'\n",
     $order_data['order_id'], $order_data['user_id'], $order_data['uid']);

}
die(“Done”);
}

Yes.. I have not even noticed this

tbirnseth check my atach

test.png

Yes.. I have not even noticed this

tbirnseth check my atach

Not sure what I'm supposed to check....

If someone create a new account.. will show order history from other account

X create new account, and after that in Order from his account shows orders from Y user

In fact i don`t need and my customers too... we don`t need to keep orders history...even that... if we start from zero, orders history will show from other accounts

:?

Yes... i see

I must to enter

user_number

manual from old datebase... direct

Pfff... i avoid to play with mysql...Everytime i am in, i must to broke something

tbirnseth

also i`m afraid to use that function :(

Yes... i see

I must to enter

user_number

manual from old datebase... direct

Pfff... i avoid to play with mysql...Everytime i am in, i must to broke something

tbirnseth

also i`m afraid to use that function :(

create a test store and do it all there first, if it works then do same to live stores

tbirnseth

also i`m afraid to use that function :(

Was just providing as an example of how to sync orders with user_id's based on email address.

In my case was 2200 orders... so was not something that must have remained compulsory

As i said... export and import csv users don`t work with "user_number" row too... so if someone create a new account will be "user_2" other "user_3" and so on.... and that users will view in his account some orders from oldest user_number... from someonelse

All knows that my skills are limited, so :

I export xml file from oldest database from "cscart_users" table and import to the new database in same place

And now all my users are ok

Except usersgroup...was 100 users to one users group in my case so i make it manual

Orders looks good now... buy only look

If you click a product from users orders profile or admin panel... will direct to an wrong product ....obvious that product id dosen`t exist or replaced. But this is not bad for me...

Tonight i will move

I will back with other thing

I am happy with my big step

:)

Finish and very happy

Was need to make the same operation at cscart_users_profile too

i moved to root domain very easy

and everything it is ok :) My customer i do not think they noticed anything