Forums / Addon Admin Tools / Database I/O Manager (DbIo) Plugin [Support Thread]

Database I/O Manager (DbIo) Plugin [Support Thread]

Views: 104,212

Results 581 to 600 of 621
25 May 2025, 2:19 PM
#581
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Database I/O Manager (DbIo) Plugin [Support Thread]

dealbyethan.com:

Hi, thanks for your responses.

More tests were done but there are still some issues.
This module prioritises products_model as the primary key during import and ignore products_id by creating a new one. Is it possible to have an option in the configuration for choosing the import/export primary key: products_id or products_model, like in EP4? The main reason is that products_id always has an automatic unique number no matter what; whereas products_model has to be manually made unique but some suppliers use the same model numbers for products with different colors.

Although command ADD may work for adding products with the same products_model, it adds the linked product as a new product instead. Turning it on and off in configuration can be confusing and inconvenient.

Is there a way to bulk create categories before importing products?
I'm not seeing that behavior in my testing.

If I take an existing product, I can change its model. If your site's configured to allow duplicate models, then using a dbio_command of ADD (with a products_id of 0) will create a new product with the same model number.

There is not currently a means to export and import categories separately.

28 May 2025, 5:41 PM
#582
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

Using zc 2.1.0 php 8.2.0, ZCA Bootstrap

This is the 2nd site I have installed DBIO, the first works great, no issues and all installed without a problem. I just recently installed via Github the DBIO plugin to a new site and it installed without issues and all imports worked initially. This is where I have a problem. It was either during the import of data for the Attributes Basic or Attributes Raw that created a 500 error on the website. The error is related to the constant DIR_FS_ADMIN as undefined in the file: /home/xxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php..

The log is as follows:
[28-May-2025 15:00:10 UTC] PHP Fatal error: Uncaught Error: Undefined constant "DIR_FS_ADMIN" in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php:6
Stack trace:
#0 /home/xxxxxx/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/xxxxxx/public_html/includes/application_top.php(292): require('/home/xxxxxx/...')
#2 /home/xxxxxx/public_html/index.php(25): require('/home/xxxxxx/...')
#3 {main}
thrown in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php on line 6

[28-May-2025 15:00:10 UTC] Request URI: /index.php?main_page=index, IP address: xx.xx.xxx.xxxx
--> PHP Fatal error: Uncaught Error: Undefined constant "DIR_FS_ADMIN" in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php:6
Stack trace:
#0 /home/xxxxxx/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/xxxxxx/public_html/includes/application_top.php(292): require('/home/xxxxxx/...')
#2 /home/xxxxxx/public_html/index.php(25): require('/home/xxxxxx/...')
#3 {main}
thrown in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php on line 6.

[28-May-2025 15:00:10 UTC] Request URI: /index.php?main_page=index, IP address: xx.xx.xxx.xxx
--> PHP Fatal error: Uncaught Error: Undefined constant "DIR_FS_ADMIN" in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php:6
Stack trace:
#0 /home/xxxxxx/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/xxxxxx/public_html/includes/application_top.php(292): require('/home/xxxxxx/...')
#2 /home/xxxxxx/public_html/index.php(25): require('/home/xxxxxx/...')
#3 {main}
thrown in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php on line 6.

Any idea what could have caused the 500 error when importing, more specifically that would trigger the constant error?

Thanks so much !

29 May 2025, 11:33 AM
#583
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

chuckrey:

Using zc 2.1.0 php 8.2.0, ZCA Bootstrap

This is the 2nd site I have installed DBIO, the first works great, no issues and all installed without a problem. I just recently installed via Github the DBIO plugin to a new site and it installed without issues and all imports worked initially. This is where I have a problem. It was either during the import of data for the Attributes Basic or Attributes Raw that created a 500 error on the website. The error is related to the constant DIR_FS_ADMIN as undefined in the file: /home/xxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php..

The log is as follows:
[28-May-2025 15:00:10 UTC] PHP Fatal error: Uncaught Error: Undefined constant "DIR_FS_ADMIN" in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php:6
Stack trace:
#0 /home/xxxxxx/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/xxxxxx/public_html/includes/application_top.php(292): require('/home/xxxxxx/...')
#2 /home/xxxxxx/public_html/index.php(25): require('/home/xxxxxx/...')
#3 {main}
thrown in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php on line 6

[28-May-2025 15:00:10 UTC] Request URI: /index.php?main_page=index, IP address: xx.xx.xxx.xxxx
--> PHP Fatal error: Uncaught Error: Undefined constant "DIR_FS_ADMIN" in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php:6
Stack trace:
#0 /home/xxxxxx/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/xxxxxx/public_html/includes/application_top.php(292): require('/home/xxxxxx/...')
#2 /home/xxxxxx/public_html/index.php(25): require('/home/xxxxxx/...')
#3 {main}
thrown in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php on line 6.

[28-May-2025 15:00:10 UTC] Request URI: /index.php?main_page=index, IP address: xx.xx.xxx.xxx
--> PHP Fatal error: Uncaught Error: Undefined constant "DIR_FS_ADMIN" in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php:6
Stack trace:
#0 /home/xxxxxx/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/xxxxxx/public_html/includes/application_top.php(292): require('/home/xxxxxx/...')
#2 /home/xxxxxx/public_html/index.php(25): require('/home/xxxxxx/...')
#3 {main}
thrown in /home/xxxxxx/public_html/includes/extra_datafiles/dbio_file_database_names_admin.php on line 6.

Any idea what could have caused the 500 error when importing, more specifically that would trigger the constant error?

Thanks so much !
You've somehow installed the admin file dbio_file_database_names_admin.php on the storefront. There is no storefront component to DbIo; all its files are intended to be copied to your Zen Cart admin directory.

29 May 2025, 1:50 PM
#584
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

lat9:

You've somehow installed the admin file dbio_file_database_names_admin.php on the storefront. There is no storefront component to DbIo; all its files are intended to be copied to your Zen Cart admin directory.

Okay, I will remove those files from the directory. Should it resolve or will I need to reinstate backup and reinstall?

29 May 2025, 2:02 PM
#585
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

chuckrey:

Okay, I will remove those files from the directory. Should it resolve or will I need to reinstate backup and reinstall?
Since I'm not exactly sure what you've done, I'll suggest doing a file-compare against all the DbIo files present in the distribution zip's YOUR_ADMIN/includes directory to ensure that they, too, haven't been copied to the storefront.

Then, you'll need to see if those files were copied to your admin's /includes subdirectory.

29 May 2025, 2:25 PM
#586
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

lat9:

Since I'm not exactly sure what you've done, I'll suggest doing a file-compare against all the DbIo files present in the distribution zip's YOUR_ADMIN/includes directory to ensure that they, too, haven't been copied to the storefront.

Then, you'll need to see if those files were copied to your admin's /includes subdirectory.

Will do.
Thanks for the help

9 Aug 2025, 2:39 AM
#587
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

PHP 8.4.10 / ZC 2.1.0 / DBIO 2.0.2

Is there a command for updating a product that already exists? Additionally, am I right in reading the Wiki articles that the v_dbio_command is optional? Will the module be able to know it's needed to add an item? (If it helps, each item in my database has a unique SKU assigned to it.)

9 Aug 2025, 12:05 PM
#588
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

retched:

PHP 8.4.10 / ZC 2.1.0 / DBIO 2.0.2

Is there a command for updating a product that already exists? Additionally, am I right in reading the Wiki articles that the v_dbio_command is optional? Will the module be able to know it's needed to add an item? (If it helps, each item in my database has a unique SKU assigned to it.)
There isn't a command that specifies that the product is to be updated.

On an import, DbIo will update the product if the v_products_id/v_products_model combination are associated with a pre-existing product. Otherwise, the product is presumed to be new and will be added if

  1. Product Creation Requires Command is set to "No" or the configuration value is set to "Yes" and there's a v_dbio_command of "ADD" as part of the import record.
  2. The product's v_categories_name field is present and not empty.
  3. The v_categories_name references a pre-existing category tree unless Auto-Create Categories on Import is set to Yes, in which case a non-existent category tree is created on the product's import.

The v_dbio_command column is optional on an import.

9 Aug 2025, 9:48 PM
#589
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

lat9:

There isn't a command that specifies that the product is to be updated.

On an import, DbIo will update the product if the v_products_id/v_products_model combination are associated with a pre-existing product. Otherwise, the product is presumed to be new and will be added if

  1. Product Creation Requires Command is set to "No" or the configuration value is set to "Yes" and there's a v_dbio_command of "ADD" as part of the import record.
  2. The product's v_categories_name field is present and not empty.
  3. The v_categories_name references a pre-existing category tree unless Auto-Create Categories on Import is set to Yes, in which case a non-existent category tree is created on the product's import.

The v_dbio_command column is optional on an import.

Do both the product_id and model have to be defined to be recognized as the same product?

10 Aug 2025, 12:30 PM
#590
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

retched:

Do both the product_id and model have to be defined to be recognized as the same product?
The DbIoProductsHandler requires both the v_products_id and v_products_model columns to be present for any import.

If a product exists for the given products_id, but the products_model is different, that's interpreted as a change in the product's model.

If no product exists for a record's products_id

  • If the record's products_model is unique, then that's interpreted as a change to the associated product.
  • Otherwise, the import isn't allowed unless there's a dbio_command of ADD.
10 Aug 2025, 5:14 PM
#591
renee_mott avatar

renee_mott

New Zenner

Join Date:
Nov 2008
Posts:
3
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

have they come up with an inventory report by model yet??? The inventory report or low on inventory report not great for over 2000 items. would love to narrow it down by model or category/model

10 Aug 2025, 8:24 PM
#592
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

Renee Mott:

have they come up with an inventory report by model yet??? The inventory report or low on inventory report not great for over 2000 items. would love to narrow it down by model or category/model
DbIo provides a* category-filter* for its Products export. Using that in conjunction with the quantity_only DbIo "template" should yield you close to what you're looking for.

9 Oct 2025, 6:08 PM
#593
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

FWIW

Soon to be updated 1.5.7d with PHP 7.4.33.

After initial install, clicking on Tools >> Database I/O Manager threw a 500

[09-Oct-2025 13:45:00 America/New_York] PHP Parse error: syntax error, unexpected '|', expecting '{' in /******/includes/functions/dbio_manager_functions.php on line 10

[09-Oct-2025 13:45:00 America/New_York] Request URI: /******/index.php?cmd=dbio_manager, IP address: 216.177.186.199
--> PHP Parse error: syntax error, unexpected '|', expecting '{' in /yakmaster/includes/functions/dbio_manager_functions.php on line 10.

Changing line 10 from:

function dbioGetFieldValue(string $field_name): array|string

to

function dbioGetFieldValue(string $field_name)

allows operation with no problems found so far.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

9 Oct 2025, 6:31 PM
#594
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

Right, the array|string type hint isn't supported on PHP versions prior to 8.0.

9 Oct 2025, 8:05 PM
#595
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

After reviewing the docs, wiki, and template creation info, I wonder if it is possible to join tables for the query.

I need to have the ID, Model, Price, and Price_W, which are all available in the products table, but I would also like to include the product's name, which is in the products_description table.

Is this possible without munging code or creating a joined table?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

9 Oct 2025, 8:51 PM
#596
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

dbltoe:

After reviewing the docs, wiki, and template creation info, I wonder if it is possible to join tables for the query.

I need to have the ID, Model, Price, and Price_W, which are all available in the products table, but I would also like to include the product's name, which is in the products_description table.

Is this possible without munging code or creating a joined table?
The default DbIoProduct export (er) exports all fields in the products and products_descriptions tables (a couple of others, too).

10 Oct 2025, 12:19 AM
#597
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

I guess what threw me was that the items are apparently sorted by table, other than alphabetically.

I found what I needed and learned a little. Check Mark for the day.:P

THANX

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

4 Nov 2025, 7:40 PM
#598
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

Attempting to do an update for FEATURED is failing with the latest dbio. If I do an EXPORT of the featured data, then an upload and an Import (Full), I get this log:

[04-Nov-2025 14:38:58 America/New_York] Request URI: /admin/index.php?cmd=dbio_manager&action=file, IP address: ::1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php(667): trigger_error()
#2 /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php(634): queryFactory->show_error()
#3 /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php(275): queryFactory->set_error()
#4 /Users/scott/Sites/mmpgamers/admin/includes/classes/dbio/DbIoHandler.php(1029): queryFactory->Execute()
#5 /Users/scott/Sites/mmpgamers/admin/includes/classes/dbio/DbIo.php(274): DbIoHandler->importCsvRecord()
#6 /Users/scott/Sites/mmpgamers/admin/dbio_manager.php(242): DbIo->dbioImport()
#7 /Users/scott/Sites/mmpgamers/admin/index.php(11): require('/Users/scott/Si...')
--> 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 'SE WHERE p.products_model = 'NSG-FTE' AND f.products_id = p.products_id' at line 1 :: UPDATE zen_products p SE WHERE p.products_model = 'NSG-FTE' AND f.products_id = p.products_id ==> (as called by) /Users/scott/Sites/mmpgamers/admin/includes/classes/dbio/DbIoHandler.php on line 1029 <== in /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php on line 667.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

4 Nov 2025, 11:21 PM
#599
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

swguy:

Attempting to do an update for FEATURED is failing with the latest dbio. If I do an EXPORT of the featured data, then an upload and an Import (Full), I get this log:

[04-Nov-2025 14:38:58 America/New_York] Request URI: /admin/index.php?cmd=dbio_manager&action=file, IP address: ::1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php(667): trigger_error()
#2 /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php(634): queryFactory->show_error()
#3 /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php(275): queryFactory->set_error()
#4 /Users/scott/Sites/mmpgamers/admin/includes/classes/dbio/DbIoHandler.php(1029): queryFactory->Execute()
#5 /Users/scott/Sites/mmpgamers/admin/includes/classes/dbio/DbIo.php(274): DbIoHandler->importCsvRecord()
#6 /Users/scott/Sites/mmpgamers/admin/dbio_manager.php(242): DbIo->dbioImport()
#7 /Users/scott/Sites/mmpgamers/admin/index.php(11): require('/Users/scott/Si...')
--> 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 'SE WHERE p.products_model = 'NSG-FTE' AND f.products_id = p.products_id' at line 1 :: UPDATE zen_products p SE WHERE p.products_model = 'NSG-FTE' AND f.products_id = p.products_id ==> (as called by) /Users/scott/Sites/mmpgamers/admin/includes/classes/dbio/DbIoHandler.php on line 1029 <== in /Users/scott/Sites/mmpgamers/includes/classes/db/mysql/query_factory.php on line 667.
Shoot a copy of the import csv to my direct email; I'll see what's going on in the morning.

Zen Cart version? DbIo version (latest doesn't cut it)?

5 Nov 2025, 10:09 AM
#600
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

File Sent - Versions are ZC 1.5.8a and DbIo 2.0.2.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.