@_TOP_@ <div class="container p-4"> <div class="container my-2"> <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/basket[/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 my-4"> <div class="d-grid gap-2"> <button class="btn btn-outline-primary btn-block d-flex justify-content-center align-content-between gap-2" name="mv_nextpage" value="ord/basket" type="submit"><span class="material-icons-outlined">add</span>Add to cart</button> <button class="btn btn-primary btn-block d-flex justify-content-center align-content-between gap-2" name="mv_nextpage" value="ord/checkout" type="submit"><span class="material-icons-outlined">point_of_sale</span>[L]Checkout[/L]</button> </div> </div> </form>[/fly-list] <!-- Product description --> <div class="container"> <p class="text-muted text-monospace">[L]Description[/L]</p> <p>[item-field comment]</p> </div> </div>__BOTTOM__