Committing the new Ecommerce system
This commit is contained in:
parent
cdd19d2246
commit
1847a18ec7
4 changed files with 395 additions and 0 deletions
20
lib/WebGUI/Commerce/Item.pm
Normal file
20
lib/WebGUI/Commerce/Item.pm
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package WebGUI::Commerce::Item;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub new {
|
||||
my ($class, $namespace, $load, $cmd, $plugin);
|
||||
$class = shift;
|
||||
$id = shift;
|
||||
$namespace = shift;
|
||||
|
||||
$cmd = "WebGUI::Commerce::Item::$namespace";
|
||||
$load = "use $cmd";
|
||||
eval($load);
|
||||
WebGUI::ErrorHandler::warn("Item plugin failed to compile: $cmd.".$@) if($@);
|
||||
$plugin = eval($cmd."->new('$id', '$namespace')");
|
||||
WebGUI::ErrorHandler::warn("Couldn't instantiate Item plugin: $cmd.".$@) if($@);
|
||||
return $plugin;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue