Commit de80bc3c by Pham Huy

add register partner tpl

parent b4f86ab2
......@@ -38,7 +38,7 @@
font-family: raleway;
letter-spacing: 1px;
}
.wps-afoc-main-wrap input[type="text"], select, input[type="number"] {
.wps-afoc-main-wrap input[type="text"], .wps-afoc-main-wrap select, .wps-afoc-main-wrap input[type="number"] {
height: 34px !important;
width: 99% !important;
max-width: 99% !important;
......
......@@ -8,6 +8,8 @@ class WPS_EXT_CST_Frontend
add_action( 'woocommerce_before_checkout_billing_form', array($this,'add_option_to_checkout' ));
add_action( 'wp_footer', array($this,'add_script_on_checkout' ));
add_action( 'woocommerce_cart_calculate_fees', array($this,'calculate_cost' ));
add_action( 'wp_ajax_woo_get_ajax_data', 'bbloomer_checkout_radio_choice_set_session' );
add_action( 'wp_ajax_nopriv_woo_get_ajax_data', 'bbloomer_checkout_radio_choice_set_session' );
}
}
......@@ -48,7 +50,18 @@ class WPS_EXT_CST_Frontend
<script type="text/javascript">
jQuery( document ).ready(function( $ ) {
$('#wps_ext_cst_label').click(function(){
jQuery('body').trigger('update_checkout');
$.ajax({
type: 'POST',
url: wc_checkout_params.update_checkout,
data: {
'action': 'woo_get_ajax_data',
'radio': $(this).val(),
},
success: function (result) {
$('body').trigger('update_checkout');
}
});
// jQuery('body').trigger('update_checkout');
});
});
</script>
......@@ -64,11 +77,20 @@ class WPS_EXT_CST_Frontend
}
}
public static function bbloomer_checkout_radio_choice_set_session() {
if ( isset($_POST['radio']) ){
$radio = sanitize_key( $_POST['radio'] );
WC()->session->set('radio_chosen', $radio );
echo json_encode( $radio );
}
die();
}
public static function calculate_cost( $cart ){
$ext_cst_label_billing = (get_option('ext_cst_label_billing')) ? get_option('ext_cst_label_billing') :'Phụ phí';
$ext_cst_amount_type = (get_option('ext_cst_amount_type')) ? get_option('ext_cst_amount_type') : 'fixed';
$ext_cst_amount = (get_option('ext_cst_amount')) ? get_option('ext_cst_amount') : 1;
// && ! defined('DOING_AJAX')
if ( ! $_POST || ( is_admin() && ! is_ajax() ) ) {
return;
}
......@@ -97,7 +119,6 @@ class WPS_EXT_CST_Frontend
}
}
}new WPS_EXT_CST_Frontend();
?>
\ No newline at end of file
......@@ -311,3 +311,16 @@ p.title-item-sidebar {
.woocommerce a.remove{
line-height: 20px;
}
.woocommerce form .form-row .optional{
visibility: hidden;
}
.woocommerce #mst_checkout_field{
position: relative;
}
.woocommerce #search-taxcode{
position: absolute;
cursor: pointer;
top: 65%;
right: 2%;
}
......@@ -59,11 +59,19 @@ ul#menu-main-menu li:nth-child(1) {
ul#menu-main-menu li:nth-last-child(1) {
border-radius: 0px 4px 4px 0px;
}
ul#menu-main-menu li ul li:nth-child(1) {
border-radius: 4px 4px 0px 0px;
}
ul#menu-main-menu li ul li:nth-last-child(1) {
border-radius: 0px 0px 4px 4px;
}
ul#menu-main-menu li {
padding: 10px 0px;
text-transform: uppercase !important;
}
ul#menu-main-menu li ul li {
padding: 5px 0px;
}
ul#menu-main-menu li.current-menu-item a{
color: #FFFFFF !important;
border-right: 1px solid #ED2027;
......@@ -81,6 +89,15 @@ ul#menu-main-menu li a {
padding: 5px 35px;
border-right: 1px solid #dddddd;
}
ul#menu-main-menu li ul li a {
padding: 5px 15px;
text-align: center;
border-right: none;
}
ul#menu-main-menu li ul.sub-menu{
border-radius: 4px;
}
ul#menu-main-menu li:last-child a {
border-right: none;
}
......@@ -505,7 +522,10 @@ ul#menu-main-menu li a:hover {
font-weight: bold;
}
.tpl-hoadon{
width: 80%;
width: 90%;
}
#content .width-100{
width: 100%;
}
#footer-content {
......
<?php
/**
* Template Name: Đăng ký đại lý
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 2.1
*/
get_header();
?>
<section id="register-partner">
<div class="container">
<h2 class="register-title">Đăng ký đại lý</h2>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<?php echo do_shortcode('[contact-form-7 id="174" title="Đăng ký đại lý"]'); ?>
</div>
</div>
</div>
</section>
<?php get_footer(); ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment