-
Notifications
You must be signed in to change notification settings - Fork 3
Database Changes
lat9 edited this page May 29, 2024
·
2 revisions
Once the plugin has been initially installed:
- Three new tables are created in your database:
- products_options_stock — provides the mapping of a product and attribute-combination to that attribute-combination's stock-level and (optional) model/SKU number.
- products_options_stock_attributes — contains the detailed attribute-combinations being managed.
- products_options_stock_names — contains the out-of-stock labels used by the plugin.
- Configuration settings are created for the plugin, accessible via Configuration :: Options' Stock Manager.
- Admin pages are registered for the plugin's admin additions:
- Catalog :: Manage Options' Stock
- Catalog :: Options' Stock — View All
- Localization :: Out-of-Stock Labels
- Tools :: POSM: Find Duplicate Models
- Extras :: Convert SBA to POSM
- These following built-in Zen Cart Configuration :: Stock settings are forced to values required for this plugin's proper operation:
- Subtract stock … true
- The
productstable is updated so that allproducts_quantityvalues are greater than or equal to zero (0).
| Field Name | Field Type | Field Description |
|---|---|---|
| pos_id | int(11) AUTO_INCREMENT | The automatically-incrementing, unique ID associated with this product options' stock combination. |
| products_id | int(11) | The products_id value (an index into the products table) that is associated with this options' stock combination. |
| pos_name_id | int(11) | The pos_name_id value (an index into the products_options_stock_names table) that is associated with this options-stock combination's out-of-stock "label" |
| products_quantity | float | The quantity on-hand of the products' options' stock combination. |
| pos_hash | char(32) | The MD5 hash of the products_id and options_id/options_values_id values that uniquely defines this options-stock combination. |
| pos_model | varchar(32) | If not an empty value, contains the model/SKU associated with this products' options' stock combination. |
| pos_date | date | If the products' out-of-stock label, referenced by pos_name_id contains the date-insertion tag [date], this date (formatted using the zen_date_short function) is inserted in that tag's place. |
| last_modified | datetime | The date/time that the record was last modified. |
| Field Name | Field Type | Field Description |
|---|---|---|
| pos_attribute_id | int(11) AUTO_INCREMENT | The automatically-incrementing, unique ID associated with this product options' stock attribute record. |
| pos_id | int(11) | The pos_id value (an index into the products_options_stock table) that is associated with this options' stock name/value pair. |
| products_id | int(11) | The products_id value (an index into the products or products_options_stock tables) that is associated with this options' stock name/value pair. |
| options_id | int(11) | The index into the products_attributes or products_options table that is associated with the options' stock name for this pair. |
| options_values_id | int(11) | The index into the products_attributes or products_options_values table that is associated with the options' stock value for this pair. |
| Field Name | Field Type | Field Description |
|---|---|---|
| pos_name_id | int(11) | This calculated value, along with the associated language_id, provides the index to this record. |
| language_id | int(11) | This value, along with the associated pos_name_id, provides the index to this record. |
| pos_name | varchar(64) | This language-specific value identifies one of the out-of-stock messages used by the Products' Options' Stock Manager. If the value contains the date-insertion tag [date], the out-of-stock date customized for a specific option-stock combination will be inserted in the tag's place. |