Is there a way to use dbio product handler to move products to new categories? I tried just changing the v_products_categories column to the new category but it doesn't do anything.
Printable View
Is there a way to use dbio product handler to move products to new categories? I tried just changing the v_products_categories column to the new category but it doesn't do anything.
There's a fairly long-standing change request (https://github.com/lat9/dbio/issues/135) for this feature. I'll see what I can do to fulfill the request in the next DbIo release.
Working in our sandbox to make sure things function as I understand them.
I have POSM installed but assume this export/import is unrelated.
I am using MSFT Excel csv
dbio csv encoding set to latin1
I can see in the debug the attribute causing the issue but anything else is greek to me. I would assume what is exported can be imported without a hiccup but obviously not the case.
Exported filename dbio.ProductsAttribsBasic.20200513-192105-297090
Made a couple edits just to make sure things worked.
Imported file
Admin BLANK page
Aww shucks
Exported filename dbio.ProductsAttribsBasic.20200513-192704-96723
Made NO changes
Imported file
Admin BLANK page
myDEBUG
Code:[13-May-2020 19:27:35 UTC] Request URI: /ADMINFOLDER/dbio_manager.php?action=file, IP address: 98.146.164.107
#1 trigger_error() called at [/home/srevcinf/public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/srevcinf/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/srevcinf/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/srevcinf/public_html/ADMINFOLDER/includes/classes/dbio/DbIoProductsAttribsBasicHandler.php:216]
#5 DbIoProductsAttribsBasicHandler->importFinishProcessing() called at [/home/srevcinf/public_html/ADMINFOLDER/includes/classes/dbio/DbIoHandler.php:906]
#6 DbIoHandler->importCsvRecord() called at [/home/srevcinf/public_html/ADMINFOLDER/includes/classes/dbio/DbIo.php:265]
#7 DbIo->dbioImport() called at [/home/srevcinf/public_html/ADMINFOLDER/dbio_manager.php:240]
--> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's Pak', 'None')
AND pov.language_id = 1
' at line 3 :: SELECT pov.products_options_values_id, pov.products_options_values_name
FROM products_options_values pov, products_options_values_to_products_options pov2po
WHERE pov.products_options_values_name IN ('16awg JPL-3 Learner's Pak', 'None')
AND pov.language_id = 1
AND pov.products_options_values_id = pov2po.products_options_values_id
AND pov2po.products_options_id = 36 ==> (as called by) /home/srevcinf/public_html/ADMINFOLDER/includes/classes/dbio/DbIoProductsAttribsBasicHandler.php on line 216 <== in /home/srevcinf/public_html/includes/classes/db/mysql/query_factory.php on line 171.
Rick, that's a flaw in the ProductsAttribsBasicHandler, no relation to POSM. I've opened this DbIo GitHub issue to track the required change.
Database I/O (DbIo) Manager v1.6.1 (2020-02-12)
Not losing sleep of this, so no rush. I have other things to address.
Live Site:
File export: ProductsAttribsRaw
Import same file before any edit. (511KB)
The reason for export/import without edits is that when I did make a single line insertion, there were errors
dbio logfile is over 900,000 lines long and over 41MB. All I see there is 'ant-races'
Looking at line number 73 in the export/import file.... it is essentially the same as other lines of the similar items.
Code:Statistics for the last file imported in the current admin session:
- Import File Name:/home/chainwea/public_html/MYADMINFOLDER/dbio/dbio.ProductsAttribsRaw.20200518-092909-559660.csv
- Operation:import-en-check
- Records Read:3555
- Records Inserted:0
- Records Updated:3553
- Warnings:0
- Errors:18
- Parse Time:9.8524129390717
The following warnings/errors were generated by the above action:
✗ products_attributes.options_values_id, line #73: Value () is not an integer
✗ products_attributes.options_values_price, line #73: Value () is not a floating-point value.
✗ products_attributes.product_attribute_is_free, line #73: Value () is not an integer
✗ products_attributes.products_attributes_weight, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_display_only, line #73: Value () is not an integer
✗ products_attributes.attributes_default, line #73: Value () is not an integer
✗ products_attributes.attributes_discounted, line #73: Value () is not an integer
✗ products_attributes.attributes_price_base_included, line #73: Value () is not an integer
✗ products_attributes.attributes_price_onetime, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_factor, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_factor_offset, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_factor_onetime, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_factor_onetime_offset, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_words, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_words_free, line #73: Value () is not an integer
✗ products_attributes.attributes_price_letters, line #73: Value () is not a floating-point value.
✗ products_attributes.attributes_price_letters_free, line #73: Value () is not an integer
✗ products_attributes.attributes_required, line #73: Value () is not an integer
Added the changes for DaveWest but still see the error
Rick, I'm not able to recreate your issue. On a zc156c test site with demo products loaded, I exported the ProductsAttribsRaw and then re-imported without any errors.
Carp,
I went back and forth yesterday 7 times with errors each time before I typed the post.
Today, first time yielded no errors.
I dunno. The marvels of electrons floating around, I guess.
handler: dbio.ProductsAttribsRaw.xxxxx
Removed fields some fields from the base export to eliminate clutter in the spreadsheet
Re-arranged remaining fields to the following order
Fields
v_products_model
v_products_options_values_name
v_options_values_price
v_options_id
v_options_values_id
v_products_attributes_id
v_products_id
Editing many
v_options_values_price
Edited a couple
v_products_model
Saved csv (excel latin1)
Upload csv
Import (FULL)
ALL v_options_values_price values were updated
NONE v_products_model were updated
The expectation was that the v_products_model would have been updated.
Should I use a different handler to edit v_products_model?
The ultimate goal is to add the custom handlers to our existing Excel master price calculator workbook of 100+ worksheets so that price calculations can be significantly automated.
The good thing.... The first time through editing the prices using this handler took the two of us a generous hour which in itself more than halved the time it takes to manually update the attribute pricing.