Skip to content

Instantly share code, notes, and snippets.

@yratof
Created November 6, 2014 12:15
Show Gist options
  • Save yratof/048001f509b286471a00 to your computer and use it in GitHub Desktop.
Save yratof/048001f509b286471a00 to your computer and use it in GitHub Desktop.
Woocommerce Coupon
.checkout__coupon{
// Remove that gap
letter-spacing: -0.31em; /* webkit */
letter-spacing: -0.31rem; /* webkit */
*letter-spacing: normal; /* reset IE < 8 */
word-spacing: -0.43em; /* IE < 8 && gecko */
word-spacing: -0.43rem; /* IE < 8 && gecko */
> * {
// Apply normals to all direct child elements
display: inline-block;
zoom: 1; *display: inline; /* IE < 8: fake inline-block */
letter-spacing: normal;
word-spacing: normal;
vertical-align: top;
}
& > h3 {
display: inline-block;
margin: 0.65rem 0;
vertical-align: middle;
}
.fourcol{
width: 33.3%;
}
}
<?php
/**
* Checkout coupon form
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.2
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! WC()->cart->coupons_enabled() ) {
return;
}
$info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'woocommerce' ) . '</a>' );
//wc_print_notice( $info_message, 'notice' );
?>
<form class="checkout__coupon sixcol last" method="post">
<h3 id="courpon_heading" class="fourcol first">Coupon</h3>
<div class="fourcol">
<input type="text" name="coupon_code" class="input-text" placeholder="<?php _e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />
</div>
<div class="fourcol last">
<input type="submit" class="button" name="apply_coupon" value="<?php _e( 'Apply Coupon', 'woocommerce' ); ?>" />
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment