[TEP-COMMIT] [CVS catalog] New weight class as detailed in workboard 44
anonymous-OfajU3CKLf1/[email protected] 15 Apr 2004 16:05:46 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in catalog/catalog on MAIN
includes/application_top.php +4 1.286 -> 1.287
/database_tables.php +2 1.2 -> 1.3
includes/classes/weight.php +68 added 1.1
/shopping_cart.php +4 -3 1.37 -> 1.38
includes/languages/english/modules/shipping/zones.php -1 1.3 -> 1.4
includes/modules/product_listing.php +1 -1 1.47 -> 1.48
includes/modules/shipping/table.php +4 -3 1.28 -> 1.29
/ups.php +5 -2 1.55 -> 1.56
/zones.php +6 -3 1.21 -> 1.22
install/oscommerce.sql +43 1.95 -> 1.96
/oscommerce_sample_data.sql +27 -27 1.3 -> 1.4
+164 -40
1 added + 10 modified, total 11 files
New weight class as detailed in workboard 44
----------
catalog /catalog /includes
application_top.php 1.286 -> 1.287
diff -u -r1.286 -r1.287
--- application_top.php 2004/04/13 08:07:09 1.286
+++ application_top.php 2004/04/15 16:05:35 1.287
@@ -217,6 +217,10 @@
}
}
+// Weight class
+ require('includes/classes/weight.php');
+ $osC_Weight = new osC_Weight;
+
// include the mail classes
require('includes/classes/mime.php');
require('includes/classes/email.php');
----------
catalog /catalog /includes
database_tables.php 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- database_tables.php 2004/02/16 06:47:40 1.2
+++ database_tables.php 2004/04/15 16:05:35 1.3
@@ -53,6 +53,8 @@
define('TABLE_TAX_CLASS', DB_TABLE_PREFIX . 'tax_class');
define('TABLE_TAX_RATES', DB_TABLE_PREFIX . 'tax_rates');
define('TABLE_GEO_ZONES', DB_TABLE_PREFIX . 'geo_zones');
+ define('TABLE_WEIGHT_CLASS', DB_TABLE_PREFIX . 'weight_classes');
+ define('TABLE_WEIGHT_CLASS_RULES', DB_TABLE_PREFIX . 'weight_classes_rules');
define('TABLE_ZONES_TO_GEO_ZONES', DB_TABLE_PREFIX . 'zones_to_geo_zones');
define('TABLE_WHOS_ONLINE', DB_TABLE_PREFIX . 'whos_online');
define('TABLE_ZONES', DB_TABLE_PREFIX . 'zones');
----------
catalog /catalog /includes /classes
weight.php added at 1.1
diff -N weight.php
--- /dev/null Thu Apr 15 18:05:37 2004
+++ /tmp/cvsAAADmayE5 Thu Apr 15 18:05:37 2004
@@ -0,0 +1,68 @@
+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ class osC_Weight {
+ var $weight_classes = array(),
+ $decimal_point,
+ $thousands_point,
+ $precision;
+
+// class constructor
+ function osC_Weight($decimal_point = '.', $thousands_point = '', $precision = '2') {
+ $this->decimal_point = $decimal_point;
+ $this->thousands_point = $thousands_point;
+ $this->precision = $precision;
+
+ $this->prepareRules();
+ }
+
+ function prepareRules() {
+ global $osC_Database, $osC_Session;
+
+ $Qrules = $osC_Database->query('select r.weight_class_from_id, r.weight_class_to_id, r.weight_class_rule from :table_weight_class_rules r, :table_weight_class c where c.weight_class_id = r.weight_class_from_id');
+ $Qrules->bindRaw(':table_weight_class_rules', TABLE_WEIGHT_CLASS_RULES);
+ $Qrules->bindRaw(':table_weight_class', TABLE_WEIGHT_CLASS);
+ $Qrules->setCache('weight-rules');
+ $Qrules->execute();
+
+ while ($Qrules->next()) {
+ $this->weight_classes[$Qrules->valueInt('weight_class_from_id')][$Qrules->valueInt('weight_class_to_id')] = $Qrules->value('weight_class_rule');
+ }
+
+ $Qclasses = $osC_Database->query('select weight_class_id, weight_class_key, weight_class_title from :table_weight_class where language_id = :language_id');
+ $Qclasses->bindRaw(':table_weight_class', TABLE_WEIGHT_CLASS);
+ $Qclasses->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qclasses->setCache('weight-classes');
+ $Qclasses->execute();
+
+ while ($Qclasses->next()) {
+ $this->weight_classes[$Qclasses->valueInt('weight_class_id')]['key'] = $Qclasses->value('weight_class_key');
+ $this->weight_classes[$Qclasses->valueInt('weight_class_id')]['title'] = $Qclasses->value('weight_class_title');
+ }
+
+ $Qrules->freeResult();
+ $Qclasses->freeResult();
+ }
+
+ function convert($value, $unit_from, $unit_to) {
+ if ($unit_from == $unit_to) {
+ return number_format($value, (int)$this->precision, $this->decimal_point, $this->thousands_point);
+ } else {
+ return number_format($value * $this->weight_classes[(int)$unit_from][(int)$unit_to], (int)$this->precision, $this->decimal_point, $this->thousands_point);
+ }
+ }
+
+ function display($value, $class) {
+ return number_format($value, (int)$this->precision, $this->decimal_point, $this->thousands_point) . $this->weight_classes[$class]['key'];
+ }
+ }
+?>
----------
catalog /catalog /includes /classes
shopping_cart.php 1.37 -> 1.38
diff -u -r1.37 -r1.38
--- shopping_cart.php 2004/02/16 00:54:56 1.37
+++ shopping_cart.php 2004/04/15 16:05:36 1.38
@@ -212,7 +212,7 @@
}
function calculate() {
- global $osC_Tax;
+ global $osC_Tax, $osC_Weight;
$this->total = 0;
$this->weight = 0;
@@ -223,12 +223,13 @@
$qty = $this->contents[$products_id]['qty'];
// products price
- $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
+ $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight, products_weight_class from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
if ($product = tep_db_fetch_array($product_query)) {
$prid = $product['products_id'];
$products_tax = $osC_Tax->getTaxRate($product['products_tax_class_id']);
$products_price = $product['products_price'];
- $products_weight = $product['products_weight'];
+
+ $products_weight = $osC_Weight->convert($product['products_weight'], $product['products_weight_class'], SHIPPING_WEIGHT_UNIT);
$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");
if (tep_db_num_rows ($specials_query)) {
----------
catalog /catalog /includes /languages /english /modules /shipping
zones.php 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- zones.php 2002/11/19 01:48:08 1.3
+++ zones.php 2004/04/15 16:05:38 1.4
@@ -13,7 +13,6 @@
define('MODULE_SHIPPING_ZONES_TEXT_TITLE', 'Zone Rates');
define('MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION', 'Zone Based Rates');
define('MODULE_SHIPPING_ZONES_TEXT_WAY', 'Shipping to');
-define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'lb(s)');
define('MODULE_SHIPPING_ZONES_INVALID_ZONE', 'No shipping available to the selected country');
define('MODULE_SHIPPING_ZONES_UNDEFINED_RATE', 'The shipping rate cannot be determined at this time');
?>
----------
catalog /catalog /includes /modules
product_listing.php 1.47 -> 1.48
diff -u -r1.47 -r1.48
--- product_listing.php 2004/04/13 08:00:26 1.47
+++ product_listing.php 2004/04/15 16:05:39 1.48
@@ -118,7 +118,7 @@
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_align = 'right';
- $lc_text = ' ' . $listing['products_weight'] . ' ';
+ $lc_text = ' ' . $osC_Weight->display($listing['products_weight'], $listing['products_weight_class']) . ' ';
break;
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
----------
catalog /catalog /includes /modules /shipping
table.php 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- table.php 2003/11/17 20:36:50 1.28
+++ table.php 2004/04/15 16:05:40 1.29
@@ -46,12 +46,12 @@
// class methods
function quote($method = '') {
- global $osC_Tax, $order, $cart, $shipping_weight, $shipping_num_boxes;
+ global $osC_Tax, $order, $cart, $shipping_weight, $shipping_num_boxes, $osC_Weight;
if (MODULE_SHIPPING_TABLE_MODE == 'price') {
$order_total = $cart->show_total();
} else {
- $order_total = $shipping_weight;
+ $order_total = $shipping_weight = $osC_Weight->convert($shipping_weight, SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_TABLE_WEIGHT_UNIT);
}
$table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_COST);
@@ -99,6 +99,7 @@
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_TABLE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_TABLE_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_TABLE_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Module weight Unit', 'MODULE_SHIPPING_TABLE_WEIGHT_UNIT', '2', 'What unit of weight does this shipping module use?.', '6', '0', 'tep_get_weight_class_title', 'tep_cfg_pull_down_weight_classes(', now())");
}
function remove() {
@@ -106,7 +107,7 @@
}
function keys() {
- return array('MODULE_SHIPPING_TABLE_STATUS', 'MODULE_SHIPPING_TABLE_COST', 'MODULE_SHIPPING_TABLE_MODE', 'MODULE_SHIPPING_TABLE_HANDLING', 'MODULE_SHIPPING_TABLE_TAX_CLASS', 'MODULE_SHIPPING_TABLE_ZONE', 'MODULE_SHIPPING_TABLE_SORT_ORDER');
+ return array('MODULE_SHIPPING_TABLE_STATUS', 'MODULE_SHIPPING_TABLE_COST', 'MODULE_SHIPPING_TABLE_MODE', 'MODULE_SHIPPING_TABLE_HANDLING', 'MODULE_SHIPPING_TABLE_TAX_CLASS', 'MODULE_SHIPPING_TABLE_ZONE', 'MODULE_SHIPPING_TABLE_SORT_ORDER', 'MODULE_SHIPPING_TABLE_WEIGHT_UNIT');
}
}
?>
----------
catalog /catalog /includes /modules /shipping
ups.php 1.55 -> 1.56
diff -u -r1.55 -r1.56
--- ups.php 2003/11/17 20:36:50 1.55
+++ ups.php 2004/04/15 16:05:40 1.56
@@ -68,7 +68,7 @@
// class methods
function quote($method = '') {
- global $osC_Tax, $order, $shipping_weight, $shipping_num_boxes;
+ global $osC_Tax, $order, $shipping_weight, $shipping_num_boxes, $osC_Weight;
if (tep_not_null($method) && isset($this->types[$method])) {
$prod = $method;
@@ -80,6 +80,8 @@
$this->_upsProduct($prod);
+ $shipping_weight = $osC_Weight->convert($shipping_weight, SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_UPS_WEIGHT_UNIT);
+
$country_name = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
$this->_upsOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);
$this->_upsDest($order->delivery['postcode'], $order->delivery['country']['iso_code_2']);
@@ -135,6 +137,7 @@
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_UPS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_UPS_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_SHIPPING_UPS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Module weight Unit', 'MODULE_SHIPPING_UPS_WEIGHT_UNIT', '2', 'What unit of weight does this shipping module use?.', '6', '0', 'tep_get_weight_class_title', 'tep_cfg_pull_down_weight_classes(', now())");
}
function remove() {
@@ -142,7 +145,7 @@
}
function keys() {
- return array('MODULE_SHIPPING_UPS_STATUS', 'MODULE_SHIPPING_UPS_PICKUP', 'MODULE_SHIPPING_UPS_PACKAGE', 'MODULE_SHIPPING_UPS_RES', 'MODULE_SHIPPING_UPS_HANDLING', 'MODULE_SHIPPING_UPS_TAX_CLASS', 'MODULE_SHIPPING_UPS_ZONE', 'MODULE_SHIPPING_UPS_SORT_ORDER');
+ return array('MODULE_SHIPPING_UPS_STATUS', 'MODULE_SHIPPING_UPS_PICKUP', 'MODULE_SHIPPING_UPS_PACKAGE', 'MODULE_SHIPPING_UPS_RES', 'MODULE_SHIPPING_UPS_HANDLING', 'MODULE_SHIPPING_UPS_TAX_CLASS', 'MODULE_SHIPPING_UPS_ZONE', 'MODULE_SHIPPING_UPS_SORT_ORDER', 'MODULE_SHIPPING_UPS_WEIGHT_UNIT');
}
function _upsProduct($prod){
----------
catalog /catalog /includes /modules /shipping
zones.php 1.21 -> 1.22
diff -u -r1.21 -r1.22
--- zones.php 2003/11/17 20:36:50 1.21
+++ zones.php 2004/04/15 16:05:40 1.22
@@ -113,12 +113,14 @@
// class methods
function quote($method = '') {
- global $osC_Tax, $order, $shipping_weight, $shipping_num_boxes;
+ global $osC_Tax, $order, $shipping_weight, $shipping_num_boxes, $osC_Weight;
$dest_country = $order->delivery['country']['iso_code_2'];
$dest_zone = 0;
$error = false;
+ $shipping_weight = $osC_Weight->convert($shipping_weight, SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_ZONES_WEIGHT_UNIT);
+
for ($i=1; $i<=$this->num_zones; $i++) {
$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
$country_zones = split("[,]", $countries_table);
@@ -139,7 +141,7 @@
for ($i=0; $i<$size; $i+=2) {
if ($shipping_weight <= $zones_table[$i]) {
$shipping = $zones_table[$i+1];
- $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;
+ $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country . ' : ' . $osC_Weight->display($shipping_weight, MODULE_SHIPPING_ZONES_WEIGHT_UNIT);
break;
}
}
@@ -190,6 +192,7 @@
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Countries', 'MODULE_SHIPPING_ZONES_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_ZONES_COST_" . $i ."', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '6', '0', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Handling Fee', 'MODULE_SHIPPING_ZONES_HANDLING_" . $i."', '0', 'Handling Fee for this shipping zone', '6', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Module weight Unit', 'MODULE_SHIPPING_ZONES_WEIGHT_UNIT', '2', 'What unit of weight does this shipping module use?.', '6', '0', 'tep_get_weight_class_title', 'tep_cfg_pull_down_weight_classes(', now())");
}
}
@@ -198,7 +201,7 @@
}
function keys() {
- $keys = array('MODULE_SHIPPING_ZONES_STATUS', 'MODULE_SHIPPING_ZONES_TAX_CLASS', 'MODULE_SHIPPING_ZONES_SORT_ORDER');
+ $keys = array('MODULE_SHIPPING_ZONES_STATUS', 'MODULE_SHIPPING_ZONES_TAX_CLASS', 'MODULE_SHIPPING_ZONES_SORT_ORDER', 'MODULE_SHIPPING_ZONES_WEIGHT_UNIT');
for ($i=1; $i<=$this->num_zones; $i++) {
$keys[] = 'MODULE_SHIPPING_ZONES_COUNTRIES_' . $i;
----------
catalog /catalog /install
oscommerce.sql 1.95 -> 1.96
diff -u -r1.95 -r1.96
--- oscommerce.sql 2004/04/14 23:24:40 1.95
+++ oscommerce.sql 2004/04/15 16:05:41 1.96
@@ -383,6 +383,7 @@
products_last_modified datetime,
products_date_available datetime,
products_weight decimal(5,2) NOT NULL,
+ products_weight_class int NOT NULL,
products_status tinyint(1) NOT NULL,
products_tax_class_id int NOT NULL,
manufacturers_id int NULL,
@@ -537,6 +538,21 @@
PRIMARY KEY (geo_zone_id)
);
+DROP TABLE IF EXISTS osc_weight_classes;
+CREATE TABLE osc_weight_classes (
+ weight_class_id int NOT NULL default '0',
+ weight_class_key varchar(4) NOT NULL default '',
+ language_id int NOT NULL default '0',
+ weight_class_title varchar(32) NOT NULL default '',
+ PRIMARY KEY (weight_class_id, language_id)
+);
+
+DROP TABLE IF EXISTS osc_weight_classes_rules;
+CREATE TABLE osc_weight_classes_rules (
+ weight_class_from_id int(11) NOT NULL default '0',
+ weight_class_to_id int(11) NOT NULL default '0',
+ weight_class_rule decimal(15,4) NOT NULL default '0.0000'
+);
DROP TABLE IF EXISTS osc_whos_online;
CREATE TABLE osc_whos_online (
customer_id int,
@@ -680,6 +696,7 @@
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Enter the Maximum Package Weight you will ship', 'SHIPPING_MAX_WEIGHT', '50', 'Carriers have a max weight limit for a single package. This is a common one for all.', '7', '3', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Package Tare weight.', 'SHIPPING_BOX_WEIGHT', '3', 'What is the weight of typical packaging of small to medium packages?', '7', '4', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Larger packages - percentage increase.', 'SHIPPING_BOX_PADDING', '10', 'For 10% enter 10', '7', '5', now());
+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Default Shipping Unit', 'SHIPPING_WEIGHT_UNIT',2, 'Select the unit of weight to be used for shipping.', '7', '6', 'tep_get_weight_class_title', 'tep_cfg_pull_down_weight_classes(', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Product Image', 'PRODUCT_LIST_IMAGE', '1', 'Do you want to display the Product Image?', '8', '1', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Product Manufaturer Name','PRODUCT_LIST_MANUFACTURER', '0', 'Do you want to display the Product Manufacturer Name?', '8', '2', now());
@@ -1011,6 +1028,32 @@
INSERT INTO osc_geo_zones (geo_zone_id,geo_zone_name,geo_zone_description,date_added) VALUES (1,"Florida","Florida local sales tax zone",now());
INSERT INTO osc_zones_to_geo_zones (association_id,zone_country_id,zone_id,geo_zone_id,date_added) VALUES (1,223,18,1,now());
+# Weight Classes
+INSERT INTO osc_weight_classes VALUES (1, 'g', 1, 'Gram(s)');
+INSERT INTO osc_weight_classes VALUES (1, 'g', 2, 'Gram(s)');
+INSERT INTO osc_weight_classes VALUES (1, 'g', 3, 'Gram(s)');
+INSERT INTO osc_weight_classes VALUES (2, 'kg', 1, 'Kilogram(s)');
+INSERT INTO osc_weight_classes VALUES (2, 'kg', 2, 'Kilogram(s)');
+INSERT INTO osc_weight_classes VALUES (2, 'kg', 3, 'Kilogram(s)');
+INSERT INTO osc_weight_classes VALUES (3, 'oz', 1, 'Ounce(s)');
+INSERT INTO osc_weight_classes VALUES (3, 'oz', 2, 'Ounce(s)');
+INSERT INTO osc_weight_classes VALUES (3, 'oz', 3, 'Ounce(s)');
+INSERT INTO osc_weight_classes VALUES (4, 'lb', 1, 'Pound(s)');
+INSERT INTO osc_weight_classes VALUES (4, 'lb', 2, 'Pound(s)');
+INSERT INTO osc_weight_classes VALUES (4, 'lb', 3, 'Pound(s)');
+
+INSERT INTO osc_weight_classes_rules VALUES (1, 2, '0.0010');
+INSERT INTO osc_weight_classes_rules VALUES (1, 3, '0.0352');
+INSERT INTO osc_weight_classes_rules VALUES (1, 4, '0.0022');
+INSERT INTO osc_weight_classes_rules VALUES (2, 1, '1000.0000');
+INSERT INTO osc_weight_classes_rules VALUES (2, 3, '35.2739');
+INSERT INTO osc_weight_classes_rules VALUES (2, 4, '2.2046');
+INSERT INTO osc_weight_classes_rules VALUES (3, 1, '28.3495');
+INSERT INTO osc_weight_classes_rules VALUES (3, 2, '0.0283');
+INSERT INTO osc_weight_classes_rules VALUES (3, 4, '0.0625');
+INSERT INTO osc_weight_classes_rules VALUES (4, 1, '453.5923');
+INSERT INTO osc_weight_classes_rules VALUES (4, 2, '0.4535');
+INSERT INTO osc_weight_classes_rules VALUES (4, 3, '16.0000');
# USA
INSERT INTO osc_zones VALUES (1,223,'AL','Alabama');
INSERT INTO osc_zones VALUES (2,223,'AK','Alaska');
----------
catalog /catalog /install
oscommerce_sample_data.sql 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- oscommerce_sample_data.sql 2004/04/14 23:24:40 1.3
+++ oscommerce_sample_data.sql 2004/04/15 16:05:41 1.4
@@ -147,33 +147,33 @@
INSERT INTO osc_manufacturers_info VALUES (9, 2, 'http://www.hewlettpackard.de', 0, null);
INSERT INTO osc_manufacturers_info VALUES (9, 3, 'http://welcome.hp.com/country/es/spa/welcome.htm', 0, null);
-INSERT INTO osc_products VALUES (1,32,'MG200MMS','matrox/mg200mms.gif',299.99, now(),null,'',23.00,1,1,1,0);
-INSERT INTO osc_products VALUES (2,32,'MG400-32MB','matrox/mg400-32mb.gif',499.99, now(),null,'',23.00,1,1,1,0);
-INSERT INTO osc_products VALUES (3,2,'MSIMPRO','microsoft/msimpro.gif',49.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (4,13,'DVD-RPMK','dvd/replacement_killers.gif',42.00, now(),null,'',23.00,1,1,2,0);
-INSERT INTO osc_products VALUES (5,17,'DVD-BLDRNDC','dvd/blade_runner.gif',35.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (6,10,'DVD-MATR','dvd/the_matrix.gif',39.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (7,10,'DVD-YGEM','dvd/youve_got_mail.gif',34.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (8,10,'DVD-ABUG','dvd/a_bugs_life.gif',35.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (9,10,'DVD-UNSG','dvd/under_siege.gif',29.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (10,10,'DVD-UNSG2','dvd/under_siege2.gif',29.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (11,10,'DVD-FDBL','dvd/fire_down_below.gif',29.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (12,10,'DVD-DHWV','dvd/die_hard_3.gif',39.99, now(),null,'',7.00,1,1,4,0);
-INSERT INTO osc_products VALUES (13,10,'DVD-LTWP','dvd/lethal_weapon.gif',34.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (14,10,'DVD-REDC','dvd/red_corner.gif',32.00, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (15,10,'DVD-FRAN','dvd/frantic.gif',35.00, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (16,10,'DVD-CUFI','dvd/courage_under_fire.gif',38.99, now(),null,'',7.00,1,1,4,0);
-INSERT INTO osc_products VALUES (17,10,'DVD-SPEED','dvd/speed.gif',39.99, now(),null,'',7.00,1,1,4,0);
-INSERT INTO osc_products VALUES (18,10,'DVD-SPEED2','dvd/speed_2.gif',42.00, now(),null,'',7.00,1,1,4,0);
-INSERT INTO osc_products VALUES (19,10,'DVD-TSAB','dvd/theres_something_about_mary.gif',49.99, now(),null,'',7.00,1,1,4,0);
-INSERT INTO osc_products VALUES (20,10,'DVD-BELOVED','dvd/beloved.gif',54.99, now(),null,'',7.00,1,1,3,0);
-INSERT INTO osc_products VALUES (21,16,'PC-SWAT3','sierra/swat_3.gif',79.99, now(),null,'',7.00,1,1,7,0);
-INSERT INTO osc_products VALUES (22,13,'PC-UNTM','gt_interactive/unreal_tournament.gif',89.99, now(),null,'',7.00,1,1,8,0);
-INSERT INTO osc_products VALUES (23,16,'PC-TWOF','gt_interactive/wheel_of_time.gif',99.99, now(),null,'',10.00,1,1,8,0);
-INSERT INTO osc_products VALUES (24,17,'PC-DISC','gt_interactive/disciples.gif',90.00, now(),null,'',8.00,1,1,8,0);
-INSERT INTO osc_products VALUES (25,16,'MSINTKB','microsoft/intkeyboardps2.gif',69.99, now(),null,'',8.00,1,1,2,0);
-INSERT INTO osc_products VALUES (26,10,'MSIMEXP','microsoft/imexplorer.gif',64.95, now(),null,'',8.00,1,1,2,0);
-INSERT INTO osc_products VALUES (27,8,'HPLJ1100XI','hewlett_packard/lj1100xi.gif',499.99, now(),null,'',45.00,1,1,9,0);
+INSERT INTO osc_products VALUES (1,32,'MG200MMS','matrox/mg200mms.gif',299.99, now(),null,'',23.00,2,1,1,1,0);
+INSERT INTO osc_products VALUES (2,32,'MG400-32MB','matrox/mg400-32mb.gif',499.99, now(),null,'',23.00,2,1,1,1,0);
+INSERT INTO osc_products VALUES (3,2,'MSIMPRO','microsoft/msimpro.gif',49.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (4,13,'DVD-RPMK','dvd/replacement_killers.gif',42.00, now(),null,'',23.00,2,1,1,2,0);
+INSERT INTO osc_products VALUES (5,17,'DVD-BLDRNDC','dvd/blade_runner.gif',35.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (6,10,'DVD-MATR','dvd/the_matrix.gif',39.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (7,10,'DVD-YGEM','dvd/youve_got_mail.gif',34.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (8,10,'DVD-ABUG','dvd/a_bugs_life.gif',35.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (9,10,'DVD-UNSG','dvd/under_siege.gif',29.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (10,10,'DVD-UNSG2','dvd/under_siege2.gif',29.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (11,10,'DVD-FDBL','dvd/fire_down_below.gif',29.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (12,10,'DVD-DHWV','dvd/die_hard_3.gif',39.99, now(),null,'',7.00,2,1,1,4,0);
+INSERT INTO osc_products VALUES (13,10,'DVD-LTWP','dvd/lethal_weapon.gif',34.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (14,10,'DVD-REDC','dvd/red_corner.gif',32.00, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (15,10,'DVD-FRAN','dvd/frantic.gif',35.00, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (16,10,'DVD-CUFI','dvd/courage_under_fire.gif',38.99, now(),null,'',7.00,2,1,1,4,0);
+INSERT INTO osc_products VALUES (17,10,'DVD-SPEED','dvd/speed.gif',39.99, now(),null,'',7.00,2,1,1,4,0);
+INSERT INTO osc_products VALUES (18,10,'DVD-SPEED2','dvd/speed_2.gif',42.00, now(),null,'',7.00,2,1,1,4,0);
+INSERT INTO osc_products VALUES (19,10,'DVD-TSAB','dvd/theres_something_about_mary.gif',49.99, now(),null,'',7.00,2,1,1,4,0);
+INSERT INTO osc_products VALUES (20,10,'DVD-BELOVED','dvd/beloved.gif',54.99, now(),null,'',7.00,2,1,1,3,0);
+INSERT INTO osc_products VALUES (21,16,'PC-SWAT3','sierra/swat_3.gif',79.99, now(),null,'',7.00,2,1,1,7,0);
+INSERT INTO osc_products VALUES (22,13,'PC-UNTM','gt_interactive/unreal_tournament.gif',89.99, now(),null,'',7.00,2,1,1,8,0);
+INSERT INTO osc_products VALUES (23,16,'PC-TWOF','gt_interactive/wheel_of_time.gif',99.99, now(),null,'',10.00,2,1,1,8,0);
+INSERT INTO osc_products VALUES (24,17,'PC-DISC','gt_interactive/disciples.gif',90.00, now(),null,'',8.00,2,1,1,8,0);
+INSERT INTO osc_products VALUES (25,16,'MSINTKB','microsoft/intkeyboardps2.gif',69.99, now(),null,'',8.00,2,1,1,2,0);
+INSERT INTO osc_products VALUES (26,10,'MSIMEXP','microsoft/imexplorer.gif',64.95, now(),null,'',8.00,2,1,1,2,0);
+INSERT INTO osc_products VALUES (27,8,'HPLJ1100XI','hewlett_packard/lj1100xi.gif',499.99, now(),null,'',45.00,2,1,1,9,0);
INSERT INTO osc_products_description VALUES (1,1,'Matrox G200 MMS','Reinforcing its position as a multi-monitor trailblazer, Matrox Graphics Inc. has once again developed the most flexible and highly advanced solution in the industry. Introducing the new Matrox G200 Multi-Monitor Series; the first graphics card ever to support up to four DVI digital flat panel displays on a single 8" PCI board.<br><br>With continuing demand for digital flat panels in the financial workplace, the Matrox G200 MMS is the ultimate in flexible solutions. The Matrox G200 MMS also supports the new digital video interface (DVI) created by the Digital Display Working Group (DDWG) designed to ease the adoption of digital flat panels. Other configurations include composite video capture ability and onboard TV tuner, making the Matrox G200 MMS the complete solution for business needs.<br>
<br>Based on the award-winning MGA-G200 graphics chip, the Matrox G200 Multi-Monitor
Series provides superior 2D/3D graphics acceleration to meet the demanding needs of business applications such as real-time stock quotes (Versus), live video feeds (Reuters & Bloombergs), multiple windows applications, word processing, spreadsheets and CAD.','www.matrox.com/mga/products/g200_mms/home.cfm',0);
INSERT INTO osc_products_description VALUES (2,1,'Matrox G400 32MB','<b>Dramatically Different High Performance Graphics</b><br><br>Introducing the Millennium G400 Series - a dramatically different, high performance graphics experience. Armed with the industry\'s fastest graphics chip, the Millennium G400 Series takes explosive acceleration two steps further by adding unprecedented image quality, along with the most versatile display options for all your 3D, 2D and DVD applications. As the most powerful and innovative tools in your PC\'s arsenal, the Millennium G400 Series will not only change the way you see graphics, but will revolutionize the way you use your computer.<br><br><b>Key features:</b><ul><li>New Matrox G400 256-bit DualBus graphics chip</li><li>Explosive 3D, 2D and DVD performance</li><li>
DualHead Display</li><li>Superior DVD and TV output</li><li>3D Env
ironment-Mapped Bump Mapping</li><li>Vibrant Color Quality rendering </li><li>UltraSharp DAC of up to 360 MHz</li><li>3D Rendering Array Processor</li><li>Support for 16 or 32 MB of memory</li></ul>','www.matrox.com/mga/products/mill_g400/home.htm',0);
CVSspam 0.2.8
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click