From 72177f762c8f5ef0c6acc34afedb1bdc98d595c6 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 22 Feb 2008 19:08:32 +0000 Subject: [PATCH] label is already stored in the options, and never used directly in any method. Code that wants it can instanciate an object --- designdocs/shipper.pod | 1 - docs/upgrades/upgrade_7.5.2-7.5.3.pl | 18 ++++++++++++++++++ lib/WebGUI/Shop/ShipDriver.pm | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/designdocs/shipper.pod b/designdocs/shipper.pod index 8e07a4e06..dfcaac2c5 100644 --- a/designdocs/shipper.pod +++ b/designdocs/shipper.pod @@ -83,7 +83,6 @@ The following fields are needed to construct this object's table called "shipper Field Schema Description shipperId guid The unique id for this shipper. - label varchar(100) A title for this shipper that will be displayed to the user. For example "Flat Rate" or "FedEx Overnight" className varchar(255) The plugin classname that will be used for this shipping module. options mediumtext A json serialized hash reference with configuration data for this shipper. diff --git a/docs/upgrades/upgrade_7.5.2-7.5.3.pl b/docs/upgrades/upgrade_7.5.2-7.5.3.pl index acfc3936e..fc663883f 100644 --- a/docs/upgrades/upgrade_7.5.2-7.5.3.pl +++ b/docs/upgrades/upgrade_7.5.2-7.5.3.pl @@ -25,6 +25,7 @@ my $session = start(); # this line required # upgrade functions go here insertCommerceTaxTable($session); +insertCommerceShipDriverTable($session); migrateToNewCart($session); finish($session); # this line required @@ -71,6 +72,23 @@ EOSQL } +#------------------------------------------------- +sub insertCommerceShipDriverTable { + my $session = shift; + print "\tInstall the Commerce ShipperDriver Table.\n" unless ($quiet); + # and here's our code + $session->db->write(<db->write('insert into shipper (shipperId,className) VALUES (?,?)', [$shipperId, $className{$id}]); + #$self->set($options); + return $self; }