Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add zerohide attribute to [coupons display].
  • Loading branch information
racke committed Sep 4, 2010
1 parent 4d811df commit e7147eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/WellWell/Coupon.pm
Expand Up @@ -116,6 +116,11 @@ sub coupons {
$hash{discount_total} = Vend::Tags->subtotal({name => 'main', noformat => 1, nodiscount => 1})
- Vend::Tags->subtotal('main', 1);

if ($opt->{zerohide} && $hash{discount_total} == 0) {
# don't display anything
return;
}

if ($hash{subject} eq 'subtotal') {
$hash{target} = ' all items';
}
Expand Down

0 comments on commit e7147eb

Please sign in to comment.