package II4a144957236f1ce1368c1e9a7f6f93a1; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; use IIf404c8dfc046e4729558b9aff233579c; use IIc9f035ff8503e79af87975c1cfc1fd75; use II643980db0eff8ffddddadf3d41cd5160; use II45298276f2ceead201769afaf1ecc71b; BEGIN{*II4a144957236f1ce1368c1e9a7f6f93a1::lIlIIIIIIlIIIlIl=\%{pack('H6','7c7f13')^'91E'};*II4a144957236f1ce1368c1e9a7f6f93a1::llIllllIlllIlIlI=\&{pack('H24','38273a2c0b753868095b410c')^'UFSB1OKP>998'};$II4a144957236f1ce1368c1e9a7f6f93a1::IIIlIlllIllIlIIl=pack('H18','701f6c07680607116e')^'8K8W7NHB:';$II4a144957236f1ce1368c1e9a7f6f93a1::IlIlIllIIlIlIIll=pack('H12','7a79077a0f7f')^'00I6F<'};sub mnt_methods { my ($class, $C) = @_; my $in = $C->{INPUT}; my $order = II643980db0eff8ffddddadf3d41cd5160::IlIIIllIllIIllII($II45298276f2ceead201769afaf1ecc71b::IIIlIlllIlIIllII{$II720d6e18aa34327713eb014408fc9144::IIIllIIlIlllIIll},11,$II45298276f2ceead201769afaf1ecc71b::IIIlIlllIlIIllII{$IIf404c8dfc046e4729558b9aff233579c::lIIlIIlIIIIlIlII})->get($in->{order_id}); die "failed to find order record [$in->{order_id}]" unless $order->stored; for my $f (grep { /^user_/ || /^shipping_/ } keys %$in) { $order->{$f} = $in->{$f}; } unless ($order->{shipping_country} || $order->{user_country}) { $C->{DisplayNoAddress} = 1; return; } my @seq = $order->getSalesList; unless (@seq) { $C->{DisplayNoProducts} = 1; return; } my $n; for ($n = 0; $n < @seq; $n++) { last unless $seq[$n]{paid}; } return if $n == @seq; my $sale = $seq[$n] or die "sale record unavailable"; my $prod = $sale->getProduct or die "product record unavailable"; if ($sale->{shipping_id}) { $C->{DisplayUnshipping} = 1; $C->{CurrentShipping} = II4a144957236f1ce1368c1e9a7f6f93a1::llIllllIlllIlIlI($II45298276f2ceead201769afaf1ecc71b::lIlIlIIIlIlIlllI{$IIf404c8dfc046e4729558b9aff233579c::lllIIIlIlIlIlllI},22,$II45298276f2ceead201769afaf1ecc71b::lIlIlIIIlIlIlllI{$II45298276f2ceead201769afaf1ecc71b::IllllllllIIllIII})->get($sale->{shipping_id})->getView; $C->{CurrentShippingPrice} = II720d6e18aa34327713eb014408fc9144::IIllIIIlIIllllII($II720d6e18aa34327713eb014408fc9144::lIlIIIIlIllllIIl{$II643980db0eff8ffddddadf3d41cd5160::IlIIllIIlIlIIIIl},81,$II720d6e18aa34327713eb014408fc9144::lIlIIIIlIllllIIl{$II720d6e18aa34327713eb014408fc9144::llIIIIIlllllIlIl})->formatAmount($sale->{amount_shipping}); } else { my $sg_id; if ($order->{is_bulk}) { my @sg = map { IIf404c8dfc046e4729558b9aff233579c::llIlIllIIIIIIllI($II643980db0eff8ffddddadf3d41cd5160::llIlIIllIIIIIlII{$II45298276f2ceead201769afaf1ecc71b::lllIllIIIlllllll},23,$II643980db0eff8ffddddadf3d41cd5160::llIlIIllIIIIIlII{$IIc9f035ff8503e79af87975c1cfc1fd75::IIlIIIlIIllIIIII})->get($_) } grep { $_ } map { $_->getProduct->{shipping_group_id} } @seq; if (@sg > 1) { @sg = grep { $_->{prioritized} } @sg; } $sg_id = @sg ? $sg[0]{id} : undef; } else { $sg_id = $sale->getProduct->{shipping_group_id}; } $sg_id ||= 1; my @methods = II643980db0eff8ffddddadf3d41cd5160::IIIlIIlIlIlIlIII($II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$II4a144957236f1ce1368c1e9a7f6f93a1::IIIlIlllIllIlIIl},22,$II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$II4a144957236f1ce1368c1e9a7f6f93a1::IlIlIllIIlIlIIll})->search(group_id => $sg_id); if ($prod->{shipping_group_id}) { } my @sh; for my $sh (@methods) { my $price = $sh->assess($order, $sale); if (ref($price) eq 'ARRAY') { push @sh, { id => "$sh->{id}:$_->{subid}", title => "$sh->{title} - $_->{descr}", price => II643980db0eff8ffddddadf3d41cd5160::IIIlIIlIlIlIlIII($II4a144957236f1ce1368c1e9a7f6f93a1::lIlIIIIIIlIIIlIl{$II720d6e18aa34327713eb014408fc9144::llIlIIIIlIllIIll},81,$II4a144957236f1ce1368c1e9a7f6f93a1::lIlIIIIIIlIIIlIl{$IIc9f035ff8503e79af87975c1cfc1fd75::IIIIIlllIIIllIIl})->formatAmount($_->{price}) } for @$price; } elsif (defined $price) { push @sh, { id => $sh->id, title => $sh->{title}, price => II643980db0eff8ffddddadf3d41cd5160::llllIlllIIlllIlI($IIf404c8dfc046e4729558b9aff233579c::lIllllIIIIlIIIII{$II45298276f2ceead201769afaf1ecc71b::lllIllIIIlllllll},81,$IIf404c8dfc046e4729558b9aff233579c::lIllllIIIIlIIIII{$II643980db0eff8ffddddadf3d41cd5160::lIllIIIllllIIllI})->formatAmount($price) }; } } if (@sh) { $C->{DisplayShipping} = 1; $C->{ShippingList} = [sort { $a->{price} <=> $b->{price} } @sh]; } else { $C->{DisplayNoShipping} = 1; } } return; } 1; 