label is already stored in the options, and never used directly in any method. Code that wants it can instanciate an object
This commit is contained in:
parent
ac28252d53
commit
72177f762c
3 changed files with 21 additions and 1 deletions
|
|
@ -83,7 +83,6 @@ The following fields are needed to construct this object's table called "shipper
|
||||||
|
|
||||||
Field Schema Description
|
Field Schema Description
|
||||||
shipperId guid The unique id for this shipper.
|
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.
|
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.
|
options mediumtext A json serialized hash reference with configuration data for this shipper.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ my $session = start(); # this line required
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
|
|
||||||
insertCommerceTaxTable($session);
|
insertCommerceTaxTable($session);
|
||||||
|
insertCommerceShipDriverTable($session);
|
||||||
migrateToNewCart($session);
|
migrateToNewCart($session);
|
||||||
|
|
||||||
finish($session); # this line required
|
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(<<EOSQL);
|
||||||
|
|
||||||
|
CREATE TABLE shipper (
|
||||||
|
shipperId VARCHAR(22) binary NOT NULL,
|
||||||
|
className VARCHAR(255),
|
||||||
|
options mediumtext,
|
||||||
|
PRIMARY KEY (shipperId)
|
||||||
|
)
|
||||||
|
EOSQL
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# --------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
# --------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,9 @@ sub create {
|
||||||
$options{ $id } = $options;
|
$options{ $id } = $options;
|
||||||
$className{ $id } = __PACKAGE__;
|
$className{ $id } = __PACKAGE__;
|
||||||
|
|
||||||
|
$session->db->write('insert into shipper (shipperId,className) VALUES (?,?)', [$shipperId, $className{$id}]);
|
||||||
|
#$self->set($options);
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue