[wellwell-devel] [wellwell/zoom] Use links for discounted items in [coupons display].

Stefan Hornburg wellwell-devel at rt.icdevgroup.org
Wed Sep 15 10:46:55 UTC 2010


commit 366fec8151ec6729df4bbf69a9ebed37b26526af
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Sat Sep 4 11:44:47 2010 +0200

    Use links for discounted items in [coupons display].

 lib/WellWell/Coupon.pm |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/lib/WellWell/Coupon.pm b/lib/WellWell/Coupon.pm
index 764ad60..509911d 100644
--- a/lib/WellWell/Coupon.pm
+++ b/lib/WellWell/Coupon.pm
@@ -104,7 +104,7 @@ sub coupons {
 	}
 	
 	if ($function eq 'display') {
-		my (@out);
+		my (@out, @links);
 		
 		if (exists $Vend::Session->{coupons}) {
 			$repo = $Vend::Session->{coupons};
@@ -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}));



More information about the wellwell-devel mailing list