diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-14 14:16:32 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-14 14:16:32 +0800 |
commit | c095b8fa445adceb58e5dd59c59cad17d23a9bc4 (patch) | |
tree | 663b7f195158092702b04c4ba8f0f25d31077209 | |
parent | 656e42c2db476b655058ddf81d51e72db5b53777 (diff) |
Origin setting so we can use catalog's
To be able to use @_VARNAME_@ or its variant syntaxes, it needs to be
done in usertag, as template tag cannot touch catalog settings.
-rw-r--r-- | config/pikul_cost.tag | 6 | ||||
-rw-r--r-- | products/ship/shipping.asc | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/config/pikul_cost.tag b/config/pikul_cost.tag index 315b608..f078c5d 100644 --- a/config/pikul_cost.tag +++ b/config/pikul_cost.tag @@ -1,9 +1,8 @@ -UserTag pikul_cost Order company district city province weight service +UserTag pikul_cost Order company origin district city province weight service UserTag pikul_cost Routine <<EOR sub { - my ($company, $district, $city, $province, $weight, $service) = @_; + my ($company, $origin, $district, $city, $province, $weight, $service) = @_; my @provisions; - my $origin; my $table; if ($company == 0) { @provisions = ( @@ -11,7 +10,6 @@ sub { "$Global::Variable->{ANTERAJA_ACCESS_KEY_ID}", "$Global::Variable->{ANTERAJA_SECRET_ACCESS_KEY}" ); - $origin = "$Global::Variable->{ANTERAJA_ORIGIN}"; $table = 'anteraja'; } use Pikul; diff --git a/products/ship/shipping.asc b/products/ship/shipping.asc index e58e215..fab032e 100644 --- a/products/ship/shipping.asc +++ b/products/ship/shipping.asc @@ -1,3 +1,3 @@ anteraja: Anteraja Regular crit weight - cost f [pikul_cost company=0 district='[evalue address3]' city='[evalue city]' province='[evalue state]' weight=@@TOTAL@@ service='REG'] + cost f [pikul_cost company=0 origin='@_ANTERAJA_ORIGIN_@' district='[evalue address3]' city='[evalue city]' province='[evalue state]' weight=@@TOTAL@@ service='REG'] |