| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template variables: |
| 4 |
* |
| 5 |
* @var $controllers array Widgets/Addons Settings |
| 6 |
*/ |
| 7 |
|
| 8 |
// Do not allow directly accessing this file. |
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit( 'This script cannot be accessed directly.' ); |
| 11 |
} |
| 12 |
|
| 13 |
use RadiusTheme\SB\Helpers\Fns; |
| 14 |
|
| 15 |
if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine. |
| 16 |
return; |
| 17 |
} |
| 18 |
|
| 19 |
$show_info_icon = ! empty( $controllers['show_info_icon'] ) ? $controllers['show_info_icon'] : ''; |
| 20 |
$the_icon = $show_info_icon && ! empty( $controllers['info_icon'] ) ? Fns::icons_manager( $controllers['info_icon'] ) : ''; |
| 21 |
|
| 22 |
?> |
| 23 |
|
| 24 |
<div class="rtsb-checkout-coupon-form <?php echo ! empty( $show_info_icon ) ? 'show-info-icon-yes': ''; ?>"> |
| 25 |
<div class="woocommerce-form-coupon-toggle <?php echo ! empty( $the_icon ) ? 'print-custom-icon': ''; ?> "> |
| 26 |
<?php wc_print_notice( $the_icon . apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'shopbuilder' ) . ' <a href="#" class="showcoupon">' . esc_html__( 'Click here to enter your code', 'shopbuilder' ) . '</a>' ), 'notice' ); ?> |
| 27 |
</div> |
| 28 |
<div class="checkout_coupon woocommerce-form-coupon" style="display:none"> |
| 29 |
<?php if( ! empty( $controllers['show_description'] ) ) { ?> |
| 30 |
<p> |
| 31 |
<?php if( ! empty( $controllers['description_text'] ) ) { ?> |
| 32 |
<?php echo esc_html( $controllers['description_text'] ); ?> |
| 33 |
<?php } else { ?> |
| 34 |
<?php esc_html_e( 'If you have a coupon code, please apply it below.', 'shopbuilder' ); ?> |
| 35 |
<?php } ?> |
| 36 |
</p> |
| 37 |
|
| 38 |
<?php } ?> |
| 39 |
<div class="coupon-form-fields"> |
| 40 |
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'shopbuilder' ); ?>" id="coupon_code" value="" /> |
| 41 |
<button type="button" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'shopbuilder' ); ?>"><?php esc_html_e( 'Apply coupon', 'shopbuilder' ); ?></button> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
</div> |
| 45 |
|