Revision 572

Date:
2016/05/05 11:34:02
Author:
ahitrov
Revision Log:
price_format - uninitialized value check.
payment::Operation check moved to post_store

Files:

Legend:

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

     
    225 225 my $self = shift;
    226 226 my $basket = shift;
    227 227 return (0,0) unless ref $basket eq 'ARRAY' && @$basket;
    228 my (%opts) = @_;
    229 my $with_products = delete $opts{with_products};
    228 230
    229 231 my $total = 0;
    230 232 my $sum = 0;
     
    233 235 $total += $item->number;
    234 236 if ( exists $item->{item} ) {
    235 237 $sum += $item->number * $item->{item}->price;
    236 } else {
    238 } elsif ( !$with_products ) {
    237 239 $sum += $item->number * $item->price;
    238 240 }
    239 241 }
     
    555 557 my $self = shift;
    556 558 my $price = shift;
    557 559
    558 $price = reverse $price;
    559 $price =~ s/(\d{3})/$1\ /g;
    560 $price = reverse $price;
    560 if ( defined $price ) {
    561 $price = reverse $price;
    562 $price =~ s/(\d{3})/$1\ /g;
    563 $price = reverse $price;
    564 }
    561 565
    562 566 return $price;
    563 567 }
  • utf8/plugins/webshop/lib/webshop/Order.pm

     
    140 140 ];
    141 141 }
    142 142
    143 sub pre_store
    143 sub post_store
    144 144 {
    145 145 my $self = shift;
    146 146