staff code
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
13 changed files
with
70 additions
and
8 deletions
| ... | @@ -14755,6 +14755,9 @@ a.skip-link:focus { | ... | @@ -14755,6 +14755,9 @@ a.skip-link:focus { |
| 14755 | opacity: 1; | 14755 | opacity: 1; |
| 14756 | } | 14756 | } |
| 14757 | 14757 | ||
| 14758 | .search-results #full-width-page-wrapper { | ||
| 14759 | min-height: 50vh; | ||
| 14760 | } | ||
| 14758 | .search-results .understrap-read-more-link { | 14761 | .search-results .understrap-read-more-link { |
| 14759 | display: none !important; | 14762 | display: none !important; |
| 14760 | } | 14763 | } | ... | ... |
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 ) { | ... | @@ -294,7 +294,7 @@ function my_staff_checkout_field( $checkout ) { |
| 294 | 294 | ||
| 295 | echo '<tr class="coupon-form"><td colspan="2">'; | 295 | echo '<tr class="coupon-form"><td colspan="2">'; |
| 296 | wc_get_template( | 296 | wc_get_template( |
| 297 | 'checkout/form-coupon.php', | 297 | 'checkout/form-coupon-staff.php', |
| 298 | 298 | ||
| 299 | ); | 299 | ); |
| 300 | echo '</td></tr>'; | 300 | echo '</td></tr>'; |
| ... | @@ -386,7 +386,7 @@ function display_custom_meta_data_in_backend_orders( $order ){ | ... | @@ -386,7 +386,7 @@ function display_custom_meta_data_in_backend_orders( $order ){ |
| 386 | /* | 386 | /* |
| 387 | * Hooking "Coupon form" after order total in checkout page with custom function | 387 | * Hooking "Coupon form" after order total in checkout page with custom function |
| 388 | */ | 388 | */ |
| 389 | //add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_checkout_coupon_form_custom' ); | 389 | add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_checkout_coupon_form_custom' ); |
| 390 | 390 | ||
| 391 | /* | 391 | /* |
| 392 | * Rendering html for "Coupon form" with custom function | 392 | * Rendering html for "Coupon form" with custom function | ... | ... |
| ... | @@ -35377,7 +35377,7 @@ | ... | @@ -35377,7 +35377,7 @@ |
| 35377 | } | 35377 | } |
| 35378 | } | 35378 | } |
| 35379 | }); | 35379 | }); |
| 35380 | jQuery__default["default"](document).on('click', '#checkout_apply_coupon', function () { | 35380 | jQuery__default["default"](document).on('click', '.checkout_apply_coupon', function () { |
| 35381 | // Get the coupon code | 35381 | // Get the coupon code |
| 35382 | var code = jQuery__default["default"]('#checkout_coupon_code').val(); | 35382 | var code = jQuery__default["default"]('#checkout_coupon_code').val(); |
| 35383 | var button = jQuery__default["default"](this); | 35383 | 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); | ... | @@ -118,7 +118,7 @@ $('#navbarNavDropdown').prepend($search); |
| 118 | }); | 118 | }); |
| 119 | 119 | ||
| 120 | 120 | ||
| 121 | jQuery(document).on('click','#checkout_apply_coupon', function() { | 121 | jQuery(document).on('click','.checkout_apply_coupon', function() { |
| 122 | // Get the coupon code | 122 | // Get the coupon code |
| 123 | var code = jQuery( '#checkout_coupon_code').val(); | 123 | var code = jQuery( '#checkout_coupon_code').val(); |
| 124 | var button = jQuery( this ); | 124 | var button = jQuery( this ); | ... | ... |
| ... | @@ -280,6 +280,10 @@ a.skip-link:focus{ | ... | @@ -280,6 +280,10 @@ a.skip-link:focus{ |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | .search-results{ | 282 | .search-results{ |
| 283 | #full-width-page-wrapper { | ||
| 284 | min-height: 50vh; | ||
| 285 | } | ||
| 286 | |||
| 283 | .understrap-read-more-link{ | 287 | .understrap-read-more-link{ |
| 284 | display: none !important; | 288 | display: none !important; |
| 285 | } | 289 | } | ... | ... |
| ... | @@ -21,6 +21,11 @@ do_action( 'woocommerce_before_cart' ); ?> | ... | @@ -21,6 +21,11 @@ do_action( 'woocommerce_before_cart' ); ?> |
| 21 | 21 | ||
| 22 | <form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post"> | 22 | <form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post"> |
| 23 | <?php do_action( 'woocommerce_before_cart_table' ); ?> | 23 | <?php do_action( 'woocommerce_before_cart_table' ); ?> |
| 24 | <div class="woocommerce-notices-wrapper"> | ||
| 25 | <div class="woocommerce-message" role="alert"> | ||
| 26 | SJHCG Staff - you can apply your code in lieu of payment when you proceed to checkout.<br> | ||
| 27 | </div> | ||
| 28 | </div> | ||
| 24 | 29 | ||
| 25 | <table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0"> | 30 | <table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0"> |
| 26 | <thead> | 31 | <thead> | ... | ... |
| 1 | <?php | ||
| 2 | /** | ||
| 3 | * Checkout coupon form | ||
| 4 | * | ||
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.php. | ||
| 6 | * | ||
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you | ||
| 8 | * (the theme developer) will need to copy the new files to your theme to | ||
| 9 | * maintain compatibility. We try to do this as little as possible, but it does | ||
| 10 | * happen. When this occurs the version of the template file will be bumped and | ||
| 11 | * the readme will list any important changes. | ||
| 12 | * | ||
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ | ||
| 14 | * @package WooCommerce\Templates | ||
| 15 | * @version 7.0.1 | ||
| 16 | */ | ||
| 17 | |||
| 18 | defined( 'ABSPATH' ) || exit; | ||
| 19 | |||
| 20 | if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine. | ||
| 21 | return; | ||
| 22 | } | ||
| 23 | |||
| 24 | ?> | ||
| 25 | |||
| 26 | |||
| 27 | <?php | ||
| 28 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 29 | exit; // Exit if accessed directly | ||
| 30 | } | ||
| 31 | |||
| 32 | if ( ! wc_coupons_enabled() ) { | ||
| 33 | return; | ||
| 34 | } | ||
| 35 | |||
| 36 | ?> | ||
| 37 | |||
| 38 | <div id="coupon-form" class="checkout_coupon" method="post" style="display:none;"> | ||
| 39 | <p><?php esc_html_e( 'If you have a SJHCG staff code, please apply it below.', 'woocommerce' ); ?></p> | ||
| 40 | |||
| 41 | <p class="form-row form-row-first"> | ||
| 42 | <input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'SJHCG staff code', 'woocommerce' ); ?>" id="checkout_coupon_code" value="" /> | ||
| 43 | </p> | ||
| 44 | |||
| 45 | <p class="form-row form-row-last"> | ||
| 46 | <input type="button" class="checkout_apply_coupon btn btn-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply', 'woocommerce' ); ?>" /> | ||
| 47 | </p> | ||
| 48 | </div> | ||
| 49 | |||
| 50 |
| ... | @@ -35,15 +35,15 @@ if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine. | ... | @@ -35,15 +35,15 @@ if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine. |
| 35 | 35 | ||
| 36 | ?> | 36 | ?> |
| 37 | 37 | ||
| 38 | <div id="coupon-form" class="checkout_coupon" method="post" style="display:none;"> | 38 | <div id="coupon" class="checkout_coupon" method="post"> |
| 39 | <p><?php esc_html_e( 'If you have a SJHCG staff coupon code, please apply it below.', 'woocommerce' ); ?></p> | 39 | <p><?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?></p> |
| 40 | 40 | ||
| 41 | <p class="form-row form-row-first"> | 41 | <p class="form-row form-row-first"> |
| 42 | <input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'SJHCG staff coupon code', 'woocommerce' ); ?>" id="checkout_coupon_code" value="" /> | 42 | <input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="checkout_coupon_code" value="" /> |
| 43 | </p> | 43 | </p> |
| 44 | 44 | ||
| 45 | <p class="form-row form-row-last"> | 45 | <p class="form-row form-row-last"> |
| 46 | <input id="checkout_apply_coupon" type="button" class="btn btn-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply', 'woocommerce' ); ?>" /> | 46 | <input type="button" class="checkout_apply_coupon btn btn-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply', 'woocommerce' ); ?>" /> |
| 47 | </p> | 47 | </p> |
| 48 | </div> | 48 | </div> |
| 49 | 49 | ... | ... |
-
Please register or sign in to post a comment