summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-20 18:51:09 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-20 18:51:09 +0800
commite6854c2c645e8602f988fa4dd305cca610310e2d (patch)
tree6e497e02587b2ac8b4e0a7e3ab12dc364fabc1c8
parent0253ac37312fc76d2cbea0ad1eb10aed066cea9b (diff)
district, city, & province in tag
-rw-r--r--config/pikul.tag14
-rw-r--r--pages/ord/checkout.html2
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">