I have also tried to double the model and id-colums, to change place of these columns and many other variables, but for some reason the manager doesn't see these two columns..
Printable View
I have also tried to double the model and id-colums, to change place of these columns and many other variables, but for some reason the manager doesn't see these two columns..
Could it maybe has something to do with this? (when I try to make a new template, the two missing columns are already there and cannot being moved). I have the impression that the manager sees only the manually attached template fiels, not the two that are already there, because these two columns are missing.....
Attachment 17327
When you are performing a product insert, the v_products_model column is what DbIo uses to determine that the product is new. The products_id values are automatically calculated by the database; you have no control over those for a product insert/create operation.
Nope, when you create a DbIo template, there are sometimes (like for the Products handler) database fields that are required. The Products handler requires that the v_products_id and v_products_model fields both be present in the import ... even though (as you found) the v_products_id value has no bearing when the product is being created.
You'll need to keep the v_products_id column (set that value for new products to 0) and supply a unique v_products_model value for a new product to be created.
When creating a new product, you'll also want to make sure that you have the v_categories_name column set to identify the category "tree" associated with the to-be-added product's master-category.
When you're performing any kind of import, I suggest that you first perform an Import (Check-only) first. That processing will do every step of the import ... except that the database is not updated. You can then see what will happen before actually committing the information to your database.
Once the import is finished, a link shows next to the action-selection dropdown that reads View import details; click that link and a popup will display showing you the status of that import.
After you've verified your import-csv using Import (Check-only), that's the time to use Import (Full) which will actually write the requested information to your database.
thank you very much,
I will try that out now :)
Hi lat9,
I have tried that out:
Attachment 17328
But I still receive the same error message about the missing columns..
Foutmelding The current import-file is missing these (v_products_id, v_products_model) required columns; the import is disallowed.
PM sent.
It turns out that the message that @LadyoftheCave was receiving was because the import CSV file was using a semi-colon (;) instead of the more traditional comma (,) as the field delimiter.
Updating the DbIo's Configuration->DbIo Manager Settings->CSV Delimiter to ; allows the import to proceed without error.
Hello.
Zen Cart 1.5.5.e, DBIO 1.3.0
Ive got 2 issues :
1. When importing products, where i have got 2 duplicate products (same v_products_model id), i receive sql error
it seems that $products_id variable is not set.Code:[02-Oct-2017 17:13:58 Europe/Warsaw] Request URI: /Benek/dbio_manager.php?action=file, IP address: 188.146.34.65
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/Benek/includes/classes/dbio/DbIoProductsHandler.php:571]
#5 DbIoProductsHandler->importUpdateRecordKey() called at [/Benek/includes/classes/dbio/DbIoHandler.php:905]
#6 DbIoHandler->importCsvRecord() called at [/Benek/includes/classes/dbio/DbIo.php:250]
#7 DbIo->dbioImport() called at [/Benek/dbio_manager.php:223]
[02-Oct-2017 17:13:58 Europe/Warsaw] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 5)' at line 4 :: INSERT IGNORE INTO zen_products_to_categories
(products_id, categories_id)
VALUES
( , 5) ==> (as called by) /Benek/includes/classes/dbio/DbIoProductsHandler.php on line 571 <== in /includes/classes/db/mysql/query_factory.php on line 167
I made a simple workaround to avoid this error (but i think you have to solve this better ) in dbioProductsHandelr.php line about 564
Second issue :Code:if ($table_name == TABLE_PRODUCTS_TO_CATEGORIES) {
if ($this->operation != 'check') {
if ( $products_id != '')
$db->Execute(
"INSERT IGNORE into $table_name
(products_id, categories_id)
VALUES
I put wrong master category path (ia cat_main^subcat1^subcat2) in my import file, after importing all the rows i changed master category path to be correct. But after "update" import the category didnt changed (no change in products_master_categories_id and no change in products_to_categories table)
Is there any way (becaouse there is no Category handler) to update this field and the products_to_categoies table ?
Regards
Marek.
Marek, for the first issue: If your import includes a product duplication, i.e. same products_id/products_model value, and the product does not currently exist, what should happen is that the product is created by the first record imported and then updated by the second.
Either way, DbIo shouldn't be throwing that SQL error and I'll look into this to replicate and correct.
I'll also investigate and report back what's going on with the category-update processing.
Correction now available on the plugin's GitHub repository, see this GitHub issue for details; the next release of DbIo will include the corrected processing.
I've just submitted v1.3.1 of the DbIo to the Zen Cart plugins for review; once available, it can be downloaded here: https://www.zen-cart.com/downloads.php?do=file&id=2091.
This version contains corrections for the following issues, identified by their GitHub issue number:
#103: Ensure writability of DbIo output directories
#105: (Products) Duplicate records on initial import result in debug log.
#106: (Products/Orders) Customized export can result in incorrect field values.
#107: (Products) Import/update doesn't update master-categories id.
#108: Initialization error on export doesn't display reason to admin.
I'll post back here once it's available for download.
Hi all,
I have a question, since a while I am importing new products through dbio manager. The problem with it, is that I have to come up with a new modelnumber for every new product. if i use accidentally the same modelnumber then the product will be overwritten. It takes a lot of time to open every file to get rid of the modelnumbers.
At this moment, I go to the category where I want to add new products, and then I copy one product 10-20 times, and then I use the productnumbers of these new items in the dbio-csv file, then I do not need to add a modelnumber But this also takes a lot of time..
Attachment 17357
Is there a way adding new products without this modelnumber?
Not currently; but I might have an idea for providing this functionality.
What if I added another command to the DbIo: ADD? That way, if you are importing a bunch of new products, you'd simply include the v_dbio_command column and specify ADD in that column for any product that wants to be added without regard to model-number duplication.
that sounds great :)
I want to upgrade from version 1.2.1 to version 1.3.1 but the readme file does not have an upgrade section. Since the plugin causes the script to run once you click the admin, I am a bit worried about just overwriting files. Don't want to break anything by just replacing older files with new ones. Can someone please explain how to upgrade from v1.2.1 to v1.3.0 which I just downloaded? I am now running zen cart v1.5.5e.
Also, did any of the the import/export tables or fields change? My client is currently using this, so if any of the structures change it would be beneficial to know up front so I can advise the client.
Since there are neither core-file nor template-override changes in the plugin, the upgrade path is just to refresh the various modules provided by the plugin's new release.
There are no hard-coded fields within the processing, the DbIo recognizes your store's database layout and provides access to all existing fields. The plugin's installation, on upgrade, simply updates its configuration ... at a minimum to reflect the current version installed.
Thank you for your help lat9!
No problem, I totally understand, take your time :)
Best Regards,
I just downloaded Database I/O Manager. I installed it on a fresh copy of ZC with the sample products.
I exported a test CSV file with the “products” handler and then imported it to an Excel file (easier to read).
I’m sure that this is a really stupid question but I still need to ask,:blush:
1) When creating the Excel file to convert to CSV when adding products, I use the exact headings like v_products_id, v_products_type, etc,etc?
2) In the “v_categories_name” all I have to do is use the “^” symbol to separate from sub-categories like
Main-cat^sub-cat1 or Main-cat^sub-cat1 ^sub-cat2?
3)Does this process have to be repeated for adding attributes(provided they already exist) using a different handler/separate CSV file?
Hi,
Complete Zen Cart newbie here, using v1.5.1
Had to take over a ZC installation from an IT guy that died.
Trying to install Dblo.
The installation instructions seem to say that I can install from the Admin panel, i.e. ******.com/build. If so, I haven't been able to find where to do this.
Any help or correct info would be appreciated.
Greg
There are two steps to the DbIo installation:
- Copying the files from the plugin's unzipped distribution to your site's /admin directory (which you'd do via FTP, preferably, or your site's cPanel File Manager).
- Accessing your Zen Cart admin-panel, which then causes the uploaded code to add configuration values to your store's database.
Once it's installed and configured, it's ready to use.
Vinos de Fruitas Tropicales web site says that the current version of dbio is 1.4.0, but the download link continues to download dbio-1.3.1.zip
I've just submitted v1.4.1 of the DbIo to the Zen Cart plugins for review. This release includes changes associated with the following GitHub issues:
#110: Load jQuery if the Zen Cart version is less than 1.5.5a.
#111: Correct customized exports returning "too much information".
#112: Enable an export to return multiple .csv records for a database record.
#114: Enable nullable fields to be set to "NULL".
#115: Provide fall-back for hosted sites that don't include 'php-mbstring'.
I'll post back here once the update has been approved.
v1.4.1 is now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=2091
hi,
After installing the latest version in the Plugins section in a test site I have, using ZC 1.5.5a, I was trying to upload my products from my live site, so I created an output file with the old version 1.0.0.1, the one in the test site is 1.4.1, as the interface has significant changes, I was hoping my exported file dbio.Products.x was readable by the new version but then I had an error message saying v_products_id wasn't found, which is weird because I usually use the app to export my products as a csv and then open the files in Excel and the column isn't there so it seems the new version can't read an old version export file, what can I do? I thought, it will be useful if I could use the export file as it's a real time saver.
ok hope that works
Nicely done as usual, Cindy. Any chance you could build a handler with both Customer data and the primary entry from address book so we could get an address too? Thanks again for this mod.
Thanks, Scott! I've noted your request as a DbIo GitHub issue: https://github.com/lat9/dbio/issues/118 and should have some traction on this in a week or so.
I'm testing the newest version on a near vanilla install of ZC 1.5.5f, I said "near", because what I've already installed is a custom template, that's it nothing else and now dbio 1.4.1
I had dbio running for a long time in my live 1.5.3 store, and without problems, well the new version is not working with my export files, I have files with 19,000 products that were handled fast and efficiently by the old dbio 1.1 but this new version gets stuck, as suggested I manually added the "v_products_id" column, and now the 10Mb file that works fine in the old ZC seems to get stuck at 33%, I checked the logs and nothing is there!!! So please tell me how to fix this as I am in the process of migrating my old 1.5.3 store into a new 1.5.5f
One of the things that was added to the ProductsHandler from DbIo 1.1.0 to 1.4.1 was the addition of a configuration setting Products: Auto-Create Categories on Import?, which defaults to No.
What is your setting for the DbIo "Max Execution Time"? I've reviewed the changes from 1.1.0 to 1.4.1 and don't see anything that "stands out" as possibly causing the issue that you're having.
If it's possible for you to zip-up that import file, let me know and I'll send you my direct email so that I can see for myself what is going on.
Well it was a nightmare uploading it into my server because I had to use cpanel, while the older version never got stuck ... can you tell me what's the best php.ini settings for your app to upload files between 10 and 20Mb? I went to the settings and set max upload size to 500Mb, and timeout to 600 secs which is crazy I know ...
So my guess is when I set up PHP 7.x something messed up the configuration of that particular php.ini ...
So, you're having issues uploading a .CSV file after the upgrade, too? Are you able to upload large-size image files for products using Catalog->Categories / Products? I ask because that uses the same built-in upload class for its handling.
A couple of php.ini settings that would apply are and file_uploads and upload_max_filesize. What version of PHP is the store running on?
Is it possible for me to call dbio from another program? "Hey, DBIO: Import this products file" is what I'd like to do, without the user having to go dbio, select products, and use the import form.
I am having this same problem with Zencart 1.5.5f and dbio 1.4.1. I found where this person was having this problem but I can find no fix for it. How can this be fixed? I export my products and get the error even when I try to import it back into my original database.
Thanks
This is tab delimited.
Code:"v_products_id"t"v_products_type"t"v_products_quantity"t"v_products_model"t"v_products_image"t"v_products_price"t"v_products_virtual"t"v_products_date_added"t"v_products_last_modified"t"v_products_date_available"t"v_products_weight"t"v_products_status"t"v_products_ordered"t"v_products_quantity_order_min"t"v_products_quantity_order_units"t"v_products_priced_by_attribute"t"v_product_is_free"t"v_product_is_call"t"v_products_quantity_mixed"t"v_product_is_always_free_shipping"t"v_products_qty_box_status"t"v_products_quantity_order_max"t"v_products_sort_order"t"v_products_discount_type"t"v_products_discount_type_from"t"v_products_price_sorter"t"v_products_mixed_discount_quantity"t"v_metatags_title_status"t"v_metatags_products_name_status"t"v_metatags_model_status"t"v_metatags_price_status"t"v_metatags_title_tagline_status"t"v_products_name_en"t"v_products_description_en"t"v_products_url_en"t"v_products_viewed_en"t"v_manufacturers_name"t"v_tax_class_title"t"v_categories_name"tv_dbio_command
1t1t10tAS08thydroforce/as08_lg.jpgt169.00t0t"2012-05-19 20:24:27"t"2015-05-13 19:33:31"t"0001-01-01 00:00:00"t10t1t0t1t1t0t0t0t1t0t1t0t0t0t0t169.00t0t0t0t0t0t0t"HydroForce Sprayer"t"The Original HydroForce High-Pressure (100-1000 psi) Injection Sprayer!<br /><br />
Over 20,000 professional carpet cleaners can't be wrong. The amazing
HydroForce connects to your pressure line and automatically draws
concentrate from the 5-quart container to achieve your desired dilution
ratio. Use for carpet pre-sprays, deodorizers, protectors, dying, etc.<br /><br />
HEAVY-DUTY STAINLESS STEEL EXTENSION AND GUN -
VIRTUALLY INDESTRUCTIBLE!<br /><br />Benefits:<ul style=""margin-top: 0px;""><li>NEW, patent-pending container design makes the Hydro-Force sprayer the most convenient sprayer on the market.</li><li>Large side-fill port - refill without removing the injector assembly</li><li>Wand holder to keep your wand off your customer's floor</li><li>Recessed handle - no more annoying velcro straps</li><li>Operating pressure range of 100-1,000 PSI</li><li>Eliminates annoying mixing required by pump up sprayers</li><li>High-quality quick connects allow your gun to swivel and permits quick removal</li></ul><br />"tt1382tHydro-Forcet"Taxable Goods"tAccessories
This may be a better sample.
ThanksCode:v_products_id v_products_type v_products_quantity v_products_model v_products_image v_products_price v_products_virtual v_products_date_added v_products_last_modified v_products_date_available v_products_weight v_products_status v_products_ordered v_products_quantity_order_min v_products_quantity_order_units v_products_priced_by_attribute v_product_is_free v_product_is_call v_products_quantity_mixed v_product_is_always_free_shipping v_products_qty_box_status v_products_quantity_order_max v_products_sort_order v_products_discount_type v_products_discount_type_from v_products_price_sorter v_products_mixed_discount_quantity v_metatags_title_status v_metatags_products_name_status v_metatags_model_status v_metatags_price_status v_metatags_title_tagline_status v_products_name_en v_products_description_en v_products_url_en v_products_viewed_en v_manufacturers_name v_tax_class_title v_categories_name v_dbio_command
1 1 10 AS08 hydroforce/as08_lg.jpg 169.00 0 "2012-05-19 20:24:27" "2015-05-13 19:33:31" "0001-01-01 00:00:00" 10 1 0 1 1 0 0 0 1 0 1 0 0 0 0 169.00 0 0 0 0 0 0 "HydroForce Sprayer" "The Original HydroForce High-Pressure (100-1000 psi) Injection Sprayer!<br /><br />
Hmm, try deleting the header-column named v_dbio_command; I'm guessing that that's the extra column.
What program do you use to edit those CSV files for import?
I've just submitted v1.5.0 of the Database I/O Manager to the Zen Cart plugins for review and will post back here once it's available.
This release contains the changes associated with the following GitHub issues:
#117: Correct multi-language customized "Products" export field-ordering.
#118: Add customers' default address information to the "Customers" export.
#119: Add a handler to import/export the "Products Discount Quantity" information.
#120: Correct exports for handlers that support a 'dbio_command'.
v1.5.0 is now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=2091
1.5.5e PHP 5.6 -- More of a procedural question.
Scenario: Site sells bottles of vinegar. Available in singles, three-, six-, and twelve-packs. Naturally, the Option Name is set to Bottle 1 thru Bottle 12 and the appropriate number added to the respective product. The vinegar names are the Option Values for each Bottle so the Values are listed a total of twelve times.
All is well until two flavors are discontinued and six flavors are added.
I assume (I know) that simply deleting the discontinued flavors could munge the order history. Leaving them there is no problem.
The fun comes in getting the extra values into the options since the options and values tables are not directly tied to each other.
Do you have a suggested process order to accomplish this?
THANX
@dbltoe, I'd start by adding those additional option values via the DbIoProductsOptionsValuesHandler.
Once those option-values are in the database (so that you've got products_options_values_id's for them, I'd the DbIoProductsAttributesRawHandler to add those option/option-value pairs to the various products.
Note that neither of the attribute-related handlers currently support a removal. I've created a GitHub issue to remind me of your request.
Thanx Cindy,
Sorry for the late response. Day five today of my nursing duties with wife's new knee. Will do some more when she's on the "rack" again.
Did the add first. Was just wondering if there was a mid-step before Raw.
As to deleting info. I've never been a fan of deleting anything that goes with an order in any way. History can be very helpful, but not so much if part of the data is non-existant. Doubt I would ever use the delete function other than deleting the attribute from the current product. For me, Name and Value would remain forever whether tied to a current product or not.
Hello
I am exporting from v.1.5.0 and importing to v.1.5.5
Apparently this is not possible since all I get is "was completed with 9041 errors and 0 warnings. 0 records were inserted or updated."
Log file looks like this:
Operation:import-en-check
Records Read:9042
Records Inserted:0
Records Updated:0
Warnings:0
Errors:9041
Parse Time:20.172164916992
The following warnings/errors were generated by the above action:
Unrecognized command (WWII US) found at line #2; the operation was not performed.
Unrecognized command (WWI US) found at line #3; the operation was not performed.
Unrecognized command (WWII GERMAN) found at line #4; the operation was not performed.
The CSV looks fine. I tried splitting, etc. No help. I have wasted my day trying to get this tool to load data.
Of course, when I do an export and then immediately import the same file it fails with the same message.'
Did I get a bad build? Am I supposed to add INSERT statements to the CSV?
Why is there no explanation of HOW to use this tool? All I see is organization information.
All I can do is assume that exporting products into a csv would be followed by importing them. That's logic, but in this case it fails miserably.
Not sure how to proceed. Docs gives no clue on how to typically operate this tool.
If you are actually upgrading from 1.5.0 to 1.5.5, there's a better way to accomplish the task. https://www.zen-cart.com/entry.php?3...d-of-upgrading.
Cindy's mod is great, but the upgrade steps are more thorough and accurate in the case of an upgrade.
IF NOT an upgrade, perhaps you are looking at databases with conflicting character sets. If all are not "on the same page", it could be part of the problem.
No. When I installed Easy Populate I was able to move the data in about a minute.
I believe Cindy's mod does not work at all. I strongly recommend Easy Populate for actually moving data.
You haven't identified the version of DbIo that you had issues with, nor did you post a couple of the problematic rows of the exported CSV.
I can assure you that the plugin does work, but you might have discovered a store-specific issue that could have been corrected.
net3431: posts 24, plugins 0
lat9: posts 7859, plugins 64
So the possibility of user error here would be unthinkable? No, it must be sloppy code, of course.
@net3431
You are using the tool in a situation that is not common as it is not only not recommended, it is WRONG. You don't upgrade by importing data.
Your arrogance is exemplary...in the sense of a good example of how not to get any (free) help.
Indeed, "the tool doesn't work" could indeed be applied to your posts, but not in the sense you mean it.
I was not interested in making DbIo work. I was interested in moving data. I suppose DbIo does something. It just doesn't import data.
That makes the tool useless as far as I am concerned. I incidentally spent some time trying to figure out just what it did do, but I was not successful in that endeavor. I did however, discover Easy Populate, which immediately worked for the use that it was designed.
Arrogance comes in many forms. Mine is concerned with the job of my employer. Yours seems to be an attempt to rehabilitate DbIo, a plugin which remains a mystery. Nothing in the above responses indicates what this tool is supposed to do. My complaint contains facts, actual error content. Your response contains ad hominems and smug, empty assurances.
In any case, my problem was resolved in seconds. Your problem will in all likelihood remain with you as long as you keep struggling with DbIo.
I've just submitted v1.5.1 of the DbIo to the Zen Cart plugins for review. This version corrects the GitHub issue #123 ("Products" export can't be imported).
I'll post back here once it's available for download.
ZC v1.5.6 / dbio-1.5.1
Created single product used to export.
Products Import - Shows No Errors.
Zen Cart shows # of products in respective categories BUT no products actually listed within said categories.
Looking at DB - it writes to "products" and "products_to_categories" but it is not writing to the "products_description" table.
Also I tried EXPORT - ALL again but it still only shows the manually created product.
@FlipC, I've loaded DbIo on a fresh zc156 installation, performed a products' export (to get the headers). Removed all pre-existing products, entered a new product with the v_dbio_command of ALL and imported.
The product was created in the database.
So, there's (obviously) something different between my installation of DbIo and yours. I've used the default settings, just changing the CSV: Encoding to latin1 (since I use MS-Excel). My DB_CHARSET is utf8 and my CHARSET is utf-8 and it's a single-language 'store'.
Would you post a screenshot of the 'Configuration' settings, shown to the right on the Tools->Database I/O Manager page and also attach a copy of the product-import that you're using?
Attached the pic.
I use Open Office and save as UTF8.
Can you post the import file so I can check if mine has any differences?
Something you wrote just caught my eye
"entered a new product with the v_dbio_command". The v_ there makes me think the CSV file is meant to have a column v_dbio_command with a set control in it. Like 1/0. Want to make sure you just mean the DBio Import tool? Tools> Database IO Manager. Choose Products. Upload CSV file. Choose file then action and Go?
Here's a contents of the 1 product .csv file that I used to successfully add another demo product to my test version of zc156.
Code:v_products_id,v_products_type,v_products_quantity,v_products_model,v_products_image,v_products_price,v_products_virtual,v_products_date_added,v_products_last_modified,v_products_date_available,v_products_weight,v_products_status,v_products_ordered,v_products_quantity_order_min,v_products_quantity_order_units,v_products_priced_by_attribute,v_product_is_free,v_product_is_call,v_products_quantity_mixed,v_product_is_always_free_shipping,v_products_qty_box_status,v_products_quantity_order_max,v_products_sort_order,v_products_discount_type,v_products_discount_type_from,v_products_price_sorter,v_products_mixed_discount_quantity,v_metatags_title_status,v_metatags_products_name_status,v_metatags_model_status,v_metatags_price_status,v_metatags_title_tagline_status,v_products_name_en,v_products_description_en,v_products_url_en,v_products_viewed_en,v_manufacturers_name,v_tax_class_title,v_categories_name,v_dbio_command
0,1,31,MG200MMS-3,matrox/mg200mms.gif,299.99,0,11/3/2003 12:32,4/26/2004 23:57,,23,1,1,1,1,0,0,0,0,0,1,0,0,0,0,299.99,1,0,0,0,0,0,Matrox G200 MMS (added),"Reinforcing its position as a multi-monitor trailblazer, Matrox Graphics Inc. has once again developed the most flexible and highly advanced solution in the industry. Introducing the new Matrox G200 Multi-Monitor Series; the first graphics card ever to support up to four DVI digital flat panel displays on a single 8" PCI board.<br /><br />With continuing demand for digital flat panels in the financial workplace, the Matrox G200 MMS is the ultimate in flexible solutions. The Matrox G200 MMS also supports the new digital video interface (DVI) created by the Digital Display Working Group (DDWG) designed to ease the adoption of digital flat panels. Other configurations include composite video capture ability and onboard TV tuner, making the Matrox G200 MMS the complete solution for business needs.<br /><br />Based on the award-winning MGA-G200 graphics chip, the Matrox G200 Multi-Monitor Series provides superior 2D/3D graphics acceleration to meet the demanding needs of business applications such as real-time stock quotes (Versus), live video feeds (Reuters & Bloombergs), multiple windows applications, word processing, spreadsheets and CAD.",www.matrox.com/mga/products/g200_mms/home.cfm,0,Matrox,Taxable Goods,Hardware^Graphics Cards,ADD
Got it working.
So it was the fact that I was missing the column v_dbio_command with ADD.
I did not come across this anywhere. Is there a list of commands/columns for Dbio?
Like can/does one put UPDATE in that column to update product info?
It's a bit hidden in the DbIo's 60kB readme, but here's a link to the significant bits: https://vinosdefrutastropicales.com/....html#handlers
Thanks.
Will re-read the read me and everything on that link.
My quick perusal of the support thread didn't find an answer.
If I missed it in the readme, just tell me that I need to do a better job of reading.
zc156a vanilla install
drop db tables and import from backup of live db
run db cleanup from phmmyadmin
run zc install
setup shipping and payment modules
install zca_bootstrap
install dbio-1.5.1
Go to Admin: Tools: Database I/O manager and get red error
The DbIo Manager does not support your installation, due to a mismatch between your DB_CHARSET (utf8mb4) and CHARSET (utf-8) values.
Probably over my head, but is this a db server setup, not a zc database setup? Scares the crap out of me to go mucking around the db server unsupervised. :-)
All the db tables show utf8_general_ci for the collation & MyISAM for type
I had the feeling that that new DB_CHARSET value was going to cause a problem. I'll get a 1.5.2 release going; GitHub issue created: https://github.com/lat9/dbio/issues/124
Thank you Cindy
Just installed the git version.
Export products
Edit the price on 2 or 3 products
SaveAs csv
Import (FULL) csv just to see how things worked.
The prices were updated.
Top of the screen had a message:
The error file is a bit over a MB and 2681 rows tallQuote:
The DbIo import from file "/home/cPanel/public_html/156/MyAdminFolder/dbio/dbio.Products.01242019.csv" was completed with 5 errors and 540 warnings. 534 records were inserted or updated.
Using Excel Version1812 (Build 11126.202666 CTR) Changed csv encoding to latin1
There's a lot of these
Most of our weights use decimal tenth pounds. There are quite a few products that use decimal pound but the weight is in a format 0.200000003 pounds from USPS shipping mod from years past. Weight field in db is Double. The extra precision is no longer being used but the weights have never been edited back to single tenth digits.Code:2019-01-24 14:47:09: [*] products.products_weight, line#3: The value (0.1) exceeds the field's maximum length (); the value will be truncated.
Did I foul things up?
I call myself reading the instructions but could be a user, short circuit between the ears.
OR is a log file generated for each import?
Hmm, I'll need to check that weight-related warning out. In a "standard" Zen Cart database, that products::products_weight field is a float; is that the case for yours (before I head down a rabbit-hole)?
FWIW, I just did a test import on a product with a weight of 0.1 and that value was accepted, so there's something different about how your store's products' weights are set in the database.
Let's not go down any rabbithole
Back in the zc138a days, maybe 139, there was a USPS module that used double to allow extra digits in the weight field. Those extra digits out in far right places to embed product volume in cubic inches. Unique way of handling the volume of product that could be put into USPS flatrate boxes and disable the USPS FR box size if the products being purchased would not fit. It is no longer used but db field sort of abandoned in place. I wouldn't think that restoring the db back to original field would be a problem if that is the root cause of headache.
products:products_weight field is DOUBLE
Rick, I believe I see the issue. DbIo isn't recognizing that double field-type. Could/would you make the following modification to /admin/includes/classes/dbio/DbIoHandler.php's importGetHeader method?
Find this section:
... adding the highlighted line. Does that correct your issue?Code:$field_type = false;
if (isset($this->tables[$table_name]) && isset($this->tables[$table_name]['fields'][$current_field])) {
$valid_string_field = false;
switch ($this->tables[$table_name]['fields'][$current_field]['data_type']) {
case 'int':
case 'smallint':
case 'mediumint':
case 'bigint':
case 'tinyint':
$field_type = 'integer';
break;
case 'float':
case 'decimal':
case 'double':
$field_type = 'float';
break;
case 'date':
case 'datetime':
$field_type = $this->tables[$table_name]['fields'][$current_field]['data_type'];
break;
case 'char':
case 'text':
case 'varchar':
case 'mediumtext':
$valid_string_field = true; //-Indicate that a value string-type field was found and fall through to common processing
default:
$field_type = 'string';
if (!$valid_string_field) {
$message = "Unknown datatype (" . $this->tables[$table_name]['fields'][$current_field]['data_type'] . ") for $table_name::$current_field on line #" . $this->stats['record_count'];
$this->debugMessage("[*] importGetHeader: $message", self::DBIO_WARNING);
}
break;
}
}
YES, it does. Thank you. Is this change going to be incorporated into future updates? Customizations that do not make it into permanent updates get me in trouble down the road.
It also helps when you use some of the onscreen help.
First pass, logfile generated with the onscreen note of 5 errors.
I couldn't find anything in the logfile that looked like an error or had the word error associated.
Then, I saw the "View Import Details" button. that showed the 5 errors. All were due to sort order value not being an integer. Somehow, over the years a sort order value of -1 had crept into the mix. Edit those to an integer and no errors.
One question though,
The ViewImportDetails seems to have a hiccup. I edited the csv to be imported to fix the non-integer, renamed the file, imported, click "ViewImportDetails" and the screen is unchanged. Message for the last file imported but I have imported another file during the same admin session.
Then I deleted the first import file that had the -1 sort orders so the only import file was the one generated today. Click the button again and it still shows the message for the file that has been deleted.
:censored:, same issue as the DbIo Manager; I'll have the correction pushed shortly.
Shortly is now; see the GitHub repository for the change to /YOUR_ADMIN/dbio_customize.php.
Thank you. It wasn't critical to me for you to drop what you were doing. It's almost beer-thirty on a Friday.
Just downloaded this and there's readme file but it's an md file I cannot open. I searched this thread but didn't see a reply on where to find the instructions for uploading it. Is there a text file or similar that I can read? Thanks.
docs folder => dbio folder => README.html
... and the online version is available here: https://vinosdefrutastropicales.com/...io/readme.html
You guys are awesome. Thank you lat9 and RixStix Cheers!