From a79348ff0a8af6d59696ee31fd7a293707989a84 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: Sun, 4 Jul 2021 18:52:14 +0800 Subject: Separated web code --- pages/ord/basket.html | 158 ++++++++++++++++++++++++++++++++++++++++++++++++ pages/ord/checkout.html | 138 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 296 insertions(+) create mode 100644 pages/ord/basket.html create mode 100644 pages/ord/checkout.html (limited to 'pages/ord') diff --git a/pages/ord/basket.html b/pages/ord/basket.html new file mode 100644 index 0000000..4778d6a --- /dev/null +++ b/pages/ord/basket.html @@ -0,0 +1,158 @@ +[tmp page_title]__COMPANY__ -- [L]Shopping Cart[/L][/tmp] + +@_TOP_@ + +
+ +
+
+

[L]Shopping Cart[/L]

+
+
+ +
+
+
+ [edisplay] + + [calc] + my $cname = $Config->{CookieName} || 'MV_SESSION_ID'; + $Scratch->{have_cookie} = $Tag->read_cookie($cname) + and delete $Scratch->{tried}; + return; + [/calc] + [if scratch have_cookie] + [elsif scratch tried] + [L CART_MSG1]You must have cookies set to leave the basket. Check out now or forever lose your shopping cart.[/L] + [/elsif] + [else] + [set tried]1[/set] + [bounce href="[area ord/basket]"] + [/else] + [/if] + +
+ [form-session-id] + + + + + +
+
+
+
[L]Description[/L]
+
+
+
[L]Price[/L]
+
[L]Quantity[/L]
+
[L]Total[/L]
+
+
+
+
+
+
+ + [if items] + [then] + [item-list] + + [item-calc] + #Log("Checking master item $master"); + $row_class = ++$count % 2 ? 'cartnorm' : 'cartalt'; + my $item = '[item-increment]'; + my $up = q{[item-data merchandising upsell_to]}; + my $cr = q{[item-data merchandising cross_sell]}; + $upsell_remove{'[item-code]'} = 1; + $cross_remove{'[item-code]'} = 1; + my %seen = ( '' => 1 ); + + $Scratch->{upsell} .= " $up" if $up; + $Scratch->{cross_codes} .= " $cr" if $cr; + my @up = split /\s+/, $Scratch->{upsell}; + my @cr = split /\s+/, $Scratch->{cross_codes}; + @up = grep ( (!$seen{$_}++ && ! $upsell_remove{$_}), @up); + @cr = grep ( (!$seen{$_}++ && ! $cross_remove{$_}), @cr); + $Scratch->{upsell} = join " ", @up; + $Scratch->{cross_codes} = join " ", @cr; + return; + [/item-calc] + + +
+
+
+ +
+
+
+
+
[L]Price[/L]
+
[item-discount-price]
+
+
+
+
+
[L]Quantity[/L]
+
+
+
-
+ +
+
+
+
+
+
+
+
+
[L]Total price[/L]
+
[item-discount-subtotal]
+
+
+ +
+
+
+
+
+ [/item-list] + [/then] + [/if] + +
+
+
+
+
[L]Order Summary[/L]
+
+
+
+ [L]Subtotal[/L][subtotal] +
+
+ +
+ +
+
+
+
+
+ +@_BOTTOM_@ \ No newline at end of file diff --git a/pages/ord/checkout.html b/pages/ord/checkout.html new file mode 100644 index 0000000..53963ae --- /dev/null +++ b/pages/ord/checkout.html @@ -0,0 +1,138 @@ +[tmp page_title]__COMPANY__ -- [L]Checkout[/L][/tmp] +[tmp display_class]noleft[/tmp] +[tmpn onepage]1[/tmpn] + +[include include/checkout/initialization] + +@_TOP_@ + +
+ +
+

[L]Checkout form[/L]

+ [if session logged_in] +

[L]Please verify the information below and click the 'Place Order' button to process your order.[/L]

+ [include include/checkout/login_form][/else][/if][if !variable NO_TAX_POPUP] + [include include/checkout/tax_popup][/if] + [edisplay show_label=1 show_var=0 keep=1] +
+ +
+ +
+ [form-session-id] + +
+

[L]Order review[/L]

+
    + + [if items][then][item-list][item-calc] + #Log("Checking master item $master"); + $row_class = ++$count % 2 ? 'cartnorm' : 'cartalt'; + my $item = '[item-increment]'; + my $up = q{[item-data merchandising upsell_to]}; + my $cr = q{[item-data merchandising cross_sell]}; + $upsell_remove{'[item-code]'} = 1; + $cross_remove{'[item-code]'} = 1; + my %seen = ( '' => 1 ); + $Scratch->{upsell} .= " $up" if $up; + $Scratch->{cross_codes} .= " $cr" if $cr; + my @up = split /\s+/, $Scratch->{upsell}; + my @cr = split /\s+/, $Scratch->{cross_codes}; + @up = grep ( (!$seen{$_}++ && ! $upsell_remove{$_}), @up); + @cr = grep ( (!$seen{$_}++ && ! $cross_remove{$_}), @cr); + $Scratch->{upsell} = join " ", @up; + $Scratch->{cross_codes} = join " ", @cr; + return; + [/item-calc] +
  • +
    +
    [item-description]
    + [item-discount-price] + x [item-quantity] +
    + [item-discount-subtotal] +
  • + [/item-list] + +
  • + Subtotal + [subtotal] +
  • + [/then][/if] +
+
+ +
+

Shipping

+ [include include/checkout/shipping_address] +
+ + + [include include/checkout/billing_address] + + +
+

Delivery method

+ +
+
+ + +
+
+ +
+ + +
+

Payment method

+ +
+
+ + +
+
+ +
+ + +
+

Order Summary

+
+

Shipping and additional costs are calculated based on values you have entered.

+
    +
  • [L]Subtotal[/L][subtotal]
  • +
  • [L]Shipping[/L][shipping]
  • +
  • [L]Total[/L][total-cost]
  • +
+
+
+ + +
[if items] +    + [button + text="[L]Place Order[/L]" + wait-text="-- [L]Wait[/L] --" + class="btn btn-primary btn-lg btn-block" + ] mv_todo=submit + [/button][else] + [L]No items in your shopping cart![/L][/else][/if] +
+
+ +
+ [tmp clear_errors][error all=1 comment="Clear errors"][/tmp] +
+ +__BOTTOM__ -- cgit v1.2.3