added commerce ui glue
This commit is contained in:
parent
4a73cadf64
commit
152e96f695
2 changed files with 166 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue