Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use links for discounted items in [coupons display].
  • Loading branch information
racke committed Sep 4, 2010
1 parent 222f431 commit 4d811df
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/WellWell/Coupon.pm
Expand Up @@ -104,7 +104,7 @@ sub coupons {
}

if ($function eq 'display') {
my (@out);
my (@out, @links);

if (exists $Vend::Session->{coupons}) {
$repo = $Vend::Session->{coupons};
Expand All @@ -120,7 +120,14 @@ sub coupons {
$hash{target} = ' all items';
}
elsif ($hash{subject} eq 'product') {
$hash{target} = join(', ', @{$hash{targets}});
my (@links, $url);

for (@{$hash{targets}}) {
$url = Vend::Tags->area($_);
push(@links, qq{<a href="$url">$_</a>});
}

$hash{target} = join(', ', @links);
}

push (@out, Vend::Tags->uc_attr_list({hash => \%hash, body => $body}));
Expand Down

0 comments on commit 4d811df

Please sign in to comment.