summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-20 00:19:11 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-20 00:19:11 +0800
commitdcf7934c1cea7bc9585aec842e9f6314220bfd8a (patch)
tree5ec4b072e0a69c70bc4e0b0ddbead399f02559c3
parent9e1956b7de95179d6b488d6a01fcb8046a821ef2 (diff)
Show available shippings dynamically
-rw-r--r--pages/ord/checkout.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/pages/ord/checkout.html b/pages/ord/checkout.html
index 247c28a..ae2e694 100644
--- a/pages/ord/checkout.html
+++ b/pages/ord/checkout.html
@@ -84,8 +84,14 @@
<div class="container my-4">
<div class="block-body">
<div class="row">
- <div class="form-group col-md-6 d-flex align-items-center">
- [shipping widget="radio" extra='id="ship_widget" onchange="this.form.submit()"']
+ <div class="form-group col-md-6 d-flex align-items-center">[tmp weight][perl products]
+ my $weight = 0.0;
+ for my $item (@{$Carts->{main}}) {
+ $weight += tag_data('products', 'weight', "$item->{code}") * $item->{quantity};
+ }
+ return $weight;
+ [/perl][/tmp]
+ [pikul_codes company="__PIKUL_ANTERAJA__" district="[value address2]" city="[value city]" province="[value state]" weight="[scratch weight]"]
<label class="ml-3" for="ship_widget">
<strong class="d-block text-uppercase mb-2">[shipping-desc]</strong>
<span class="text-muted text-sm">