Code:
DROP TABLE IF EXISTS product_auction_extra;CREATE TABLE product_auction_extra (
products_id int(11) NOT NULL default '0',
auction_clock tinyint(1) NOT NULL default '0',
bid_expire_date date NOT NULL default '0000-00-00',
bid_expire_hour tinyint(2) NOT NULL default '0',
bid_reserve_price decimal(10,2) NOT NULL default '0.00',
bid_buynow_price decimal(10,4) NOT NULL default '0.0000',
bid_start_price DECIMAL( 10, 2 ) NOT NULL,
auction_closed VARCHAR( 1 ) DEFAULT 'N' NOT NULL,
last_auction_winner_email_sent DATETIME NOT NULL,
auction_closed_email_sent VARCHAR( 1 ) DEFAULT 'N' NOT NULL,
bid_minimum_increase decimal(10,2) NOT NULL default '0.00',
auction_start int(1) NOT NULL default '0',
PRIMARY KEY (products_id)
) ENGINE=MyISAM;
# ADD some indicies TO make the queries RUN faster looking FOR closed auctions
ALTER TABLE product_auction_extra ADD INDEX (bid_expire_date);
ALTER TABLE product_auction_extra ADD INDEX (bid_expire_hour);
ALTER TABLE product_auction_extra ADD INDEX (auction_closed);
# Table structure for table products_auctions
DROP TABLE IF EXISTS products_auctions;
CREATE TABLE products_auctions (
`bid_id` int(11) NOT NULL auto_increment,
`customers_id` int(11) NOT NULL default '0',
`products_id` int(11) NOT NULL default '0',
`customers_bid` decimal(15,4) NOT NULL default '0.0000',
`date_of_bid` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`bid_id`),
KEY (`date_of_bid`)
) ENGINE=MyISAM;
SET @t3=0;
SELECT @t3:=type_id
FROM product_types
WHERE type_name = 'Product - Auction'
LIMIT 1;
DELETE FROM product_type_layout WHERE product_type_id = @t3;
DELETE FROM product_types WHERE type_id = @t3;
INSERT INTO product_types VALUES ('', 'Product - Auction', 'product_auction', '1', 'N', '', now(), now());
SET @t4=0;
SELECT (@t4:=type_id) as t4
FROM product_types
WHERE type_handler= 'product_auction';
INSERT INTO product_type_layout VALUES ('','Show Model Number', 'SHOW_PRODUCT_AUCTION_INFO_MODEL', '1', 'Display Model Number on Product Info 0= off 1= on', @t4, '1', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Weight', 'SHOW_PRODUCT_AUCTION_INFO_WEIGHT', '1', 'Display Weight on Product Info 0= off 1= on', @t4, '2', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Attribute Weight', 'SHOW_PRODUCT_AUCTION_INFO_WEIGHT_ATTRIBUTES', '1', 'Display Attribute Weight on Product Info 0= off 1= on', @t4, '3', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Manufacturer', 'SHOW_PRODUCT_AUCTION_INFO_MANUFACTURER', '1', 'Display Manufacturer Name on Product Info 0= off 1= on', @t4, '4', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Quantity in Shopping Cart', 'SHOW_PRODUCT_AUCTION_INFO_IN_CART_QTY', '1', 'Display Quantity in Current Shopping Cart on Product Info 0= off 1= on', @t4, '5', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Quantity in Stock', 'SHOW_PRODUCT_AUCTION_INFO_QUANTITY', '1', 'Display Quantity in Stock on Product Info 0= off 1= on', @t4, '6', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Product Reviews Count', 'SHOW_PRODUCT_AUCTION_INFO_REVIEWS_COUNT', '1', 'Display Product Reviews Count on Product Info 0= off 1= on', @t4, '7', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Product Reviews Button', 'SHOW_PRODUCT_AUCTION_INFO_REVIEWS', '1', 'Display Product Reviews Button on Product Info 0= off 1= on', @t4, '8', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Date Available', 'SHOW_PRODUCT_AUCTION_INFO_DATE_AVAILABLE', '1', 'Display Date Available on Product Info 0= off 1= on', @t4, '9', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Date Added', 'SHOW_PRODUCT_AUCTION_INFO_DATE_ADDED', '1', 'Display Date Added on Product Info 0= off 1= on', @t4, '10', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Product URL', 'SHOW_PRODUCT_AUCTION_INFO_URL', '1', 'Display URL on Product Info 0= off 1= on', @t4, '11', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Starting At text on Price', 'SHOW_PRODUCT_AUCTION_INFO_STARTING_AT', '1', 'Display Starting At text on products with attributes Product Info 0= off 1= on', @t4, '12', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Show Product Tell a Friend button', 'SHOW_PRODUCT_AUCTION_INFO_TELL_A_FRIEND', '1', 'Display the Tell a Friend button on Product Info<br /><br />Note: Turning this setting off does not affect the Tell a Friend box in the columns and turning off the Tell a Friend box does not affect the button<br />0= off 1= on', @t4, '13', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Product Free Shipping Image Status - Catalog', 'SHOW_PRODUCT_AUCTION_INFO_ALWAYS_FREE_SHIPPING_IMAGE_SWITCH', '0', 'Show the Free Shipping image/text in the catalog?', @t4, '14', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''Yes''), array(''id''=>''0'', ''text''=>''No'')), '),
('','Show Reserve Price or not!', 'SHOW_PRODUCT_RESERVE_INFO', '1', 'Display Reserve price Info 0= off 1= on', @t4, '15', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
#admin defaults
('','Product Price Tax Class Default - When adding new products?', 'DEFAULT_PRODUCT_AUCTION_TAX_CLASS_ID', '0', 'What should the Product Price Tax Class Default ID be when adding new products?', @t4, '16', now(), now(), NULL, ''),
('','Product Virtual Default Status - Skip Shipping Address - When adding new products?', 'DEFAULT_PRODUCT_AUCTION_PRODUCTS_VIRTUAL', '0', 'Default Virtual Product status to be ON when adding new products?', @t4, '17', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('','Product Free Shipping Default Status - Normal Shipping Rules - When adding new products?', 'DEFAULT_PRODUCT_AUCTION_PRODUCTS_IS_ALWAYS_FREE_SHIPPING', '0', 'What should the Default Free Shipping status be when adding new products?', @t4, '18', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
#added for image and meta tags
('','Show Product Additional Images', 'SHOW_PRODUCT_AUCTION_INFO_ADDITIONAL_IMAGES', '1', 'Display Additional Images on Product Info 0= off 1= on', @t4, '19', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Show Product Additional Shipping Images', 'SHOW_PRODUCT_AUCTION_FREE_SHIPPING_INFO_ADDITIONAL_IMAGES', '1', 'Display Additional Free shipping Images on Product Info 0= off 1= on', @t4, '20', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Show Metatags Title Default - Product Title', 'SHOW_PRODUCT_AUCTION_INFO_METATAGS_TITLE_STATUS', '1', 'Display Product Title in Meta Tags Title 0= off 1= on', @t4, '21', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Show Metatags Title Default - Product Name', 'SHOW_PRODUCT_AUCTION_INFO_METATAGS_PRODUCTS_NAME_STATUS', '1', 'Display Product Name in Meta Tags Title 0= off 1= on', @t4, '22', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Show Metatags Title Default - Product Model', 'SHOW_PRODUCT_AUCTION_INFO_METATAGS_MODEL_STATUS', '1', 'Display Product Model in Meta Tags Title 0= off 1= on', @t4, '23', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Show Metatags Title Default - Product Price', 'SHOW_PRODUCT_AUCTION_INFO_METATAGS_PRICE_STATUS', '1', 'Display Product Price in Meta Tags Title 0= off 1= on', @t4, '24', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Show Metatags Title Default - Product Tagline', 'SHOW_PRODUCT_AUCTION_INFO_METATAGS_TITLE_TAGLINE_STATUS', '1', 'Display Product Tagline in Meta Tags Title 0= off 1= on', @t4, '25', now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), ');
INSERT INTO configuration_group VALUES ('', 'Auction Manager', 'Set Auction Options', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Auction Manager';
INSERT INTO configuration VALUES ('', 'Display previous bids to logged in users', 'AUCTION_INFO_DISPLAY_PREVIOUS_BIDS', '1', 'Allow logged in users see previous bids', @t4, 1, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Display previous bid count', 'AUCTION_INFO_DISPLAY_PREVIOUS_BIDS_COUNT', '1', 'Display previous bid count', @t4, 2, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Display reserve not met message', 'AUCTION_INFO_DISPLAY_RESERVE_NOT_MET', '1', 'Display reserve not met message', @t4, 3, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Display buy it now button', 'AUCTION_INFO_DISPLAY_BUY_NOW', '1', 'Display buy it now button for items that have not met their reserve', @t4, 4, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Remove winning auction item from cart', 'AUCTION_INFO_DISPLAY_CART_REMOVE', '0', 'Allow customer to remove won aution item from shopping cart', @t4, 5, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Display winning bidders name', 'AUCTION_INFO_DISPLAY_WIN_BID_NAME', '1', 'Display winning bidders name', @t4, 6, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Display winning bidders bid', 'AUCTION_INFO_DISPLAY_WIN_BID_BID', '1', 'Display winning bidders bid', @t4, 7, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Use CRON detection of auction close', 'AUCTION_CRON_ENABLE', '0', 'When Disabled (0=False), detecting closed auctions accrues during each page load. Enabling (1=True), will speed up your entire zen site BUT you must add a cron job or your auctions will never be detected as closed.<br /><br />Check with your host for instructions on the right way to set CRON jobs <br />php -f /YOUR STORE PATH/cron.php >> /dev/null', @t4, 8, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Display Pay Now button to winners', 'AUCTION_INFO_DISPLAY_PAY_NOW', '1', 'Display the Pay Now button or auto add to cart', @t4, 9, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')),'),
('', 'Max bid for any product', 'MAX_AUCTION_BID_AMOUNT', '200', 'Enter the largest amount one can bid for a auction, <br />whole numbers only (5000)?', @t4, 10, now(), now(), NULL, NULL),
#added for auction sidebox
('','Number of Products Auction SideBox', 'MAX_AUCTION_SIDEBOX_PRODUCTS', '2', 'Number of random Auction products to rotate in the sidebox<br />Enter the number of products to display in this sidebox at one time.<br /><br />How many products do you want to display in this sidebox?', @t4, 11, now(), now(), NULL, NULL),
('','Image - Auction SideBox Products Width', 'IMAGE_AUCTION_SIDEBOX_PRODUCTS_LISTING_WIDTH', '100', 'Default = 100', @t4, 12, now(), now(), NULL, NULL),
('','Image - Auction SideBox Products Height', 'IMAGE_AUCTION_SIDEBOX_PRODUCTS_LISTING_HEIGHT', '80', 'Default = 80', @t4, 13, now(), now(), NULL, NULL),
('','Display Auction SideBox Product Image', 'PRODUCT_AUCTION_SIDEBOX_LIST_IMAGE', '1', 'Do you want to display the Product Image?<br /><br />0= off 1= on', @t4, 14, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Display Auction SideBox Product Name', 'PRODUCT_AUCTION_SIDEBOX_NAME', '1', 'Do you want to display the Product Name?<br /><br />0= off 1= on', @t4, 15, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Display Auction SideBox Product Price', 'PRODUCT_AUCTION_SIDEBOX_PRICE', '1', 'Do you want to display the Product Price<br /><br />0= off 1= on', @t4, 16, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Display Auction SideBox Product Time Left', 'PRODUCT_AUCTION_SIDEBOX_DATE_ADDED', '1', 'Do you want to display the Product Time left?<br /><br />0= off 1= on', @t4, 17, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
('','Display Auction SideBox Product Description', 'PRODUCT_AUCTION_SIDEBOX_DESCRIPTION', '150', 'How many characters do you want to display of the Product Description?<br /><br />0= OFF<br />150= Suggested Length, or enter the maximum number of characters to display', @t4, 18, now(), now(), NULL, NULL),
#added for the information sidebox
('','Display Auction Information link in the Information sidebox', 'DEFINE_AUCTION_STATUS', '1', 'Display Auction Information link in the Information sidebox!<br /><br />0= OFF<br />1= ON', @t4, 19, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), '),
#added for the auction manager
('','Number of Bids, Content Box', 'DISPLAY_AUCTION_BIDS', '2', 'How Many bids to display in the Auction Manager Content Box!<br /><br />Default is 2', @t4, 20, now(), now(), NULL, NULL);
# ADD Auctions Manager menu items to admin menus
INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configAuctionManager','BOX_CONFIGURATION_AUCTION_MANAGER','FILENAME_CONFIGURATION', CONCAT('gID=',@t4),'configuration','Y',@t4),
('auctions','BOX_CATALOG_AUCTIONS_MANAGER','FILENAME_AUCTIONS_PRODUCTS','','catalog','Y','18'),
('convertType','BOX_TOOLS_CONVERT_TYPE','FILENAME_CONVERT_TYPE','','tools','Y','14');
Bookmarks