Made the shopping cart support dynamic item plugins
This commit is contained in:
parent
07cab9a1de
commit
2db563c1cf
2 changed files with 6 additions and 0 deletions
|
|
@ -80,6 +80,10 @@ sub add {
|
|||
|
||||
$item = WebGUI::Commerce::Item->new($self->session,$itemId, $itemType);
|
||||
return "" unless ($item->available);
|
||||
|
||||
# Fetch the itemId from the item plugin in stead of the given parameter.
|
||||
# This allows item plugins to dynamically create new items.
|
||||
$itemId = $item->id;
|
||||
|
||||
$self->{_items}{$itemId."_".$itemType} = {
|
||||
itemId => $itemId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue