Code:
CREATE TABLE products_with_attributes_stock (stock_id INT NOT NULL AUTO_INCREMENT, products_id INT NOT NULL, stock_attributes VARCHAR( 255 ) NOT NULL, quantity FLOAT NOT NULL, sort INT NOT NULL, PRIMARY KEY ( `stock_id` ));
ALTER TABLE products_options
ADD products_options_track_stock tinyint(4) default '1' not null
AFTER products_options_name;
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Display Images in Admin', 'STOCK_SHOW_IMAGE', 'false','Display image thumbnails on Products With Attributes Stock page? (warning, setting this to true can severly slow the loading of this page):','9','6',NULL,now(),NULL,"zen_cfg_select_option(array('true', 'false'),");
INSERT IGNORE INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (9, 'Stocks With Attributes', 'Stocks With Attributes', 9, 1);
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show available stock level in cart when less than order', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '1', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false'),");
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Product Info Single Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN_SINGLE', 'multiple_dropdowns', 'The plugin used for displaying attributes on the product information page.', 9, 1, now(), NULL, 'zen_cfg_select_option(array(\'single_radioset\', \'single_dropdown\',\'multiple_dropdowns\',\'sequenced_dropdowns\'),');
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Product Info Multiple Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN_MULTI', 'sequenced_dropdowns', 'The plugin used for displaying attributes on the product information page.', 9, 1, now(), NULL, 'zen_cfg_select_option(array(\'single_radioset\', \'single_dropdown\',\'multiple_dropdowns\',\'sequenced_dropdowns\'),');
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Show Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK', 'True', 'Controls the display of out of stock attributes.', 9, 10, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Mark Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK', 'Right', 'Controls how out of stock attributes are marked as out of stock.', 9, 20, now(), NULL, 'zen_cfg_select_option(array(\'None\', \'Right\', \'Left\'),');
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Display Out of Stock Message Line', 'PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE', 'True', 'Controls the display of a message line indicating an out of stock attributes is selected.', 9, 30, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');
INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Prevent Adding Out of Stock to Cart', 'PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK', 'True', 'Prevents adding an out of stock attribute combination to the cart.', 9, 40, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');
INSERT IGNORE INTO `configuration` VALUES (1286, 'Disable drop down menu when stock equals zero', 'sba_zero_disable ', 'true', 'Set drop down menu to automatically disable when the attribute quantity equals zero:', 9, 6, '2010-07-25 15:29:27', '2010-07-25 14:44:56', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
# Register the pages for Admin Access Control
INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('products with attributes stock', 'BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK', '', 'catalog', 'Y', 100);
Bookmarks