diff options
-rw-r--r-- | config/pikul.tag | 14 | ||||
-rw-r--r-- | pages/ord/checkout.html | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/config/pikul.tag b/config/pikul.tag index 17030a7..ea279c2 100644 --- a/config/pikul.tag +++ b/config/pikul.tag @@ -1,7 +1,7 @@ -UserTag pikul Order company district city province +UserTag pikul Order company UserTag pikul Routine <<EOR sub { - my ($company, $district, $city, $province) = @_; + my ($company) = @_; my (@provisions, $origin, $table); if ($company == $::Variable->{PIKUL_ANTERAJA}) { @provisions = ( @@ -18,13 +18,13 @@ sub { } use Pikul; Pikul::init($company, \@provisions); + my $district = $Tag->value('address2'); + my $city = $Tag->value('city'); + my $province = $Tag->value('state'); my @codes = @{Pikul::codes( $origin, - $Tag->query({ - sql => "SELECT code FROM $table WHERE district='$district' AND \ - city='$city' AND province='$province'", - wantarray => 1 - })->[0]->[0] || '', + $Tag->query({ sql => "SELECT code FROM $table WHERE district='$district' AND city='$city' \ + AND province='$province'", wantarray => 1})->[0]->[0] || '', $weight)}; Pikul::cleanup(); my $elements = '<select name="mv_shipmode" id="ship_widget" class="form-control" onchange="this.form.submit()">'; diff --git a/pages/ord/checkout.html b/pages/ord/checkout.html index 74800cc..4020ca5 100644 --- a/pages/ord/checkout.html +++ b/pages/ord/checkout.html @@ -85,7 +85,7 @@ <div class="block-body"> <div class="row"> <div class="form-group col-md-6 d-flex align-items-center"> - [pikul company="__PIKUL_ANTERAJA__" district="[value address2]" city="[value city]" province="[value state]"] + [pikul company="__PIKUL_ANTERAJA__"] <label class="ml-3" for="ship_widget"> <strong class="d-block text-uppercase mb-2">[shipping-desc]</strong> <span class="text-muted text-sm"> |