Fix a variable clash in the Cart www_view method.

This commit is contained in:
Colin Kuskie 2008-08-25 01:59:22 +00:00
parent 8263e0a0c6
commit b4559e8935
2 changed files with 4 additions and 3 deletions

View file

@ -4,6 +4,7 @@
- fixed: Asset view time format problem
- fixed: DataForm doesn't work properly with internationalized fields
- fixed: incoming data not properly decoded from utf8
- fixed: Can't call method "getSku" on unblessed reference
7.5.22
- fixed: Layout template now gets prepared correctly

View file

@ -695,8 +695,8 @@ sub www_view {
</script>
|);
my @items = @{$self->getItems};
if(scalar(@items) < 1) {
my @cartItems = @{$self->getItems};
if(scalar(@cartItems) < 1) {
# there are no items in the cart, return a message to the template
my %var = (
message => $i18n->get('empty cart')
@ -708,7 +708,7 @@ sub www_view {
}
# generate template variables for the items in the cart
foreach my $item (@items) {
foreach my $item (@cartItems) {
my $sku = $item->getSku;
$sku->applyOptions($item->get("options"));
my %properties = (