Convert WebGUI::Shop::Products over to be object oriented.

Update the tests and Content plugin for the Shop.
Add the Products screen to the Shop admin screen.
Add exception handling to www_import.
Add a status message to the manage products screen.
This commit is contained in:
Colin Kuskie 2008-06-09 21:52:59 +00:00
parent b137688f65
commit 1fd425ac96
5 changed files with 102 additions and 41 deletions

View file

@ -200,8 +200,9 @@ sub www_products {
my $session = shift;
my $output = undef;
my $method = "www_".$session->form->get("method");
my $products = WebGUI::Shop::Products->new($session);
if ($method ne "www_" && WebGUI::Shop::Products->can($method)) {
$output = $WebGUI::Shop::Products->$method($session);
$output = $products->$method();
}
else {
WebGUI::Error::MethodNotFound->throw(error=>"Couldn't call non-existant method $method", method=>$method);