Great plugin however when I exported my products it added the source code of my Admin page at the end! Weird ...
Great plugin however when I exported my products it added the source code of my Admin page at the end! Weird ...
Not weird, but a bug. If you edit your copy of /YOUR_ADMIN/dbio_manager.php, starting at line 224, find:
and change to:Code:case 'download': $fp = fopen ($action_filename, 'r'); if ($fp === false) { $_SESSION['dbio_message'] = array ( 'error', sprintf (DBIO_CANT_OPEN_FILE, $action_filename) ); } else { if (strpos ($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) { header('Content-Type: "application/octet-stream"'); header('Content-Disposition: attachment; filename="' . $dbio_files[$_POST['filename_hash']]['filename_only'] . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header("Content-Transfer-Encoding: binary"); header('Pragma: public'); header("Content-Length: " . $dbio_files[$_POST['filename_hash']]['bytes']); } else { header('Content-Type: "application/octet-stream"'); header('Content-Disposition: attachment; filename="' . $dbio_files[$_POST['filename_hash']]['filename_only'] . '"'); header("Content-Transfer-Encoding: binary"); header('Expires: 0'); header('Pragma: no-cache'); header("Content-Length: " . $dbio_files[$_POST['filename_hash']]['bytes']); } fpassthru ($fp); fclose ($fp); } break;
I'll get this queued for the next version's release.Code:case 'download': $fp = fopen ($action_filename, 'r'); if ($fp === false) { $_SESSION['dbio_message'] = array ( 'error', sprintf (DBIO_CANT_OPEN_FILE, $action_filename) ); } else { if (strpos ($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) { header('Content-Type: "application/octet-stream"'); header('Content-Disposition: attachment; filename="' . $dbio_files[$_POST['filename_hash']]['filename_only'] . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header("Content-Transfer-Encoding: binary"); header('Pragma: public'); header("Content-Length: " . $dbio_files[$_POST['filename_hash']]['bytes']); } else { header('Content-Type: "application/octet-stream"'); header('Content-Disposition: attachment; filename="' . $dbio_files[$_POST['filename_hash']]['filename_only'] . '"'); header("Content-Transfer-Encoding: binary"); header('Expires: 0'); header('Pragma: no-cache'); header("Content-Length: " . $dbio_files[$_POST['filename_hash']]['bytes']); } fpassthru ($fp); fclose ($fp); exit (); } break;
I've just submitted v1.0.1 to the Plugins for review, containing the following changes (identified by their GitHub issue number):
#69: Enable a handler to perform some post-processing for the record-set just imported.
#63: Clarify some of the handlers' instructions.
#68: Missing function importGetFieldValue.
#67: Unwanted HTML included in CSV-download in some configurations.
#60: Missing "Customers" handler's language file.
#62: Only default language exported by "Products" handler on multi-lingual stores.
#64: v_categories_name field not properly encoded by the "Products" export.
#65: Empty dates should be allowed when a date/datetime field is nullable.
#53: Allow a handler to be conditionally enabled.
v1.0.1 is now available for download from the plugins.
I've just submitted v1.1.0 to the Plugins for review. This version of DbIo adds the capability to REMOVE a product's database record and to use either the product's ID or its model-number as a "key" on import.
Changes for the following issues (identified by GitHub issue numbers) are included:
#7: Enable handlers to support "commands" (like REMOVE); the "Products" import now recognizes the REMOVE command.
#70: Fixed-header import misses "special import" fields.
#71: An incomplete import record was not being flagged.
#72: Don't post-process imports that have previously failed.
#73: Enable a handler to specify an alternate key; supports the "Products" import to key to either the product's ID or model-number.
#74: Enable a handler to specify a minimum base-class version.
#75: Don't gather export filters until needed; a performance enhancement for store's with a large number of categories and/or manufacturers.
#78: Correct PHP Notice issues.
What a great module. Very well made. I am having difficulties doing the 'ordersproducts' as I get the blank screen with generic error message (WARNING: An Error occurred.........). Unfotunately nothing is in log files. I do have modified products table, namely extra fields. Perhaps it is. Orders export runs perfect, so the customer details are exporting okay.
@HeathenMagic, I don't understand why no log was generated for that error. That said, you could try enabling the DbIo debug, rerunning that OrdersProducts report and then sending me (it'll be a big file) the resultant log (it'll be the newest file with a name similar to /YOUR_ADMIN/dbio/logs/dbio-OrdersProducts-*.log).
Slight update: The OrdersProducts report was being run with filters on the "Orders ID" and, unfortunately, that resulted in the error:
The correction is to properly "alias" that orders_id field. Along the way, I also found that the OrdersProducts report wasn't passing its output information through the encoding process (so that non-ASCII characters could get "mangled" in the output file), so that's been corrected as well.Code:PHP Fatal error: 1052:Column 'orders_id' in where clause is ambiguous
I've got the update staged for DbIo's next version (most likely in early January): https://raw.githubusercontent.com/la...ctsHandler.php
Bookmarks