mfleeson Posted February 2, 2022 Share Posted February 2, 2022 38 minutes ago, mfleeson said: Word of warning, some of the fields in standard tables are much smaller than standard osCommerce. For instance moving orders data over customers_email_address is defined as varchar(96). If you get a failure in data porting check the sizing. Here's the SQL I used to ship over 18,000+ rows which failed the ajax data move. SELECT COUNT(*) FROM a_2017_ls_bak.orders; /*18530 rows */ SELECT COUNT(*) FROM orders; /*3832 rows after import using oscb */ DELETE FROM testls_osc4.orders; INSERT INTO `testls_osc4`.`orders` ( `orders_id`, `platform_id`, `department_id`, `customers_id`, `basket_id`, `customers_name`, `customers_firstname`, `customers_lastname`, `customers_company`, `customers_company_vat`, `customers_company_vat_status`, `customers_street_address`, `customers_suburb`, `customers_city`, `customers_postcode`, `customers_state`, `customers_country`, `customers_telephone`, `customers_email_address`, `customers_address_format_id`, `delivery_gender`, `delivery_name`, `delivery_firstname`, `delivery_lastname`, `delivery_company`, `delivery_street_address`, `delivery_suburb`, `delivery_city`, `delivery_postcode`, `delivery_state`, `delivery_country`, `delivery_email_address`, `delivery_telephone`, `delivery_company_vat`, `delivery_company_vat_status`, `delivery_address_format_id`, `delivery_address_book_id`, `billing_gender`, `billing_name`, `billing_firstname`, `billing_lastname`, `billing_company`, `billing_street_address`, `billing_suburb`, `billing_city`, `billing_postcode`, `billing_state`, `billing_country`, `billing_email_address`, `billing_telephone`, `billing_company_vat`, `billing_company_vat_status`, `billing_address_format_id`, `billing_address_book_id`, `payment_method`, `payment_info`, `cc_type`, `cc_owner`, `cc_number`, `cc_expires`, `cc_cvn`, `last_modified`, `date_purchased`, `orders_status`, `orders_date_finished`, `currency`, `currency_value`, `currency_value_default`,tracking_number, `parcel_label_pdf` ) SELECT `orders_id`, 1,0, `customers_id`, 0, `customers_name`,'','', `customers_company`, '', 0, `customers_street_address`, `customers_suburb`, `customers_city`, `customers_postcode`, `customers_state`, `customers_country`, `customers_telephone`, `customers_email_address`, `customers_address_format_id`, '', `delivery_name`, '','',`delivery_company`, `delivery_street_address`, `delivery_suburb`, `delivery_city`, LEFT(`delivery_postcode`,10), `delivery_state`, `delivery_country`, customers_email_address, customers_telephone, '', 0,`delivery_address_format_id`,0, '',`billing_name`,'','', `billing_company`, `billing_street_address`, `billing_suburb`, `billing_city`, LEFT(`billing_postcode`,10), `billing_state`, `billing_country`, customers_email_address, customers_telephone,'', 0, `billing_address_format_id`, 0, `payment_method`,'', `cc_type`, `cc_owner`, `cc_number`, `cc_expires`, '', `last_modified`, `date_purchased`, `orders_status`, `orders_date_finished`, `currency`, `currency_value`, NULL, '','' FROM `a_2017_ls_bak`.`orders`; SELECT * FROM a_2017_ls_bak.orders LIMIT 9603; SELECT COUNT(*) FROM a_2017_ls_bak.orders_products; /* 74153 */ SELECT COUNT(*) FROM orders_products; /*12994*/ DELETE FROM orders_products; INSERT INTO `testls_osc4`.`orders_products` ( `orders_products_id`, `orders_id`, `products_id`, `products_model`, `products_name`, `products_price`, `final_price`, `products_tax`, `products_quantity`,`sets_array`,`overwritten`,`elements`, `template_uprid`, `parent_product`,`sub_products`,`props`) SELECT `orders_products_id`, `orders_id`, `products_id`, `products_model`, `products_name`, `products_price`, `final_price`, `products_tax`, `products_quantity`,'','','','','','','' FROM `a_2017_ls_bak`.`orders_products`; SELECT COUNT(*) FROM a_2017_ls_bak.orders_products_attributes; /*2356*/ SELECT COUNT(*) FROM orders_products_attributes; /*3*/ DELETE FROM orders_products_attributes; INSERT INTO `testls_osc4`.`orders_products_attributes` ( `orders_products_attributes_id`, `orders_id`, `orders_products_id`, `products_options`, `products_options_values`, `options_values_price`, `price_prefix`, `products_options_id`, `products_options_values_id` ) SELECT `orders_products_attributes_id`, `orders_id`, `orders_products_id`, `products_options`, `products_options_values`, `options_values_price`, `price_prefix`, 0, 0 FROM `a_2017_ls_bak`.`orders_products_attributes`; SELECT COUNT(*) FROM a_2017_ls_bak.orders_products_download; /*3265*/ SELECT COUNT(*) FROM orders_products_download; /*0*/ DELETE FROM orders_products_download; INSERT INTO `testls_osc4`.`orders_products_download` ( `orders_products_download_id`, `orders_id`, `orders_products_id`, `orders_products_filename`, `download_maxdays`, `download_count`, `download_count_1`, `orders_products_name` ) SELECT `orders_products_download_id`, `orders_id`, `orders_products_id`, `orders_products_filename`, `download_maxdays`, `download_count`,0,'' FROM `a_2017_ls_bak`.`orders_products_download`; SELECT COUNT(*) FROM a_2017_ls_bak.orders_status_history; /*96519*/ SELECT COUNT(*) FROM orders_status_history; /*9889*/ DELETE FROM orders_status_history; INSERT INTO `testls_osc4`.`orders_status_history` ( `orders_status_history_id`, `orders_id`, `orders_status_id`, `date_added`, `customer_notified`, `comments`, `admin_id`, `smscomments` ) SELECT `orders_status_history_id`, `orders_id`, `orders_status_id`, `date_added`, `customer_notified`, `comments`,0,'' FROM `a_2017_ls_bak`.`orders_status_history`; SELECT COUNT(*) FROM a_2017_ls_bak.orders_total; /*53566*/ SELECT COUNT(*) FROM orders_total; /*12406*/ DESCRIBE orders_total; DELETE FROM orders_total; INSERT INTO `testls_osc4`.`orders_total` ( `orders_total_id`, `orders_id`, `title`, `text`, `value`, `class`, `sort_order`, `text_inc_tax`, `text_exc_tax`, `tax_class_id`, `value_inc_tax`, `value_exc_vat`, `is_removed`, `currency`, `currency_value`) SELECT `orders_total_id`, `orders_id`, `title`, `text`, `value`, `class`, `sort_order`,`text`,`text`,0,`value`,`value`,0,'GBP','1.000000' FROM `a_2017_ls_bak`.`orders_total`; Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 2, 2022 Share Posted February 2, 2022 Similar to @mfleeson (Hi!), I'm getting.. XML Error: memusage 14.000 MiB mempeakusage 14.000 MiB Mismatched tag at line 21 Done .. when attempting to import. I don't recognise that value at all, as I've set PHP memory to 256M. Quote Link to comment Share on other sites More sharing options...
zachris Posted February 2, 2022 Share Posted February 2, 2022 4 hours ago, zachris said: Is there a way to bypass certificate verfication? Found it! in lib/backend/web/index.php the environment is set to production (same setting in .../fontend/...): defined('YII_ENV') or define('YII_ENV', 'prod'); Changing this to: defined('YII_ENV') or define('YII_ENV', 'dev'); skips self-signed certificate verification. Now getting: XML Error: memusage 14.000 MiB mempeakusage 14.000 MiB Mismatched tag at line 25 Done Quote Link to comment Share on other sites More sharing options...
mfleeson Posted February 2, 2022 Share Posted February 2, 2022 1 hour ago, ejsolutions said: Similar to @mfleeson (Hi!), I'm getting.. XML Error: memusage 14.000 MiB mempeakusage 14.000 MiB Mismatched tag at line 21 Done .. when attempting to import. I don't recognise that value at all, as I've set PHP memory to 256M. Which item of data are you trying to import? Quote Link to comment Share on other sites More sharing options...
zachris Posted February 2, 2022 Share Posted February 2, 2022 3 minutes ago, mfleeson said: Which item of data are you trying to import? First I tried categories, then taxes. Same error. ejsolutions 1 Quote Link to comment Share on other sites More sharing options...
mfleeson Posted February 2, 2022 Share Posted February 2, 2022 How many categories do you have? Have you increased the PHP memory allocated on both the original install and on the Osc4 install? Quote Link to comment Share on other sites More sharing options...
zachris Posted February 2, 2022 Share Posted February 2, 2022 4 minutes ago, mfleeson said: How many categories do you have? Have you increased the PHP memory allocated on both the original install and on the Osc4 install? 47 categories and 2 languages. I'll debug the code later to figure out where the values come from. I think the file is: lib/backend/models/EP/Reader/XML.php Quote Link to comment Share on other sites More sharing options...
osCommerce-Official Posted February 2, 2022 Author Share Posted February 2, 2022 Where such issue occurs, could you please message us (don't post here!) your base URL and security key and we will try to debug? Thanks! Quote Link to comment Share on other sites More sharing options...
zachris Posted February 2, 2022 Share Posted February 2, 2022 43 minutes ago, osCommerce-Official said: Where such issue occurs, could you please message us (don't post here!) your base URL and security key and we will try to debug? Thanks! Sorry, this is my local environment. The error message is misleading. It just reports memory usage, when error occurs. For some reason the line 24 of my old Web shop page <head> is rejected: <meta name="keywords" content="my valid seo keywords in Finnish" /> Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 2, 2022 Share Posted February 2, 2022 (edited) I have the (bogus?) mempeakusage message for Brands,Categories etc. PHP memory limits are set for both new & old sites as 256M. If it is of any relevance the new site is running PHP 7.4 and the old PHP 5.3 - though given zachris is experiencing the same (bogus?) message, it doesn't seem relevant. Unfortunately, I don't wish to allow access to the data that I'm testing with - it's a client's data, not mine. At this rate (lack of true debug messages), I'm likely to try a custom database only migration but it'll depend on how the db is structured, plus methodology for storing images. I haven't had the time to explore that, yet - I'm midway migrating a key VPS. Is there a way to better log errors and/or a place to find them? Edited February 2, 2022 by ejsolutions Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted February 3, 2022 Share Posted February 3, 2022 19 hours ago, osCommerce-Official said: In this B2, two sales channels are installed by default. But you could try the following: 1. Go to the Sales Channels menu in the back end 2. Switch off the Watch channel 3. Switch off the Splash channel 4. Edit Furniture channel, change the URL to remove the suffix /furniture, and MAKE IT DEFAULT Let us know if it has worked! Will surely try as soon as my other problem of session expire and forbidden front-end gets solved..... Quote Link to comment Share on other sites More sharing options...
zachris Posted February 3, 2022 Share Posted February 3, 2022 I think I found the root cause for these odd errors. In my case the catalog folder resides in a subfolder . So, in my case the datasource base url must point to: https:///shop/oscb/index.php Instead of : https:///shop/index.php After fixing this I managed to import categories and taxes. osCommerce-Official and ejsolutions 2 Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 3, 2022 Share Posted February 3, 2022 9 minutes ago, zachris said: I think I found the root cause for these odd errors. Jeez, obvious when you think about it: how did I miss that?! 😳 Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 3, 2022 Share Posted February 3, 2022 25 minutes ago, zachris said: I think I found the root cause for these odd errors. Well, this was mad and only made a bit easier due to the flexibility of CWP. To be able to import, I needed to set different PHP versions at directory level. Docroot (public_html), new site = PHP7.4 catalog, old site = PHP5.3 catalog/oscb, importer = PHP7.4 Otherwise the importer throws up syntax errors. Hey, at least I'm moving forward: Brands = Row(s) Imported: 129 🙂 Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 3, 2022 Share Posted February 3, 2022 Now this is becoming interesting! 😄 I've managed to import all the data types, though it looks as though I'll need to extend timeouts for the number of products (stopped with Ajax error: Row(s) Imported: 1235). @osCommerce-Official can you provide some insight as to how category/product images are handled/imported? Due to the quantity of images, the original site has them stored in per Category subdirectories of images. I recognise that I'm likely to need to import them manually but some understanding of how they are mapped in the database, to physical files would be useful. To partially illustrate, here's an example of the one of current Categories: Stitch and Sew /Knit and Crochet /Yarn /DK Yarn Quote Link to comment Share on other sites More sharing options...
osCommerce-Official Posted February 3, 2022 Author Share Posted February 3, 2022 23 minutes ago, ejsolutions said: Now this is becoming interesting! 😄 I've managed to import all the data types, though it looks as though I'll need to extend timeouts for the number of products (stopped with Ajax error: Row(s) Imported: 1235). @osCommerce-Official can you provide some insight as to how category/product images are handled/imported? Due to the quantity of images, the original site has them stored in per Category subdirectories of images. I recognise that I'm likely to need to import them manually but some understanding of how they are mapped in the database, to physical files would be useful. To partially illustrate, here's an example of the one of current Categories: Stitch and Sew /Knit and Crochet /Yarn /DK Yarn It naturally looks like the scripts could not locate image files at the designated folders. Could you please check that Catalog URL and Dir FS URL are correctly specified in your old osCommerce configure.php? ejsolutions 1 Quote Link to comment Share on other sites More sharing options...
osCommerce-Official Posted February 3, 2022 Author Share Posted February 3, 2022 20 minutes ago, osCommerce-Official said: It naturally looks like the scripts could not locate image files at the designated folders. Could you please check that Catalog URL and Dir FS URL are correctly specified in your old osCommerce configure.php? It looks like /images/images_big/ prefix before product images needs to be somehow added to the URLs to make the script able to download product images. Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 3, 2022 Share Posted February 3, 2022 (edited) 13 minutes ago, osCommerce-Official said: It looks like /images/images_big/ prefix before product images needs to be somehow added to the URLs to make the script able to download product images. This seems likely. I'll investigate in a wee while: perhaps prefix it in the oscb configure.php, after the standard includes? Also, I've just increased the products_image to varchar(255) in the new database, to accommodate the image path, which appears to be getting populated as expected. BTW, are products limited to 6 extra images, or extendable? Just curiosity at this stage. Edited February 3, 2022 by ejsolutions Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 3, 2022 Share Posted February 3, 2022 (edited) I've tried this in oscb/compat/configure.php define('DIR_WS_IMAGES', 'images/images_big/'); define('DIR_FS_IMAGES', '/home/osc4osc/public_html/catalog/images/images_big/'); An example of what appears in images/products/missing_images.txt pid:11048:AncientWisdom/AW-BPAP05.jpg pid:11742:8Seasons/8S-B22974.jpg pid:11085:Craftime/Ct-AC9104X.jpg A quick check and /home/osc4osc/public_html/catalog/images/images_big/8Seasons/8S-B22974.jpg does indeed exist. In the new database products_image appears as 8Seasons/8S-B22974.jpg Edited February 3, 2022 by ejsolutions additional info Quote Link to comment Share on other sites More sharing options...
zachris Posted February 3, 2022 Share Posted February 3, 2022 Import of product options succeeded. When I try to import products, I get the following error: Trying to access array offset on value of type null Done In the lib/backend/runtime/logs/datasource.log I found the following: 2022-02-03 13:34:20 [192.168.0.227][-][-][info][datasource] [EP_CRON] Dir 20 re-add processed job OSCommerce_ImportProducts_2558 2022-02-03 13:41:35 [192.168.0.227][-][-][error][datasource] Job exception: Trying to access array offset on value of type null #0 /opt/lampp/htdocs/shop/lib/common/classes/TlErrorHandler.php(21): common\classes\TlErrorHandler->handleError(code: '2', message: ''Trying to acce...', file: ''/opt/lampp/htd...', line: '643') #1 /opt/lampp/htdocs/shop/lib/common/helpers/Attributes.php(643): common\classes\TlErrorHandler->handleError(code: '2', message: ''Trying to acce...', file: ''/opt/lampp/htd...', line: '643') #2 /opt/lampp/htdocs/shop/lib/common/api/models/XML/structure/products.php(221): common\helpers\Attributes::get_attributes_price(attributes_id: ''5115'', currency_id: '0', group_id: ''2'', default: ''0.000000'')''' I have no options prices. There are 2 customer groups in the db: Advanced and Basic, which were added during the installation. Should I remove those groups? ejsolutions and mfleeson 2 Quote Link to comment Share on other sites More sharing options...
ejsolutions Posted February 3, 2022 Share Posted February 3, 2022 2 minutes ago, zachris said: lib/backend/runtime/logs/ Thanks for this; a few logs that I can look at. mfleeson 1 Quote Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted February 3, 2022 Share Posted February 3, 2022 @osCommerce-Official Hello Vadym, Just an Idea, is it possible to include inside the tool menu, a log file menu, like that we can see all the errors ? I do not think it's inside the V4 in this moment ? Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
osCommerce-Official Posted February 3, 2022 Author Share Posted February 3, 2022 28 minutes ago, Gyakutsuki said: @osCommerce-Official Hello Vadym, Just an Idea, is it possible to include inside the tool menu, a log file menu, like that we can see all the errors ? I do not think it's inside the V4 in this moment ? Sure There's a placeholder for it already but it has not been done yet Gyakutsuki 1 Quote Link to comment Share on other sites More sharing options...
zachris Posted February 4, 2022 Share Posted February 4, 2022 Cannot delete customer groups. I'm stuck😥 Quote Link to comment Share on other sites More sharing options...
mfleeson Posted February 4, 2022 Share Posted February 4, 2022 Where is Royal Mail shipping? How can this be implemented. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.