Manual Upgrade - 2.0.15 to 2.2.2

I have saw some people talking about problems with upgrades in Cs-Cart. We have a lot of posts here about this since 1.xx versions. For this, I (me, myself) prefer to make a CLEAN INSTALLATION from a new version.

(sorry if you are from the group of people who will think could be better to divide this topic in some - I think everything has relation with other)



Some time ago I started a thread almost about same thing:

2.0.12 -> 2.0.15 problems: import products / manufacturer addon - Installation & Upgrade - CS-Cart Community Forums



Using XAMPP for Windows - 1.7.4

PHP: 5.3.5

phpMyAdmin: 3.3.9

Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

Versão do cliente MySQL: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $





My basic steps are:

  1. Install new version (local or in the server - [size=“4”]this time I choose local[/size]).
  2. Translate new language files (had problems with this, too)
  3. Import categories and products (with images) database (from the older version 2.0.15)
  4. Import clients and orders database (from the older version 2.0.15)
  5. Adjust some settings like shipping method and others things.







    Problems (maybe BUGS)

    About DATABASE


  6. I could not import the PRODUCTS data I exported in Admin side from the store 2.0.15. When I try to IMPORT (administration > import > produts = php?dispatch=exim.import§ion=products), nothing happens.

    It says… UPDATING… and nothing happens after 20min.

    There is no product inside the catalog.







    DATABASE

    I need to IMPORT CATEGORIES, PRODUCTS, PRODUCTS DESCRIPTION, USERS

    I think about to use a software to compare database structure. Maybe Beyonde Compare, maybe winmerge, maybe (if one of 2 others did not work), Talend.



    2.0.15 (205 tables)



    cscart_categories

    cscart_category_descriptions

    Total: 2 tables





    cscart_products

    cscart_products_categories

    cscart_product_descriptions

    cscart_product_features

    cscart_product_features_descriptions





    .

    cscart_product_sales

    total: 27 tables about “products”









    2.2.2 (221 tables) - 16 more than 2.0.15



    —CATEGORIES-----

    cscart_categories

    cscart_category_descriptions

    Total: 2 about categories (same than version 2.0.15)



    ---- PRODUCTS ----

    cscart_products

    cscart_products_categories

    cscart_product_descriptions

    cscart_product_features

    cscart_product_features_descriptions





    .

    cscart_product_subscriptions

    Total: 28 tables about PRODUCTS (1 more than 2.0.15)







    2.2.2 VERSION

    cscart_product_sales

    cscart_product_subscriptions



    2.0.15 VERSION

    cscart_product_sales

cscart_profile_fields



Conclusion:

2.2.2 has 1 more table: cscart_product_subscriptions



--------------



USERS

2.0.15 VERSION

cscart_users

cscart_users_data

cscart_user_mailing_lists

cscart_user_profiles

cscart_user_session_products





2.2.2 VERSION

same structure than 2.0.15





------------------



ORDERS



2.0.15 VERSION

cscart_orders

cscart_order_data

cscart_order_details



2.2.2 VERSION

cscart_orders

cscart_order_data

cscart_order_details

  • [b]cscart_order_docs
  • cscart_order_transactions[/b]



    version 2.2.2 has 2 more tables.







    [size=“5”]IS THERE ANY DEFAULT UPGRADE FROM CS-CART TEAM or others members or do I need to do it by myself?

    [/size]




    Some time ago I read about a service/software from a member:

    IMPORT CSV and Products Management - Third-Party Add-ons - CS-Cart Community Forums



    There is another member here (participative one) that work with this, too.



    BUT, I'D LIKE TO LEARN TO DO IT BY MYSELF.







    +++++++++++



    PROBLEM 2. Not possible to translate some words.

    EVERYTHING INSIDE “ADJUSTS” MENU (Appearence, Company, Dynamic HTML, E-mails, General, Google Base, Image verification,… and Upgrade center) I CAN NOT TRANSLATE.

    I start DESIGN MODE (Translation mode) and can change (translate) the word, but when I save it or do something else like a refresh in the page, the word go to the old language format (english).

I will post here what I am trying to do to solve the PROBLEMS.

Maybe this can help someone in a near future.



Like I am not very good in DATABASES, I insert one PRODUCT in NEW LOCAL STORE (version 2.2.2) and export this table (cscart_products) to my DESKTOP in Microsoft Excel 2003 format (.xls).



After this I download the same table from the old database (version 2.0.15). Sure they have some differences between them (the tables).


[quote]DIFFERENCES

Version 2.0.15 cscart_products table:

supplier_id

buy_in_advance



Version 2.2.2 cscart_products table:

company_id (could be compared with “supplier_id” in the other version)

out_of_stock_actions (could be compared with “buy_in_advance” in 2.0.15)

options_type

exceptions_type

details_layout

shipping_params[/quote]





After this, I populate the 2.2.2 table with data from 2.0.15 and adjust missing fields with data from the FIRST line.



I tryed to upload the .XLS file to the 2.2.2 Database using phpMyAdmin and receive the error:


[quote]Error



consult SQL:



INSERT INTO cia_cscart222.[size="5"][u][b]Worksheet[/b][/u][/size] (product_id, product_code, product_type, owner_id, status, company_id, list_price, amount, weight, length, width, height, shipping_freight, low_avail_limit, timestamp, usergroup_ids, is_edp, edp_shipping, unlimited_download, tracking, free_shipping, feature_comparison, zero_price_action, is_pbp, is_op, is_oper, is_returnable, return_period, avail_since, out_of_stock_actions, localization, min_qty, max_qty, qty_step, list_qty_count, tax_ids, age_verification, age_limit, options_type, exceptions_type, details_layout, shipping_params) VALUES (29778, NULL, NULL, 0, 'A', 0, 99, 1, 0, 0, 0, 0, 0, 0, 1315623600, 0, 'N', 'N', 'N', 'B', 'N', 'N', 'R', 'Y', 'N', 'N', 'Y', 10, 0, 'B', NULL, 0, 0, 0, 0, NULL, 'N', 0, 'P', 'F', 'default_template', 'a:5:{s:16:“min_items_in_box”;i:0;s:16:“max_items_in_box”;i:0;s:10:“box_length”;i:0;s:9:“box_width”;i:0;s:10:“box_height”;i:0;}'), […]



Messages from MySQL :

#1054 - Unknown column 'product_id' in 'field list'[/quote]



IT CREATED A NEW TABLE WITH THE NAME “Worksheet” in Database.

This error message is not so logic, because “product_id” is the first column from the .XLS worksheet file.



After this I changed the worksheet name to cscart_products inside XLS file to see if I could get any difference.

IT WORKED, I could import the data to cscart_products.





NEXT TABLE TO TRY THE SAME THING:

Table cscart_product_descriptions


[quote]Error



consult SQL:



INSERT INTO cia_cscart222.[size="4"][b]cscart_product_descriptions[/b][/size] (product_id, lang_code, product, shortname, short_description, full_description, meta_keywords, meta_description, search_words, page_title, age_warning_message) VALUES (29842, 'EN', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', NULL, 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', 'Femme de Montblanc, Eau de Toilette ,50ml , MontBlanc', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', 'Femme de Montblanc, Eau de Toilette ,50ml ,MontBlanc', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', NULL), (29842, 'BR', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', NULL, 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', 'Femme de Montblanc, Eau de Toilette ,50ml , MontBlanc', 'Femme de Montblanc - Eau de Toilette - 50ml - MontBlanc', 'Fe[…]



[size=“5”]Messages from MySQL :

#2006 - MySQL server has gone away
[/size][/quote]



So, I could not import it.





About the Error: #2006 - MySQL server has gone away


[quote]

Two most common reasons (and fixes) for the MySQL server has gone away (error 2006) are:

Server timed out and closed the connection. How to fix: check that wait_timeout variable in your mysqld’s my.cnf configuration file is large enough. On Debian: sudo nano /etc/mysql/my.cnf, set wait_timeout = 600 seconds (you can tweak/decrease this value when error 2006 is gone), then sudo /etc/init.d/mysql restart. I didn’t check, but the default value for wait_timeout might be around 28800 seconds (8 hours).

Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. You can increase the maximal packet size limit by increasing the value of max_allowed_packet in my.cnf file. On Debian: sudo nano /etc/mysql/my.cnf, set max_allowed_packet = 64M (you can tweak/decrease this value when error 2006 is gone), then sudo /etc/init.d/mysql restart.[/quote]



I will try to fix it to see if I can import this TABLE, too.

Sry didn't really read your wall of text.



I recently manually upgraded from 1.3.5 to 2.2.1



All I did was do a product and user export.

Made sure I had the same user fields in 2.2 as to 1.3.5



Then imported all products and users into 2.2.1



Doing it this was I lost all mods and order details. But ensure I had enough of a clean slate going forward.



kogi

Wow, that is a lot to read through.



I do know that for most of the stuff I couldn't get the information to directly export/import between the older version of CS-Cart and the new version through phpMyAdmin.



I also know that CS-Cart doesn't export/import any of the category information like descriptions, images, meta stuff etc. I contacted Alt-Team about making an addon that will export/import all of the category info. They want to charge me like $200 for this addon. Obviously this would be a great benefit to have.



I'd think that if you could export/import the category information along with all of the other information that you can already export/import, you could pretty easily do a manual upgrade.



What do you think? Would that work and/or help?



Thanks,



Brandon

[quote]So, I could not import it.



About the Error: #2006 - MySQL server has gone away



I will try to fix it to see if I can import this TABLE, too.

[/quote]





I only needed to adjust a configuration:

I added: max_allowed_packet = 64M to my.ini (inside C:\xampp\mysql\bin) and it solved the problem








[quote]Importation finish with success.



The following structures have either been created or altered. Here you can:

View a structure`s contents by clicking on its name

Change any of its settings by clicking the corresponding “Options” link

Edit its structure by following the “Structure” link[/quote]





LET ME CONTINUE WITH ALL PRODUCTS_TABLES and see the FINAL result.



:)

cscart_product_XXXX tables were all imported by hands.



Now I can see all products in catalog of local 2.2.2 store.



I am very happy with this.



Here is 00h58.

I am stoping at this moment but after a good rest I will be back to adjust IMAGEs of produts, IMPORT USERS and adjust SHIPPING METHODS and others things.



Later, I will adjust my OWN skin.





For images, you can see 2 tables about this:

cscart_images

cscart_images_links



So, I think this will not be difficult.

I think I will need to DOWNLOAD some IMAGES directories from 2.0.15 version and, maybe, adjust settings of images in Admin console.

@kogi

“wall of text”: No problem, I am not afraid about this. At least you try to show your experience.

BUT… like you wrote… you LOST a lot of things.

I am comparing each table structure to not lose anything (I hope).

Tables usually have different fields from one version to the other.





@brandonvd

Hello Brandon,



How are you?

Some time between our last post “together”. I remember you post something to help me about PRICE or giving a DISCOUNT in the PRICE that is showed to costumers (I have never adjusted that, but I hope I can do this time).



phpMyAdmin - just a way to EXPORT table (one by one) to compare with other version and upload in 2.2.2 version.

Nothing else.



ADDON - Don't you think, if you want to pay, that is much better if you buy that software that costs 20 euros and try to make the job alone? (first post)

I explain: I think that like every NEW VERSION has something different inside tables (fields) it will not be very easy to make an ADDON that can work in all version (my example… I stop in 2.0.15 and I am going direct to 2.2.2).





I think that if you could export/import the category information along with all of the other information that you can already export/import, you could pretty easily do a manual upgrade



My opinion:

cscart_categories

cscart_category_descriptions



So, you have only 2 tables about CATEGORIES. It is very easy to import “CATEGORY” information from an old version to this new one (sure You can need to make some adjusts).



After this you can make everything by hands like I did (if you want). I tried to explain everything (inclusive problems) to make anyone who can need the same thing to MAKE A MANUAL UPGRADE.



But I think to make an UPGRADE, you need to do a lot of other things that are not ONLY PRODUCTS and CATEGORIES: you need to think about: MEMBERS (you can not lose people who really pay for your products), IMAGES, SHIPPING METHODS (people who are not from USA and CANADA usually need to ADAPT one), PAYMENT METHODS, SSL, NEWSLETTERS, AFILIATES, etc… etc.



I don't know, maybe I am wrong, but I think and upgrade process need to help MORE than just focus in PRODUCTS and CATEGORIES. (my opinion)



In spite of this, every time you wil make an upgrade you see problems (bugs) in server, in the new version, etc.



Now… 1h28am… need to stop.

See you!

IMAGES:



Basicaly I move data from tables

cscart_images

cscart_images_links



from 2.0.15 to 2.2.2

Theres is one more field in 2.0.15 version (alt), but if it is not in 2.2.2 means you do not need it.





I downloaded IMAGES directory from 2.0.15 version and upload in local IMAGES directory.



It is important write that it has some modifications like “thumbnail” does not work like in old version. Thumbnails stay inside PRODUCT/0 directory and DETAILED/0



So, you will need to insert inside 0 (zero) directory or you will not see any image.





After this I could see all images.



Happy, again!





I will think about NEXT WAR!

My next STEP, today, was the USERS tables:



cscart_users

cscart_user_data

cscart_user_profiles



I spent more time because I need to adjust data from 2 different versions data.



Not very easy to adjust some data because you need to be careful about the tables users and user_profiles.

Today I tried to adjust ORDERS from 2 old different cs-cart database versions, but the oldest one is not EXPORTING… I am having difficult to export

from database.

I tried to export in .XLS and SQL, but in SQL I get an error when trying to IMPORT the table.



ORDERS will give me more difficult that I planned.



----



SHIPPING:

I forgot the difficults I had first time I needed to configure SHIPPING settings.



I remembered about it here:

Shipping configuration - Configuration - CS-Cart Community Forums



And here:

CS-Cart Documentation — CS-Cart 4.15.x documentation



And here:

[quote]Unfortunately no shipping options are available for your location. Please contact us and we will see about delivering to you.[/quote]



CS-Cart Documentation — CS-Cart 4.15.x documentation





After some adjusts I could make it work.

So, at least one thing more today.



TOMORROW:

SKIN

ORDERS database

[quote name='dragondf' timestamp='1315965992' post='121603']

PROBLEM 2. Not possible to translate some words.

EVERYTHING INSIDE “ADJUSTS” MENU (Appearence, Company, Dynamic HTML, E-mails, General, Google Base, Image verification,… and Upgrade center) I CAN NOT TRANSLATE.

I start DESIGN MODE (Translation mode) and can change (translate) the word, but when I save it or do something else like a refresh in the page, the word go to the old language format (english).

[/quote]



Until now, I could not solve this problem about translation. I don't know why, it is not possible to translate this part of the admin panel.

ANY HELP?





---------

I spent a long time to adjust ORDERS, order_data, order_details

Sure the products from old database will be different (or equal) ids than actual database. This mean that I will not spend my time tring to move data from them to our new database. But, at least, you can see that SOMEONE bought $$ from you in a specific data. Not so good, but not so bad, too.





-------

PROBLEM:

I need to move SEO urls from last store (2.0.15) to the new store 2.2.2.

I see I can copy A TABLE called “cscart_seo_names” from the old to the new. But, I am having difficult to make MOD_REWRITE work in my server (local server).

I could see people is commenting one part of the code to adjust something, but this is not normal. I need to do something correct.



Usually .htaccess has something with this, but I don't know when you are inside a local server, because configuration must be the same.



----

SKIN:

I will try to adjust skin, today.

I hope in the next weekend I can adjust everything and put it to work.

PROBLEM 3



In home page, I can not see categories in the left column.



I tried to go to the BLOCKS, in the Admin Panel to see if there was something there blocking or not active. Everything looks like right.



WHAT CAN I DO TO MAKE IT APPEAR?





(in admin panel I added all categories to the left column)

[quote name=‘dragondf’ timestamp=‘1316813857’ post=‘122186’]

PROBLEM 3



In home page, I can not see categories in the left column.



I tried to go to the BLOCKS, in the Admin Panel to see if there was something there blocking or not active. Everything looks like right.



WHAT CAN I DO TO MAKE IT APPEAR?





(in admin panel I added all categories to the left column)

[/quote]



I solved this problem.

Carrying was manual, I changed to emenu and it is working fine, now.



:)



Only 2 other problems.