PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 4.8.9
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v4.8.9
8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 8.5.3 8.5.2 All 533 releases
chatbot / templates / app-templates / app-checkout.php

app-checkout.php in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 4.8.9, at templates/app-templates/app-checkout.php

49 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 get_header();
3 ?>
4 <div id="wp-chatbot-app-checkout-container">
5 <?php
6 wp_enqueue_script( 'wc-checkout');
7 remove_action( 'wpcommerce_cart_collaterals', 'wpcommerce_cross_sell_display' );
8 echo do_shortcode('[wpcommerce_checkout]');
9 ?>
10 </div>
11 <?php
12 get_footer();
13 ?>
14 <script>
15 jQuery(function ($) {
16 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
17 $("#wp-chatbot-app-checkout-container").parents("body").addClass("wpchatbot-app-checkout");
18 $(document).on('click', '.wpcommerce-form-login input[type="submit"]', function (event) {
19 event.preventDefault();
20 var validatorDom=$('.wpcommerce-form-login>p').first();
21 var validate="";
22 var NonceName=$('#_wpnonce').attr('name');
23 var NonceVal=$('#_wpnonce').val();
24 var userName=$('#username').val();
25 var password=$('#password').val();
26 if(userName=="" || password=="" ){
27 validate+='<p style="color:red"> User name & Password are required. </p>';
28 }
29 if(validate==""){
30 var data = {'action': 'qcld_wb_chatbot_checkout_user_login','user_name': userName,'user_pass': password,'nonce_name': NonceName,'nonce_val':NonceVal};
31 jQuery.post(ajaxurl, data, function (response) {
32 if(response=='yes'){
33 window.location.reload(true);
34 }else{
35 validatorDom.html('<p style="color:red"> User name Or Password or both are incorrect. </p>');
36 setTimeout(function () {
37 validatorDom.html('');
38 },5000);
39 }
40 });
41 }else{
42 validatorDom.html(validate);
43 setTimeout(function () {
44 validatorDom.html('');
45 },5000);
46 }
47 });
48 });
49 </script>