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

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

Views: 104,219

Results 381 to 400 of 621
14 Jan 2021, 6:53 PM
#381
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

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

yep that makes perfect sense,

Thanks for the speedy help! :D

22 Jan 2021, 5:23 PM
#382
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]

I've just submitted v1.6.5 of DbIo for the Zen Cart moderators' review; I'll post back here when it's available for download.

 This release contains changes associated with the following GitHub issues:

#182: Properly handle 'enum' type database fields on import.
#183: Correctly handle 'nullable' fields on import.

27 Jan 2021, 11:55 AM
#383
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]

lat9:

I've just submitted v1.6.5 of DbIo for the Zen Cart moderators' review; I'll post back here when it's available for download.

 This release contains changes associated with the following GitHub issues:

#182: Properly handle 'enum' type database fields on import.
#183: Correctly handle 'nullable' fields on import.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2091

15 Feb 2021, 9:48 PM
#384
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Thanks Cindy,

Too many times we neglect to say thank you for a plugin that fills a significant business need.

Our master Excel pricing workbook has close to 100 worksheets and over a million formula. That's probably not a huge workbook in the overall realm of things but it is pretty big and complex for us. A full website price update takes 2 of us about 3 hours of manual entry from the workbook.

I finally took the time to take 2 dbio csv and embed them into the master workbook and create links to the appropriate worksheet calculations. Now a full price update takes 3 minutes on a slow internet connection day. (dbio.Products and dbio.ProductsAttribsRaw)

File replacement of 1.6.2 to 1.6.5 happening shortly.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

16 Feb 2021, 12:34 PM
#385
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]

Rick, thanks for your kind words and the feedback that DbIo is helping you.

8 Mar 2021, 6:08 PM
#386
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

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

I'll go with RixStix and also add my thanks for a superb tool.

However, I'm having a bit of an issue with a new installation of ZC157 and DBIO1.6.5

When I try to import the file, I get a blank page and the following php error:

[08-Mar-2021 17:52:45 Europe/London] PHP Fatal error:  Uncaught  ArgumentCountError: Too few arguments to function  DbIoHandler::importGetLanguageFieldValue(), 2 passed in /includes/classes/dbio/DbIoProductsHandler.php  on line 799 and exactly 3 expected in /includes/classes/dbio/DbIoHandler.php:1222
Stack trace:
#0 /includes/classes/dbio/DbIoProductsHandler.php(799):  DbIoHandler->importGetLanguageFieldValue('products_name', '1')
#1 /includes/classes/dbio/DbIoHandler.php(870):  DbIoProductsHandler->importCheckKeyValue(Array)
#2 /includes/classes/dbio/DbIo.php(265): DbIoHandler->importCsvRecord(Array)
#3 /dbio_manager.php(240): DbIo->dbioImport('dbio.Products.2...', 'run')
#4  /index.php(11): require('/home/xxxx/...')
#5 {main}
  thrown in /includes/classes/dbio/DbIoHandler.php on line 1222

I'm no coder. Can you give me a clue as to the cause of the problem?

Many thanks.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

8 Mar 2021, 7:54 PM
#387
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]

Ryk:

I'll go with RixStix and also add my thanks for a superb tool.

However, I'm having a bit of an issue with a new installation of ZC157 and DBIO1.6.5

When I try to import the file, I get a blank page and the following php error:

[08-Mar-2021 17:52:45 Europe/London] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DbIoHandler::importGetLanguageFieldValue(), 2 passed in /includes/classes/dbio/DbIoProductsHandler.php on line 799 and exactly 3 expected in /includes/classes/dbio/DbIoHandler.php:1222
Stack trace:
#0 /includes/classes/dbio/DbIoProductsHandler.php(799): DbIoHandler->importGetLanguageFieldValue('products_name', '1')
#1 /includes/classes/dbio/DbIoHandler.php(870): DbIoProductsHandler->importCheckKeyValue(Array)
#2 /includes/classes/dbio/DbIo.php(265): DbIoHandler->importCsvRecord(Array)
#3 /dbio_manager.php(240): DbIo->dbioImport('dbio.Products.2...', 'run')
#4 /index.php(11): require('/home/xxxx/...')
#5 {main}
thrown in /includes/classes/dbio/DbIoHandler.php on line 1222

> 
> I'm no coder. Can you give me a clue as to the cause of the problem?
> 
> Many thanks.
I can give you more than a clue, how about a correction?  FWIW, I've opened this (<https://github.com/lat9/dbio/issues/185>) GitHub issue to track the forthcoming update.

In your copy of /admin/includes/classes/dbio/DbIoProductsHandler.php, find this section of code on/around line 783 in the DbIo v1.6.5 version:
            // -----
            // To 'insert' (i.e. add) a product, the categories_name field must be non-blank and at least one
            // of the products_model or products_name, products_url or products description (in at least one of the
            // store's languages) must also be non-blank.
            //
            if ($this->record_status === true) {
                $categories_name = $this->importGetFieldValue('categories_name', $data);
                if (empty($categories_name)) {
                    $this->record_status = false;
                    $this->debugMessage("Record at line#" . $this->stats['record_count'] . " not imported; 'v_categories_name' must be supplied for a product addition.", self::DBIO_WARNING);
                } else {
                    $record_ok = false;
                    if (!empty($this->importGetFieldValue('products_model', $data))) {
                        $record_ok = true;
                    } else {
                        foreach ($this->languages as $id => $language_id) {
                            if (!empty($this->importGetLanguageFieldValue('products_name', $language_id))) {
                                $record_ok = true;
                                break;
                            }
                            if (!empty($this->importGetLanguageFieldValue('products_description', $language_id))) {
                                $record_ok = true;
                                break;
                            }
                            if (!empty($this->importGetLanguageFieldValue('products_url', $language_id))) {
                                $record_ok = true;
                                break;
                            }
                        }
                    }
                    $this->record_status = $record_ok;
                }
            }
... and make the highlighted changes:
            // -----
            // To 'insert' (i.e. add) a product, the categories_name field must be non-blank and at least one
            // of the products_model or products_name, products_url or products description (in at least one of the
            // store's languages) must also be non-blank.
            //
            if ($this->record_status === true) {
                $categories_name = $this->importGetFieldValue('categories_name', $data);
                if (empty($categories_name)) {
                    $this->record_status = false;
                    $this->debugMessage("Record at line#" . $this->stats['record_count'] . " not imported; 'v_categories_name' must be supplied for a product addition.", self::DBIO_WARNING);
                } else {
                    $record_ok = false;
                    if (!empty($this->importGetFieldValue('products_model', $data))) {
                        $record_ok = true;
                    } else {
                        foreach ($this->languages as $id => $language_id) {
                            if (!empty($this->importGetLanguageFieldValue('products_name', $language_id[B], $data[/B]))) {
                                $record_ok = true;
                                break;
                            }
                            if (!empty($this->importGetLanguageFieldValue('products_description', $language_id[B], $data[/B]))) {
                                $record_ok = true;
                                break;
                            }
                            if (!empty($this->importGetLanguageFieldValue('products_url', $language_id[B], $data[/B]))) {
                                $record_ok = true;
                                break;
                            }
                        }
                    }
                    $this->record_status = $record_ok;
                }
            }
Thanks for the report and the details, especially that log, which pointed me right to the underlying code issue.
8 Mar 2021, 8:20 PM
#388
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

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

Thanks Cindy, much appreciated.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

8 Mar 2021, 8:36 PM
#389
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Another import question.

dbio 1.6.5
zc 156c

Trying to import new products and call myself reading the entire readme several times but the answer might be a snake.

Thus far, I have not been able to add the test product.
using handler
dbio.Products.ProdIDIMPORT.xxx
downloaded the handler, removed columns that are not important "to me"

v_dbio_command either blank or ADD

Excerpt from one of the dbio logs, but no new product to be found in category 229

2021-03-08 12:14:48: Forcing ADD of product at line #3, via DbIo command
2021-03-08 12:14:48: importBuildSqlQuery for products_description:
INSERT INTO products_description (`products_name`, `products_description`, `language_id`, `products_id`)
VALUES ('Sterling Clasp Assortment 1', 'This is a test description', 1, 0)
2021-03-08 12:14:48: importBuildSqlQuery for products:
INSERT INTO products (`products_model`, `products_sort_order`, `products_image`, `products_weight`, `products_quantity`, `products_type`, `products_price`, `products_status`, `master_categories_id`, `products_tax_class_id`, `products_date_added`)
VALUES ('SSast1', 10, '12ss.jpg', 0.2, 3, 1, 100, 1, 229, 1, now())

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

8 Mar 2021, 8:53 PM
#390
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]

RixStix:

Another import question.

dbio 1.6.5
zc 156c

Trying to import new products and call myself reading the entire readme several times but the answer might be a snake.

Thus far, I have not been able to add the test product.
using handler
dbio.Products.ProdIDIMPORT.xxx
downloaded the handler, removed columns that are not important "to me"

v_dbio_command either blank or ADD

Excerpt from one of the dbio logs, but no new product to be found in category 229

2021-03-08 12:14:48: Forcing ADD of product at line #3, via DbIo command
2021-03-08 12:14:48: importBuildSqlQuery for products_description:
INSERT INTO products_description (products_name, products_description, language_id, products_id)
VALUES ('Sterling Clasp Assortment 1', 'This is a test description', 1, 0)
2021-03-08 12:14:48: importBuildSqlQuery for products:
INSERT INTO products (products_model, products_sort_order, products_image, products_weight, products_quantity, products_type, products_price, products_status, master_categories_id, products_tax_class_id, products_date_added)
VALUES ('SSast1', 10, '12ss.jpg', 0.2, 3, 1, 100, 1, 229, 1, now())

Rick, would you post the DbIo import line associated with those DbIo logs?
8 Mar 2021, 9:33 PM
#391
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Sorry, it looks ugly. I hope I got the commas inserted to help things

[TABLE="width: 896"]
[TR]
[TD]v_products_name_en[/TD]
[TD],v_products_id
[/TD]
[TD],v_products_model
[/TD]
[TD],v_products_description_en
[/TD]
[TD],v_products_sort_order
[/TD]
[TD],v_categories_name
[/TD]
[TD],v_products_image,
[/TD]
[TD]v_products_weight[/TD]
[TD],v_products_quantity
[/TD]
[TD],v_products_type
[/TD]
[TD],v_products_price
[/TD]
[TD],v_products_status
[/TD]
[TD],v_tax_class_title
[/TD]
[TD],v_dbio_command
[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Sterling Clasp Assortment 1,,
[/TD]
[TD]SSast1,
[/TD]
[TD]This is a test description,
[/TD]
[TD="align: right"]10[/TD]
[TD],OOPS!!!!,
[/TD]
[TD]12ss.jpg,
[/TD]
[TD="align: right"]0.2,
[/TD]
[TD="align: right"]3,
[/TD]
[TD="align: right"]1,
[/TD]
[TD="align: right"]100,
[/TD]
[TD="align: right"]1[/TD]
[TD],Taxable Goods,
[/TD]
[TD]ADD[/TD]
[/TR]
[/TABLE]

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

8 Mar 2021, 11:19 PM
#392
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Cindy,

FWIW,
I took the full dbio.Product export
Deleted all but the first product & header line
Edited the data in the first line with new product info
Left v_product_id blank
Left dates blank
v_products_ordered blank since the product is new and none ordered/sold
Left all metatag fields blank
v_product_description blank

v_dbio_command ADD

Nothing inserted into v_categories_name ie: category ID 229

Note: This is the first time ever for me to attempt product addition so it is extremely possible for me neglecting a required column

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

9 Mar 2021, 4:29 PM
#393
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

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

Hi Cindy

Different problem now with the same set up - ZC157, DBIO 165, products handler

On Export, I'm seeing a blank line in the csv, then

<style>.block .notice.invalid{display:none;}</style>

on the next line, and the last line of data stops partway through the final product description so on that last product, there is no category info.

Happy to provide csv and log file if you wish.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

9 Mar 2021, 4:35 PM
#394
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]

@rixstix, would you send me a copy of the DbIo log associated with that errant import to my direct email address?

9 Mar 2021, 4:36 PM
#395
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]

Sure, Ryk. Send those on over the pond via direct email.

9 Mar 2021, 5:18 PM
#396
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

lat9:

@rixstix, would you send me a copy of the DbIo log associated with that errant import to my direct email address?

PM. Outlook crashes must have lost it.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

9 Mar 2021, 5:28 PM
#397
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

email address, that is. We're going to be out and about for a few hours, so it will be late this afternoon.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

9 Mar 2021, 6:40 PM
#398
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]

@Ryk, would you use the site's Tools :: Developers Tool Kit to search **all **admin files for the string <style>.block .notice.invalid{display:none;}</style>?

It's looking like there's a .php file (?) that has a blank line after its closing ?> that is causing premature output to be generated.

9 Mar 2021, 7:57 PM
#399
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

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

Thank you for the pointer - looks like something related to the template.

If that's NOT the problem, I'll get back to you.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

10 Mar 2021, 1:42 PM
#400
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]

RixStix:

Another import question.

dbio 1.6.5
zc 156c

Trying to import new products and call myself reading the entire readme several times but the answer might be a snake.

Thus far, I have not been able to add the test product.
using handler
dbio.Products.ProdIDIMPORT.xxx
downloaded the handler, removed columns that are not important "to me"

v_dbio_command either blank or ADD

Excerpt from one of the dbio logs, but no new product to be found in category 229

2021-03-08 12:14:48: Forcing ADD of product at line #3, via DbIo command
2021-03-08 12:14:48: importBuildSqlQuery for products_description:
INSERT INTO products_description (products_name, products_description, language_id, products_id)
VALUES ('Sterling Clasp Assortment 1', 'This is a test description', 1, 0)
2021-03-08 12:14:48: importBuildSqlQuery for products:
INSERT INTO products (products_model, products_sort_order, products_image, products_weight, products_quantity, products_type, products_price, products_status, master_categories_id, products_tax_class_id, products_date_added)
VALUES ('SSast1', 10, '12ss.jpg', 0.2, 3, 1, 100, 1, 229, 1, now())

Rick, got the files via email (thanks).  Was the OOPS!!!! category pre-existing when you performed the import, or was it auto-created when this product was imported?