PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / trunk
WCPOS – Point of Sale (POS) plugin for WooCommerce vtrunk
1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 1.9.13 1.9.12 1.9.11 1.9.10 All 159 releases
woocommerce-pos / templates / received.php

received.php in WCPOS – Point of Sale (POS) plugin for WooCommerce trunk, at templates/received.php

128 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * POS Order Received template.
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce-pos/received.php.
6 * HOWEVER, this is not recommended , don't be surprised if your POS breaks
7 */
8
9 \defined( 'ABSPATH' ) || exit;
10 ?>
11 <!doctype html>
12 <html <?php language_attributes(); ?>>
13 <head>
14 <meta charset="<?php bloginfo( 'charset' ); ?>"/>
15 <meta name="viewport" content="width=device-width, initial-scale=1"/>
16 <?php wp_head(); ?>
17 <style>
18 * {
19 padding: 0;
20 margin: 0;
21 }
22
23 .wrapper {
24 height: 100vh;
25 display: flex;
26 justify-content: center;
27 align-items: center;
28 background-color: #fff;
29 }
30
31 .checkmark__circle {
32 stroke-dasharray: 166;
33 stroke-dashoffset: 166;
34 stroke-width: 2;
35 stroke-miterlimit: 10;
36 stroke: #0C6B58;
37 fill: none;
38 animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
39 }
40
41 .checkmark {
42 width: 56px;
43 height: 56px;
44 border-radius: 50%;
45 display: block;
46 stroke-width: 2;
47 stroke: #fff;
48 stroke-miterlimit: 10;
49 margin: 10% auto;
50 box-shadow: inset 0px 0px 0px #0C6B58;
51 animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
52 }
53
54 .checkmark__check {
55 transform-origin: 50% 50%;
56 stroke-dasharray: 48;
57 stroke-dashoffset: 48;
58 animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
59 }
60
61 @keyframes stroke {
62 100% {
63 stroke-dashoffset: 0
64 }
65 }
66
67 @keyframes scale {
68 0%, 100% {
69 transform: none
70 }
71 50% {
72 transform: scale3d(1.1, 1.1, 1)
73 }
74 }
75
76 @keyframes fill {
77 100% {
78 box-shadow: inset 0px 0px 0px 30px #0C6B58
79 }
80 }
81 </style>
82 <?php if ( $order_complete ) { ?>
83 <script>
84 (function() {
85 // Parse the order JSON from PHP
86 var order = <?php echo $order_json; ?>;
87
88 // Check if postMessage function exists for window.top
89 if (typeof window.top.postMessage === 'function') {
90 window.top.postMessage({
91 action: 'wcpos-payment-received',
92 payload: order
93 }, '*');
94 }
95
96 // Check if ReactNativeWebView object and postMessage function exists
97 if (typeof window.ReactNativeWebView !== 'undefined' && typeof window.ReactNativeWebView.postMessage === 'function') {
98 window.ReactNativeWebView.postMessage(JSON.stringify({
99 action: 'wcpos-payment-received',
100 payload: order
101 }));
102 }
103 })();
104 </script>
105 <?php } ?>
106 </head>
107
108 <body <?php body_class(); ?>>
109 <div class="woocommerce">
110 <?php if ( $order_complete ) { ?>
111 <div class="wrapper">
112 <svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
113 <circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
114 <path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
115 </svg>
116 </div>
117 <?php } else { ?>
118 <?php woocommerce_output_all_notices(); ?>
119 <?php wcpos_get_woocommerce_template( 'checkout/thankyou.php', array( 'order' => $order ) ); ?>
120 <?php } ?>
121 </div>
122
123 <?php wp_footer(); ?>
124
125 </body>
126 </html>
127
128