web interface for importing and exporting products. Additional tests for the import/export API

This commit is contained in:
Colin Kuskie 2008-06-05 04:10:48 +00:00
parent 9a9e94a0de
commit 994da561a5
7 changed files with 264 additions and 88 deletions

View file

@ -21,6 +21,7 @@ use WebGUI::Shop::AddressBook;
use WebGUI::Shop::Cart;
use WebGUI::Shop::Credit;
use WebGUI::Shop::Pay;
use WebGUI::Shop::Products;
use WebGUI::Shop::Ship;
use WebGUI::Shop::Tax;
use WebGUI::Shop::Transaction;
@ -189,6 +190,27 @@ sub www_pay {
#-------------------------------------------------------------------
=head2 www_products ()
Hand off to the tax system.
=cut
sub www_products {
my $session = shift;
my $output = undef;
my $method = "www_".$session->form->get("method");
if ($method ne "www_" && WebGUI::Shop::Products->can($method)) {
$output = $WebGUI::Shop::Products->$method($session);
}
else {
WebGUI::Error::MethodNotFound->throw(error=>"Couldn't call non-existant method $method", method=>$method);
}
return $output;
}
#-------------------------------------------------------------------
=head2 www_ship ()
Hand off to the shipper.