diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-04 18:52:14 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-04 18:52:14 +0800 |
commit | a79348ff0a8af6d59696ee31fd7a293707989a84 (patch) | |
tree | f91c37373f1bb7474207055d600e4d2424ddbd8d /pages/flypage.html |
Separated web code
Diffstat (limited to 'pages/flypage.html')
-rw-r--r-- | pages/flypage.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/pages/flypage.html b/pages/flypage.html new file mode 100644 index 0000000..094e5f3 --- /dev/null +++ b/pages/flypage.html @@ -0,0 +1,77 @@ +@_TOP_@ + <div class="container pt-5"> + <div class="container p-3"> + <img class="img-fluid" src="__IMAGE_DIR__/items/[item-field image]" alt="[item-description]"> + </div> + <!-- Product heading --> + <div class="container pl-3 pr-3"> + <h4>[item-description]</h4> + <h5 class="text-primary">[item-price]</h5> + <p class="text-muted text-monospace">[item-field prod_group] • [item-field category]</p> + </div>[fly-list code="[data session arg]"] + <form class="col" action="[area href="[if-item-field option_type][item-code][else]ord/checkout[/else][/if-item-field]"]" method="POST"> + <input type="hidden" name="mv_action" value="refresh"> + <input type="hidden" name="mv_order_item" value="[item-code]"> + <input type="hidden" name="mv_order_quantity" value="1"> + [form-session-id][edisplay show_var=0][if-item-field option_type][seti check_opt] + &success=ord/checkout + [query + list=1 + sql="select o_group,o_label from options where sku='[item-code]'" + ]mv_order_[sql-code]=mandatory [L]Need to select[/L] [sql-param o_label] + [/query][/seti] + <input type="hidden" name="mv_form_profile" value="check_opt"> + <!-- Product form control --> + <div class=" container pl-3 pr-3"> + <div class="row">[perl options] +my $elements = ''; +for my $option (@{$Tag->query({sql + => "SELECT o_group,o_label,o_value,o_widget FROM options WHERE sku='[item-code]' ORDER BY o_sort"})}) { + my $o_label = $Tag->loc('', $option->[1]); + $elements .= qq( + <div class="form-group pr-2"> + <label for="mv_order_$option->[0]">$o_label</label> + <select class="form-control" id="mv_order_$option->[0]" name="mv_order_$option->[0]">); + my @csvs = split(/,/, $option->[2]); + for my $csv (@csvs) { + my $variant = '[item-code]'; + my @pair = split(/=/, $csv); + my $label = $pair[1]; + my $default = ''; + if ($label =~ /\*/) { + $default = $Tag->loc('', substr($label, 0, length($label) - 1)); + } else { + $label = $Tag->loc('', $label); + } + $elements .= qq( + <option value="$pair[0]") + . ($default ? ' selected' : '') . '>' + . ($default ? $default : $label) + . '</option>'; + } + $elements .= qq( + </select> + </div>); + } + return $elements; + [/perl] + </div> + </div>[/if-item-field] + <!-- Call to action button --> + <div class="container p-3"> + <div class="row"> + <div class="col p-2"> + <button class="btn btn-outline-primary btn-lg btn-block" href="[area ord/basket]" type="submit">+ Keranjang</button> + </div> + <div class="col p-2"> + <button class="btn btn-primary btn-lg btn-block" href="[area ord/checkout]" type="submit">[L]Checkout[/L]</button> + </div> + </div> + </div> + </form>[/fly-list] + <!-- Product description --> + <div class="container p-3"> + <p class="text-muted text-monospace">[L]Description[/L]</p> + <p>[item-field comment]</p> + </div> + </div>__BOTTOM__ |