startSetup(); $installer->run(" CREATE TABLE IF NOT EXISTS {$this->getTable('shipping_postdk')} ( pk int(10) unsigned NOT NULL auto_increment, website_id int(11) NOT NULL default '0', dest_country_id varchar(4) NOT NULL default '0', dest_region_id int(10) NOT NULL default '0', dest_city varchar(64) NOT NULL default '', dest_zip varchar(10) NOT NULL default '', dest_zip_to varchar(10) NOT NULL default '', condition_name varchar(20) NOT NULL default '', condition_from_value decimal(12,4) NOT NULL default '0.0000', condition_to_value decimal(12,4) NOT NULL default '0.0000', price decimal(12,4) NOT NULL default '0.0000', cost decimal(12,4) NOT NULL default '0.0000', service varchar(32) NOT NULL, addons varchar(32) NOT NULL, title varchar(255) NOT NULL, sort_order int(11) NOT NULL default '0', external_id varchar(32) NOT NULL default '', active int(11) NOT NULL default '1', PRIMARY KEY(`pk`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); // ADD SOME DEFAULT SHIPPING RATES ON EACH WEBSITE $websites = $this->getConnection()->fetchAll('SELECT * FROM ' . $this->getTable('core_website')); foreach ($websites as $website){ $websiteId = $website['website_id']; if($website['website_id'] == 0){ continue; } $installer->run(" INSERT INTO {$this->getTable('shipping_postdk')} (`pk`, `website_id`, `dest_country_id`, `dest_region_id`, `dest_city`, `dest_zip`, `dest_zip_to`, `condition_name`, `condition_from_value`, `condition_to_value`, `price`, `cost`, `service`, `addons`, `title`, `sort_order`, `external_id`, `active`) VALUES (NULL, $websiteId, 'DK', 0, '', '', '', 'package_value', 0.0000, 99999.0000, 59.0000, 0.0000, 'P19DK', 'DLV,NOTEMAIL', 'Med omdeling', 1, '', 1), (NULL, $websiteId, 'DK', 0, '', '', '', 'package_value', 0.0000, 99999.0000, 49.0000, 0.0000, 'P19DK', 'PUPOPT,NOTEMAIL', 'Uden omdeling / Døgnpost', 2, '', 1), (NULL, $websiteId, 'DK', 0, '', '', '', 'package_value', 0.0000, 99999.0000, 49.0000, 0.0000, 'PDKEP', 'NOTEMAIL', 'Erhverv', 3, '', 1), (NULL, $websiteId, '0', 0, '', '', '', 'package_value', 0.0000, 99999.0000, 99.0000, 0.0000, 'PDK340', '', 'Udland', 0, '', 1); "); } $installer->endSetup();