projects
/
app-web-oof.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6348c40
)
Take postage prices from environment
author
Marius Gavrilescu
<marius@ieval.ro>
Sat, 28 May 2016 16:52:29 +0000
(17:52 +0100)
committer
Marius Gavrilescu
<marius@ieval.ro>
Sat, 28 May 2016 16:52:29 +0000
(17:52 +0100)
lib/App/Web/Oof.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/App/Web/Oof.pm
b/lib/App/Web/Oof.pm
index a0a4451e8ede4b9081dce3fd499e8ea1525ff862..637f3935180bd294206ca02aec1c83a676c70ed4 100644
(file)
--- a/
lib/App/Web/Oof.pm
+++ b/
lib/App/Web/Oof.pm
@@
-37,6
+37,11
@@
sub HTML::Element::fclass { shift->look_down(class => qr/\b$_[0]\b/) }
##################################################
##################################################
+my $postage_base = $ENV{OOF_POSTAGE_BASE} // 225;
+my $postage_per_item = $ENV{OOF_POSTAGE_PER_ITEM} // 50;
+
+##################################################
+
my %db;
my ($form, $continue, $order, $details, $pay);
my %db;
my ($form, $continue, $order, $details, $pay);
@@
-167,7
+172,7
@@
sub continue_app {
}
$tree->look_down(name => 'discount')->detach unless $dvalue;
$tree->fid('discount_tr')->detach unless $dvalue;
}
$tree->look_down(name => 'discount')->detach unless $dvalue;
$tree->fid('discount_tr')->detach unless $dvalue;
- my $postage =
220 + 50
* ($quant - $quant_freepost);
+ my $postage =
$postage_base + $postage_per_item
* ($quant - $quant_freepost);
$postage = 0 if $quant == $quant_freepost;
$tree->fid('postage')->replace_content(stringify_money $postage);
$total += $postage;
$postage = 0 if $quant == $quant_freepost;
$tree->fid('postage')->replace_content(stringify_money $postage);
$total += $postage;
This page took
0.011197 seconds
and
4
git commands to generate.