4fc316cf by Jeff Balicki

staff code

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 00c82fe1
......@@ -14755,6 +14755,9 @@ a.skip-link:focus {
opacity: 1;
}
.search-results #full-width-page-wrapper {
min-height: 50vh;
}
.search-results .understrap-read-more-link {
display: none !important;
}
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -294,7 +294,7 @@ function my_staff_checkout_field( $checkout ) {
echo '<tr class="coupon-form"><td colspan="2">';
wc_get_template(
'checkout/form-coupon.php',
'checkout/form-coupon-staff.php',
);
echo '</td></tr>';
......@@ -386,7 +386,7 @@ function display_custom_meta_data_in_backend_orders( $order ){
/*
* Hooking "Coupon form" after order total in checkout page with custom function
*/
//add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_checkout_coupon_form_custom' );
add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_checkout_coupon_form_custom' );
/*
* Rendering html for "Coupon form" with custom function
......
......@@ -35377,7 +35377,7 @@
}
}
});
jQuery__default["default"](document).on('click', '#checkout_apply_coupon', function () {
jQuery__default["default"](document).on('click', '.checkout_apply_coupon', function () {
// Get the coupon code
var code = jQuery__default["default"]('#checkout_coupon_code').val();
var button = jQuery__default["default"](this);
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -118,7 +118,7 @@ $('#navbarNavDropdown').prepend($search);
});
jQuery(document).on('click','#checkout_apply_coupon', function() {
jQuery(document).on('click','.checkout_apply_coupon', function() {
// Get the coupon code
var code = jQuery( '#checkout_coupon_code').val();
var button = jQuery( this );
......
......@@ -280,6 +280,10 @@ a.skip-link:focus{
}
.search-results{
#full-width-page-wrapper {
min-height: 50vh;
}
.understrap-read-more-link{
display: none !important;
}
......
......@@ -21,7 +21,12 @@ do_action( 'woocommerce_before_cart' ); ?>
<form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
<?php do_action( 'woocommerce_before_cart_table' ); ?>
<div class="woocommerce-notices-wrapper">
<div class="woocommerce-message" role="alert">
SJHCG Staff - you can apply your code in lieu of payment when you proceed to checkout.<br>
</div>
</div>
<table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
<thead>
<tr>
......
<?php
/**
* Checkout coupon form
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine.
return;
}
?>
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! wc_coupons_enabled() ) {
return;
}
?>
<div id="coupon-form" class="checkout_coupon" method="post" style="display:none;">
<p><?php esc_html_e( 'If you have a SJHCG staff code, please apply it below.', 'woocommerce' ); ?></p>
<p class="form-row form-row-first">
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'SJHCG staff code', 'woocommerce' ); ?>" id="checkout_coupon_code" value="" />
</p>
<p class="form-row form-row-last">
<input type="button" class="checkout_apply_coupon btn btn-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply', 'woocommerce' ); ?>" />
</p>
</div>
......@@ -35,15 +35,15 @@ if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine.
?>
<div id="coupon-form" class="checkout_coupon" method="post" style="display:none;">
<p><?php esc_html_e( 'If you have a SJHCG staff coupon code, please apply it below.', 'woocommerce' ); ?></p>
<div id="coupon" class="checkout_coupon" method="post">
<p><?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?></p>
<p class="form-row form-row-first">
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'SJHCG staff coupon code', 'woocommerce' ); ?>" id="checkout_coupon_code" value="" />
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="checkout_coupon_code" value="" />
</p>
<p class="form-row form-row-last">
<input id="checkout_apply_coupon" type="button" class="btn btn-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply', 'woocommerce' ); ?>" />
<input type="button" class="checkout_apply_coupon btn btn-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply', 'woocommerce' ); ?>" />
</p>
</div>
......