Skip to content

Database IO Manager Reports

lat9 edited this page Feb 16, 2024 · 1 revision

Starting with v2.2.0 of POSM, there's now an integration with the Database I/O Manager (DbIo). This enables you to perform exports and imports of your store's POSM information using an Excel® or Open-Office .csv file, making it easier to manage your products.

Notes:

  • You'll need to ensure that you've previously installed the Database I/O Manager … v1.1.0 or later. Earlier versions did not include the support required by the POSM handlers.
  • These handlers fully support the additional database fields required by the Products' Options' Stock Manager — Price/Weight Extension!

The sections below contain detailed descriptions of the "handlers" provided and some usage tips.

DbIoOptionsStockFullHandler

This handler enables you to export and, more importantly, import configurations for your store's products' option-combinations! The handler can perform the following operations in support of your store's POSM configuration:

  • Export
  • Import
    • Update a record
    • Add a record, with possible "side-effects":
      1. Option-values added to an existing option
      2. Attributes added to existing products
    • Remove a record

I suggest first exporting your existing POSM configuration; that process will output a .csv that contains the field-defining headers that you'll need to import changes. In addition to that header information, the file will contain one line for each product-option-combination currently configured.

The import's processing, on a record-by-record basis, attempts to identify the associated product using the v_products_id or, if no match is found for the product's ID, its v_products_model. When a match-by-model is attempted, the model number must be unique within your products; an imported record going through match-by-model with a non-unique model will be disallowed.

Once an import-record's product has been identified, the handler next validates the v_products_options_combination value. This value identifies the option/option-value pairs for the current record's import; the field is formatted as option_name1**~**option_value_name1[**^**option_name2**~**option_value_name2 …], where the option-names and option-value-names are specified in the store's default language. Processing continues in the sequence described in the following table, stopping whenever the record has been determined to be not importable.

Condition Action Taken
No option found in the store's database matching option_namen The record is not importable.
No option-value found in the store's database matching option_value_namen If a unique option_namen has been located and no other issues are found with the record, option_value_namen will be created and associated with option_namen … for all languages supported by the store. Otherwise, the record is not importable. See Note 1, below.
No attribute is found for the current product for the combination option_namen~option_value_namen The option-combination is added (with default values) as an attribute for the current product. See Note 2, below.
All previous checks have passed. The product's option-combination is either added to, updated in or removed from the POSM configuration in the database.

Notes:

  1. For POSM versions prior to v4.1.5, newly-added option-values' sort-orders are set to 0. POSM v4.1.5 and later set the sort order to the maximum sort-order of the option-values currently defined for the option, plus 5.
  2. For POSM versions prior to v4.1.5, newly-added attribute-values' sort-orders are set to 0. POSM v4.1.5 and later set the sort order to be that associated with the specified option-value.

DbIoOptionsStockUpdateHandler

This handler enables you to export and update configurations for your store's products' option-combinations! The handler can perform the following operations in support of your store's POSM configuration:

  • Export
  • Import, update an existing record

I suggest first exporting your existing POSM configuration; that process will output a .csv that contains the field-defining headers that you'll need to import changes. In addition to that header information, the file will contain one line for each product-option-combination currently configured.

The import's processing, on a record-by-record basis, attempts to identify the associated product using the v_products_id or, if no match is found for the product's ID, its v_products_model. When a match-by-model is attempted, the model number must be unique within your products; an imported record going through match-by-model with a non-unique model will result in that record's import being disallowed.

Once an import-record's product has been identified, the handler next validates the v_products_options_combination value. This value identifies the option/option-value pairs for the current record's import; the field is formatted as option_name1**~**option_value_name1[**^**option_name2**~**option_value_name2 …], where the option-names and option-value-names are specified in the store's default language. Processing continues in the sequence described in the following table, stopping whenever the record has been determined to be not importable.

Condition Action Taken
No option found in the store's database matching option_namen The record is not importable.
No option-value found in the store's database matching option_value_namen The record is not importable.
No attribute is found for the current product for the combination option_namen~option_value_namen The record is not importable; use the DbIoOptionsStockFullHandler instead.
The product's option-combination is not currently POSM-managed. The record is not importable; use the DbIoOptionsStockFullHandler instead.
All previous checks have passed. The product's option-combination is updated in the POSM configuration in the database.

DbIoOptionsStockNamesHandler

This simple handler provides the interface to export and import the configurations that you've made to the products_options_stock_names table. As with the other handlers, I suggest performing an "Export" of the table's current contents prior to any "Import" so that you've got the field names/columns auto-created.

Clone this wiki locally