Revision 262

Date:
2012/12/25 09:09:30
Author:
ahitrov
Revision Log:
Procent in delivery discount
Files:

Legend:

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

     
    56 56 if ( ref $price_modify eq 'ARRAY' && @$price_modify ) {
    57 57 foreach my $mod ( @$price_modify ) {
    58 58 if ( $mod->{level} <= $sum ) {
    59 $price = $mod->{cost};
    59 if ( $mod->{cost} =~ /(\d+)%/ ) {
    60 my $mod = $1;
    61 $price = sprintf("%.2f", ($self->price * $mod) / 100);
    62 } else {
    63 $price = $mod->{cost};
    64 }
    60 65 }
    61 66 }
    62 67 }