added commerce ui glue

This commit is contained in:
JT Smith 2008-02-27 16:30:10 +00:00
parent 4a73cadf64
commit 152e96f695
2 changed files with 166 additions and 0 deletions

View file

@ -30,10 +30,25 @@ migrateToNewCart($session);
createSkuAsset($session);
createDonationAsset($session);
addShippingDrivers($session);
addShoppingHandler($session);
finish($session); # this line required
#-------------------------------------------------
sub addShoppingHandler {
my $session = shift;
print "\tInstalling shopping handler.\n" unless ($quiet);
my @changed = ();
foreach my $handler (@{$session->config->get("contentHandlers")}) {
if ($handler eq "WebGUI::Content::Asset") {
push(@changed, "WebGUI::Content::Shop");
}
push(@changed, $handler);
}
$session->config->set("contentHandlers", \@changed);
}
#-------------------------------------------------
sub createDonationAsset {
my $session = shift;