From fbad565d3d80fb30a9dd75087837d62d16c142ff Mon Sep 17 00:00:00 2001 From: Nico Mollet Date: Fri, 29 Sep 2017 11:00:58 +0200 Subject: [PATCH] WooCommerce align coupon code input --- inc/plugins/woocommerce.php | 19 +++++++++++++++++++ scss/helpers/_woocommerce_checkout.scss | 20 ++++++++++++-------- scss/helpers/_woocommerce_productlist.scss | 2 +- scss/helpers/_woocommerce_productsingle.scss | 1 - 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/inc/plugins/woocommerce.php b/inc/plugins/woocommerce.php index 249ecab..f4024e5 100644 --- a/inc/plugins/woocommerce.php +++ b/inc/plugins/woocommerce.php @@ -561,3 +561,22 @@ function stormbringer_gridlist_toggle_button_output($output, $grid_view, $list_v return $output; } add_filter( 'gridlist_toggle_button_output', 'stormbringer_gridlist_toggle_button_output',10, 3 ); + + + +/** + * WooCOmmerce product list item before + */ +function stormbringer_woocommerce_before_shop_loop_item(){ + echo '
'; +} +add_action('woocommerce_before_shop_loop_item', 'stormbringer_woocommerce_before_shop_loop_item', -999); + + +/** + * WooCOmmerce product list item after + */ +function stormbringer_woocommerce_after_shop_loop_item(){ + echo '
'; +} +add_action('woocommerce_after_shop_loop_item', 'stormbringer_woocommerce_after_shop_loop_item', 999); \ No newline at end of file diff --git a/scss/helpers/_woocommerce_checkout.scss b/scss/helpers/_woocommerce_checkout.scss index a34e249..1ebf731 100644 --- a/scss/helpers/_woocommerce_checkout.scss +++ b/scss/helpers/_woocommerce_checkout.scss @@ -35,6 +35,11 @@ All pages Checkout */ +form.checkout_coupon { + p{ + display: inline-block; + } +} .woocommerce-checkout{ @@ -295,16 +300,10 @@ Cart vertical-align: top; } - #coupon_code{ - display: inline-block; - width: auto; - } - } - .checkout_coupon #coupon_code{ - display: inline-block; - width: auto; + } + .qty{ width: 60px; @media (min-width: $screen-md-min) { @@ -327,6 +326,11 @@ Cart } +#coupon_code{ + display: inline; + width: auto; + vertical-align: inherit; +} /** Account diff --git a/scss/helpers/_woocommerce_productlist.scss b/scss/helpers/_woocommerce_productlist.scss index cf6f2fd..99435ab 100644 --- a/scss/helpers/_woocommerce_productlist.scss +++ b/scss/helpers/_woocommerce_productlist.scss @@ -62,7 +62,7 @@ Layout position: relative; @include make-sm-column(12); @include make-md-column(4); - margin-bottom: ($line-height-computed / 2); + margin-bottom: $line-height-computed; &.first{ clear: both; diff --git a/scss/helpers/_woocommerce_productsingle.scss b/scss/helpers/_woocommerce_productsingle.scss index 1a72afb..57e8aab 100644 --- a/scss/helpers/_woocommerce_productsingle.scss +++ b/scss/helpers/_woocommerce_productsingle.scss @@ -120,7 +120,6 @@ table.woo-vou-recipient-fields{ } div.product{ - position: relative; overflow: hidden; @include make-row;