Revision 590

Date:
2016/09/12 18:39:00
Author:
ahitrov
Revision Log:
Coupon filtered by product group

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/lib/webshop/Coupon.pm

     
    109 109
    110 110 if ( $self->groups ) {
    111 111 my %groups = map { $_ => 1 } $self->groups;
    112 @basket = grep { scalar (grep { exists $groups{$_} } $_->sections) > 0 || exists $items->{$_->{item}->id} } @basket;
    112 @basket = grep { scalar (grep { exists $groups{$_} } $_->{item}->sections) > 0 || exists $items->{$_->{item}->id} } @basket;
    113 113 } elsif ( keys %$items ) {
    114 114 @basket = grep { exists $items->{$_->{item}->id} } @basket;
    115 115 }