From 126a16b71989ed0f2e887a61d68c3cdac9d62d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 20 Jul 2021 19:38:15 +0800 Subject: pikul.tag interface mimicks shipping.tag --- config/pikul.tag | 56 +++++++++++++++++++++++++++---------------------- pages/ord/checkout.html | 2 +- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/config/pikul.tag b/config/pikul.tag index ea279c2..343e50b 100644 --- a/config/pikul.tag +++ b/config/pikul.tag @@ -1,39 +1,45 @@ -UserTag pikul Order company +UserTag pikul Order widget extra UserTag pikul Routine <{PIKUL_ANTERAJA}) { - @provisions = ( - $Global::Variable->{ANTERAJA_ACCESS_KEY_ID}, - $Global::Variable->{ANTERAJA_SECRET_ACCESS_KEY}, - $Global::Variable->{ANTERAJA_BASE_PATH} - ); - $origin = $::Variable->{ANTERAJA_ORIGIN}; - $table = 'anteraja'; - } + my ($widget, $extra) = @_; + my $district = $Tag->value('address2'); + my $city = $Tag->value('city'); + my $province = $Tag->value('state'); my $weight = 0.0; for my $item (@{$Carts->{main}}) { $weight += $Tag->data('products', 'weight', $item->{code}) * $item->{quantity}; } + my $elements; + if ($widget eq 'select') { + $elements = ''; - for my $code (@codes) { - $elements .= qq( - "; + Pikul::cleanup(); + for my $code (@codes) { + $elements .= q( + "; + } } $elements .= q( ); diff --git a/pages/ord/checkout.html b/pages/ord/checkout.html index 4020ca5..7ea3d5a 100644 --- a/pages/ord/checkout.html +++ b/pages/ord/checkout.html @@ -85,7 +85,7 @@
- [pikul company="__PIKUL_ANTERAJA__"] + [pikul widget="select" extra='id="ship_widget" class="form-control" onchange="this.form.submit()"']