Skip to content
lat9 edited this page May 29, 2024 · 2 revisions

Once the plugin has been initially installed:

  1. Three new tables are created in your database:
    1. products_options_stock — provides the mapping of a product and attribute-combination to that attribute-combination's stock-level and (optional) model/SKU number.
    2. products_options_stock_attributes — contains the detailed attribute-combinations being managed.
    3. products_options_stock_names — contains the out-of-stock labels used by the plugin.
  2. Configuration settings are created for the plugin, accessible via Configuration :: Options' Stock Manager.
  3. Admin pages are registered for the plugin's admin additions:
    1. Catalog :: Manage Options' Stock
    2. Catalog :: Options' Stock — View All
    3. Localization :: Out-of-Stock Labels
    4. Tools :: POSM: Find Duplicate Models
    5. Extras :: Convert SBA to POSM
  4. These following built-in Zen Cart Configuration :: Stock settings are forced to values required for this plugin's proper operation:
    1. Subtract stock … true
  5. The products table is updated so that all products_quantity values are greater than or equal to zero (0).

products_options_stock

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.

products_options_stock_attributes

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.

products_options_stock_names

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.

Clone this wiki locally