From 0b37fdb8c1b9d89005b251150ca00dac961a93a7 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Fri, 18 Nov 2016 22:26:32 +0200 Subject: [PATCH 01/16] woo responsive wrappers w/container options --- woocommerce.php | 61 --------------- woocommerce/archive-product.php | 108 +++++++++++++++++++++++++++ woocommerce/global/wrapper-end.php | 23 ++++++ woocommerce/global/wrapper-start.php | 31 ++++++++ 4 files changed, 162 insertions(+), 61 deletions(-) delete mode 100644 woocommerce.php create mode 100755 woocommerce/archive-product.php create mode 100644 woocommerce/global/wrapper-end.php create mode 100644 woocommerce/global/wrapper-start.php diff --git a/woocommerce.php b/woocommerce.php deleted file mode 100644 index e04b2ab..0000000 --- a/woocommerce.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - -
- -
- - - - -
- - - - - -
- -
- - - - - - - - -
- - - - diff --git a/woocommerce/archive-product.php b/woocommerce/archive-product.php new file mode 100755 index 0000000..13ada76 --- /dev/null +++ b/woocommerce/archive-product.php @@ -0,0 +1,108 @@ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?> + + + + + + + + + + diff --git a/woocommerce/global/wrapper-end.php b/woocommerce/global/wrapper-end.php new file mode 100644 index 0000000..d788f46 --- /dev/null +++ b/woocommerce/global/wrapper-end.php @@ -0,0 +1,23 @@ + + diff --git a/woocommerce/global/wrapper-start.php b/woocommerce/global/wrapper-start.php new file mode 100644 index 0000000..cb8a5ff --- /dev/null +++ b/woocommerce/global/wrapper-start.php @@ -0,0 +1,31 @@ +
'; +} else { + echo '
'; +} From 4eea77d775f200188b2d96d3c303b0340fcdbbde Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Fri, 18 Nov 2016 23:30:40 +0200 Subject: [PATCH 02/16] add to cart button bootstrap style --- woocommerce/loop/add-to-cart.php | 35 ++++++++++ .../single-product/add-to-cart/simple.php | 65 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100755 woocommerce/loop/add-to-cart.php create mode 100755 woocommerce/single-product/add-to-cart/simple.php diff --git a/woocommerce/loop/add-to-cart.php b/woocommerce/loop/add-to-cart.php new file mode 100755 index 0000000..1b4f521 --- /dev/null +++ b/woocommerce/loop/add-to-cart.php @@ -0,0 +1,35 @@ +%s', + esc_url( $product->add_to_cart_url() ), + esc_attr( isset( $quantity ) ? $quantity : 1 ), + esc_attr( $product->id ), + esc_attr( $product->get_sku() ), + // TODO: load add to cart button class from customizer? +// esc_attr( isset( $class ) ? $class : 'button' ), + esc_html( $product->add_to_cart_text() ) + ), + $product ); diff --git a/woocommerce/single-product/add-to-cart/simple.php b/woocommerce/single-product/add-to-cart/simple.php new file mode 100755 index 0000000..0e56dd2 --- /dev/null +++ b/woocommerce/single-product/add-to-cart/simple.php @@ -0,0 +1,65 @@ +is_purchasable() ) { + return; +} + +?> + +get_availability(); + $availability_html = empty( $availability['availability'] ) ? '' : '

' . esc_html( $availability['availability'] ) . '

'; + + echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product ); +?> + +is_in_stock() ) : ?> + + + +
+ + + is_sold_individually() ) { + woocommerce_quantity_input( array( + 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 1, $product ), + 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ), + 'input_value' => ( isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 ) + ) ); + } + ?> + + + + + + +
+ + + + From 31ca66b12bd4796cf298e48c132d4e8dd041ecf2 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 00:27:36 +0200 Subject: [PATCH 03/16] bootstrap coupon and update card buttons --- woocommerce/cart/cart.php | 166 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100755 woocommerce/cart/cart.php diff --git a/woocommerce/cart/cart.php b/woocommerce/cart/cart.php new file mode 100755 index 0000000..d63b50c --- /dev/null +++ b/woocommerce/cart/cart.php @@ -0,0 +1,166 @@ + + +
+ + + + + + + + + + + + + + + + + + cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> + + + + + + + + + + + + + + + + + + + + + +
  
+ ×', + esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), + __( 'Remove this item', 'woocommerce' ), + esc_attr( $product_id ), + esc_attr( $_product->get_sku() ) + ), $cart_item_key ); + ?> + + get_image(), $cart_item, $cart_item_key ); + + if ( ! $product_permalink ) { + echo $thumbnail; + } else { + printf( '%s', esc_url( $product_permalink ), $thumbnail ); + } + ?> + + get_title(), $cart_item, $cart_item_key ) . ' '; + } else { + echo apply_filters( 'woocommerce_cart_item_name', sprintf( '%s', esc_url( $product_permalink ), $_product->get_title() ), $cart_item, $cart_item_key ); + } + + // Meta data + echo WC()->cart->get_item_data( $cart_item ); + + // Backorder notification + if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) { + echo '

' . esc_html__( 'Available on backorder', 'woocommerce' ) . '

'; + } + ?> +
+ cart->get_product_price( $_product ), $cart_item, $cart_item_key ); + ?> + + is_sold_individually() ) { + $product_quantity = sprintf( '1 ', $cart_item_key ); + } else { + $product_quantity = woocommerce_quantity_input( array( + 'input_name' => "cart[{$cart_item_key}][qty]", + 'input_value' => $cart_item['quantity'], + 'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(), + 'min_value' => '0' + ), $_product, false ); + } + + echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); + ?> + + cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); + ?> +
+ + +
+ + + + +
+ + + + + + + +
+ + + +
+ +
+ + + +
+ + From 5115570ca898df8f9751f6a8c6d523f552d655e6 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 00:30:53 +0200 Subject: [PATCH 04/16] bootstrap style for proceed to checkout button --- .../cart/proceed-to-checkout-button.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 woocommerce/cart/proceed-to-checkout-button.php diff --git a/woocommerce/cart/proceed-to-checkout-button.php b/woocommerce/cart/proceed-to-checkout-button.php new file mode 100755 index 0000000..331f5b5 --- /dev/null +++ b/woocommerce/cart/proceed-to-checkout-button.php @@ -0,0 +1,28 @@ + + + + + From e5c7d2d40bf4852063b1aa331306b5bb159a0824 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 00:38:41 +0200 Subject: [PATCH 05/16] bootstrap style buttons --- woocommerce/checkout/form-pay.php | 98 +++++++++++++++++++++++++++++++ woocommerce/checkout/payment.php | 60 +++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100755 woocommerce/checkout/form-pay.php create mode 100755 woocommerce/checkout/payment.php diff --git a/woocommerce/checkout/form-pay.php b/woocommerce/checkout/form-pay.php new file mode 100755 index 0000000..3420d70 --- /dev/null +++ b/woocommerce/checkout/form-pay.php @@ -0,0 +1,98 @@ + +
+ + + + + + + + + + + get_items() ) > 0 ) : ?> + get_items() as $item_id => $item ) : ?> + + + + + + + + + + + get_order_item_totals() ) : ?> + + + + + + + + +
+ display_item_meta( $item ); + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order ); + ?> + ' . sprintf( '× %s', esc_html( $item['qty'] ) ) . '', $item ); ?>get_formatted_line_subtotal( $item ); ?>
+ +
+ needs_payment() ) : ?> +
    + $gateway ) ); + } + } else { + echo '
  • ' . apply_filters( 'woocommerce_no_available_payment_methods_message', __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ) . '
  • '; + } + ?> +
+ +
+ + + + + + + ' ); ?> + + + + +
+
+
diff --git a/woocommerce/checkout/payment.php b/woocommerce/checkout/payment.php new file mode 100755 index 0000000..2b3f162 --- /dev/null +++ b/woocommerce/checkout/payment.php @@ -0,0 +1,60 @@ + +
+ cart->needs_payment() ) : ?> +
    + $gateway ) ); + } + } else { + echo '
  • ' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_country() ? __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : __( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '
  • '; + } + ?> +
+ +
+ + + + + + + ' ); ?> + + + + +
+
+ Date: Sat, 19 Nov 2016 00:41:15 +0200 Subject: [PATCH 06/16] bootstrap input and button styles --- woocommerce/checkout/form-coupon.php | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 woocommerce/checkout/form-coupon.php diff --git a/woocommerce/checkout/form-coupon.php b/woocommerce/checkout/form-coupon.php new file mode 100755 index 0000000..1a45767 --- /dev/null +++ b/woocommerce/checkout/form-coupon.php @@ -0,0 +1,44 @@ +cart->applied_coupons ) ) { + $info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) . ' ' . __( 'Click here to enter your code', 'woocommerce' ) . '' ); + wc_print_notice( $info_message, 'notice' ); +} +?> + + From 9151f065282d6bc63d6e5212e45c4bfcd44faf0c Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:02:52 +0200 Subject: [PATCH 07/16] bootstrap styled nav for my account --- woocommerce/myaccount/navigation.php | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 woocommerce/myaccount/navigation.php diff --git a/woocommerce/myaccount/navigation.php b/woocommerce/myaccount/navigation.php new file mode 100755 index 0000000..edb1a7d --- /dev/null +++ b/woocommerce/myaccount/navigation.php @@ -0,0 +1,35 @@ + + + + + From 3f4a2bce73b66fb732c4d1e6df4408f85f50fffe Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:06:44 +0200 Subject: [PATCH 08/16] bootstrap form and button styles --- woocommerce/myaccount/form-edit-account.php | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 woocommerce/myaccount/form-edit-account.php diff --git a/woocommerce/myaccount/form-edit-account.php b/woocommerce/myaccount/form-edit-account.php new file mode 100755 index 0000000..bded131 --- /dev/null +++ b/woocommerce/myaccount/form-edit-account.php @@ -0,0 +1,73 @@ + + + + + From be17985a6d0bb3afb2b7cc0f2a7e04d3a2ceee42 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:08:55 +0200 Subject: [PATCH 09/16] bootstrap style button --- woocommerce/myaccount/form-edit-address.php | 55 +++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 woocommerce/myaccount/form-edit-address.php diff --git a/woocommerce/myaccount/form-edit-address.php b/woocommerce/myaccount/form-edit-address.php new file mode 100755 index 0000000..db798fe --- /dev/null +++ b/woocommerce/myaccount/form-edit-address.php @@ -0,0 +1,55 @@ + + + + + + +
+ +

+ + + + $field ) : ?> + + + + + + + +

+ + + +

+ +
+ + + + From 174241c39149a04edeeebdcd5870b52046375fe3 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:15:49 +0200 Subject: [PATCH 10/16] bootstrap button styles for orders --- woocommerce/myaccount/my-orders.php | 105 +++++++++++++++++++++++ woocommerce/myaccount/orders.php | 125 ++++++++++++++++++++++++++++ 2 files changed, 230 insertions(+) create mode 100755 woocommerce/myaccount/my-orders.php create mode 100755 woocommerce/myaccount/orders.php diff --git a/woocommerce/myaccount/my-orders.php b/woocommerce/myaccount/my-orders.php new file mode 100755 index 0000000..8d6c4b0 --- /dev/null +++ b/woocommerce/myaccount/my-orders.php @@ -0,0 +1,105 @@ + __( 'Order', 'woocommerce' ), + 'order-date' => __( 'Date', 'woocommerce' ), + 'order-status' => __( 'Status', 'woocommerce' ), + 'order-total' => __( 'Total', 'woocommerce' ), + 'order-actions' => ' ', +) ); + +$customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array( + 'numberposts' => $order_count, + 'meta_key' => '_customer_user', + 'meta_value' => get_current_user_id(), + 'post_type' => wc_get_order_types( 'view-orders' ), + 'post_status' => array_keys( wc_get_order_statuses() ) +) ) ); + +if ( $customer_orders ) : ?> + +

+ + + + + + $column_name ) : ?> + + + + + + + get_item_count(); + ?> + + $column_name ) : ?> + + + + + + + diff --git a/woocommerce/myaccount/orders.php b/woocommerce/myaccount/orders.php new file mode 100755 index 0000000..c2b1591 --- /dev/null +++ b/woocommerce/myaccount/orders.php @@ -0,0 +1,125 @@ + + + + + + + + $column_name ) : ?> + + + + + + + orders as $customer_order ) : + $order = wc_get_order( $customer_order ); + $item_count = $order->get_item_count(); + ?> + + $column_name ) : ?> + + + + + + + + + + max_num_pages ) : ?> +
+ + + + + max_num_pages ) ) : ?> + + +
+ + + +
+ + + + +
+ + + From 4e2f0406b83d2c7d96f2c4137156206f86ef7f01 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:17:28 +0200 Subject: [PATCH 11/16] bootstrap button styles on downloads --- woocommerce/myaccount/downloads.php | 104 ++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100755 woocommerce/myaccount/downloads.php diff --git a/woocommerce/myaccount/downloads.php b/woocommerce/myaccount/downloads.php new file mode 100755 index 0000000..a5a2b41 --- /dev/null +++ b/woocommerce/myaccount/downloads.php @@ -0,0 +1,104 @@ +customer->get_downloadable_products(); +$has_downloads = (bool) $downloads; + +do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?> + + + + + + + + + $column_name ) : ?> + + + + + + + $column_name ) : ?> + + + + +
+ + + + + + + + + + + + + + + + + + + + array( + 'url' => $download['download_url'], + 'name' => __( 'Download', 'woocommerce' ) + ) + ); + + if ( $actions = apply_filters( 'woocommerce_account_download_actions', $actions, $download ) ) { + foreach ( $actions as $key => $action ) { + echo '' . esc_html( $action['name'] ) . ''; + } + } + ?> + + +
+ + + + +
+ + + + +
+ + + From 75db3953ab2f8c1bd38bd992f6ad33f999772f73 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:25:47 +0200 Subject: [PATCH 12/16] bootstrap styles in auth management --- woocommerce/myaccount/form-login.php | 124 ++++++++++++++++++ woocommerce/myaccount/form-lost-password.php | 45 +++++++ woocommerce/myaccount/form-reset-password.php | 52 ++++++++ 3 files changed, 221 insertions(+) create mode 100755 woocommerce/myaccount/form-login.php create mode 100755 woocommerce/myaccount/form-lost-password.php create mode 100755 woocommerce/myaccount/form-reset-password.php diff --git a/woocommerce/myaccount/form-login.php b/woocommerce/myaccount/form-login.php new file mode 100755 index 0000000..3ba1f4c --- /dev/null +++ b/woocommerce/myaccount/form-login.php @@ -0,0 +1,124 @@ + + + + + + + + +
+ +
+ + + +

+ + + + + +
+ +
+ +

+ +
+ + + + + +

+ + +

+ + + +

+ + +

+ + + +

+ + +

+ + + + +
+ + + + +

+ + +

+ + + +
+ +
+ +
+ + + diff --git a/woocommerce/myaccount/form-lost-password.php b/woocommerce/myaccount/form-lost-password.php new file mode 100755 index 0000000..df71787 --- /dev/null +++ b/woocommerce/myaccount/form-lost-password.php @@ -0,0 +1,45 @@ + + +
+ +

+ +

+ + +

+ +
+ + + +

+ + +

+ + + +
diff --git a/woocommerce/myaccount/form-reset-password.php b/woocommerce/myaccount/form-reset-password.php new file mode 100755 index 0000000..5ba92cc --- /dev/null +++ b/woocommerce/myaccount/form-reset-password.php @@ -0,0 +1,52 @@ + + +
+ +

+ +

+ + +

+

+ + +

+ + + + +
+ + + +

+ + +

+ + + +
From 25351cee1827089423c7bd6ed451e1a8deda0812 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 01:31:13 +0200 Subject: [PATCH 13/16] bootstrap cart styles --- woocommerce/cart/cart-empty.php | 39 ++++++++++++++ woocommerce/cart/mini-cart.php | 91 +++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 woocommerce/cart/cart-empty.php create mode 100755 woocommerce/cart/mini-cart.php diff --git a/woocommerce/cart/cart-empty.php b/woocommerce/cart/cart-empty.php new file mode 100644 index 0000000..790b626 --- /dev/null +++ b/woocommerce/cart/cart-empty.php @@ -0,0 +1,39 @@ + + +

+ +

+ + + + 0 ) : ?> +

+ + + +

+ diff --git a/woocommerce/cart/mini-cart.php b/woocommerce/cart/mini-cart.php new file mode 100755 index 0000000..25371a7 --- /dev/null +++ b/woocommerce/cart/mini-cart.php @@ -0,0 +1,91 @@ + + + + +
    + + cart->is_empty() ) : ?> + + cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); + $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); + $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> +
  • + ×', + esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), + __( 'Remove this item', 'woocommerce' ), + esc_attr( $product_id ), + esc_attr( $_product->get_sku() ) + ), $cart_item_key ); + ?> + is_visible() ) : ?> + + + + + + + cart->get_item_data( $cart_item ); ?> + + ' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '', $cart_item, $cart_item_key ); ?> +
  • + + + + +
  • + + + +
+ +cart->is_empty() ) : ?> + +

: cart->get_cart_subtotal(); ?>

+ + + +

+ + +

+ + + + From 91b04484b0b506da7b870a95104531baecc3a7b4 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 11:46:50 +0200 Subject: [PATCH 14/16] make forms more bootstrap like --- inc/woocommerce.php | 97 ++++++++++++++++++++++++++- woocommerce/global/form-login.php | 62 +++++++++++++++++ woocommerce/global/quantity-input.php | 25 +++++++ 3 files changed, 181 insertions(+), 3 deletions(-) create mode 100755 woocommerce/global/form-login.php create mode 100755 woocommerce/global/quantity-input.php diff --git a/inc/woocommerce.php b/inc/woocommerce.php index 51ab159..b55cdc5 100644 --- a/inc/woocommerce.php +++ b/inc/woocommerce.php @@ -7,8 +7,99 @@ */ add_action( 'after_setup_theme', 'woocommerce_support' ); -if ( ! function_exists ( 'woocommerce_support' ) ) { +if ( ! function_exists( 'woocommerce_support' ) ) { function woocommerce_support() { - add_theme_support( 'woocommerce' ); + add_theme_support( 'woocommerce' ); + // hook in and customizer form fields + add_filter( 'woocommerce_form_field_args', 'wc_form_field_args', 10, 3 ); } -} \ No newline at end of file +} + +/** + * Filter hook function monkey patching form classes + * Author: Adriano Monecchi http://stackoverflow.com/a/36724593/307826 + * + * @param $args + * @param $key + * @param null $value + * + * @return mixed + */ +function wc_form_field_args( $args, $key, $value = null ) { + +// Start field type switch case + + switch ( $args['type'] ) { + + /* Targets all select input type elements, except the country and state select input types */ + case 'select' : + // Add a class to the field's html element wrapper - woocommerce + // input types (fields) are often wrapped within a

tag. + $args['class'][] = 'form-group'; + // Add a class to the form input itself. + $args['input_class'] = array( 'form-control', 'input-lg' ); + $args['label_class'] = array( 'control-label' ); + $args['custom_attributes'] = array( + 'data-plugin' => 'select2', + 'data-allow-clear' => 'true', + 'aria-hidden' => 'true', + // Add custom data attributes to the form input itself. + ); + break; + + // By default WooCommerce will populate a select with the country names - $args + // defined for this specific input type targets only the country select element. + case 'country' : + $args['class'][] = 'form-group single-country'; + $args['label_class'] = array( 'control-label' ); + break; + + // By default WooCommerce will populate a select with state names - $args defined + // for this specific input type targets only the country select element. + case 'state' : + // Add class to the field's html element wrapper. + $args['class'][] = 'form-group'; + // add class to the form input itself. + $args['input_class'] = array( '', 'input-lg' ); + $args['label_class'] = array( 'control-label' ); + $args['custom_attributes'] = array( + 'data-plugin' => 'select2', + 'data-allow-clear' => 'true', + 'aria-hidden' => 'true', + ); + break; + + case 'password' : + case 'text' : + case 'email' : + case 'tel' : + case 'number' : + $args['class'][] = 'form-group'; + $args['input_class'] = array( 'form-control', 'input-lg' ); + $args['label_class'] = array( 'control-label' ); + break; + + case 'textarea' : + $args['input_class'] = array( 'form-control', 'input-lg' ); + $args['label_class'] = array( 'control-label' ); + break; + + case 'checkbox' : + $args['label_class'] = array( 'custom-control custom-checkbox' ); + $args['input_class'] = array( 'custom-control-input', 'input-lg' ); + break; + + case 'radio' : + $args['label_class'] = array( 'custom-control custom-radio' ); + $args['input_class'] = array( 'custom-control-input', 'input-lg' ); + break; + + default : + $args['class'][] = 'form-group'; + $args['input_class'] = array( 'form-control', 'input-lg' ); + $args['label_class'] = array( 'control-label' ); + break; + } + + return $args; +} diff --git a/woocommerce/global/form-login.php b/woocommerce/global/form-login.php new file mode 100755 index 0000000..41f2f30 --- /dev/null +++ b/woocommerce/global/form-login.php @@ -0,0 +1,62 @@ + + diff --git a/woocommerce/global/quantity-input.php b/woocommerce/global/quantity-input.php new file mode 100755 index 0000000..ccb361a --- /dev/null +++ b/woocommerce/global/quantity-input.php @@ -0,0 +1,25 @@ + +
+ +
From 89bb11b0ea4340e09fd762ca02108fe38cfd4c6f Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 13:05:37 +0200 Subject: [PATCH 15/16] do not show sidebars on WooCommerce pages --- global-templates/left-sidebar-check.php | 57 ++++++++++++++++--- page.php | 74 +++++++++++++++---------- 2 files changed, 94 insertions(+), 37 deletions(-) diff --git a/global-templates/left-sidebar-check.php b/global-templates/left-sidebar-check.php index 3a6d79e..9886343 100644 --- a/global-templates/left-sidebar-check.php +++ b/global-templates/left-sidebar-check.php @@ -1,13 +1,52 @@ - - - + + + + +'; + } else { + $html = ''; + if ( 'right' === $sidebar_pos || 'left' === $sidebar_pos ) { + $html = '
'; + } else { + $html .= 'col-md-12 content-area" id="primary">'; + } + echo $html; + } elseif ( is_active_sidebar( 'right-sidebar' ) && is_active_sidebar( 'left-sidebar' ) ) { + $html = '
'; + } else { + $html .= 'col-md-12 content-area" id="primary">'; + } + echo $html; + } + } +?> + - -
- -
- \ No newline at end of file diff --git a/page.php b/page.php index 9b4f237..1c87c3a 100644 --- a/page.php +++ b/page.php @@ -10,52 +10,70 @@ * @package understrap */ - get_header(); +get_header(); ?>
-
+
-
- - - +
-
+ + - +
- + - + - + -
+ -
+ - - - - - - +
-
+ + -
+ + + + + +
+ +
From 04f8a49195b804b06e2cafea3bdcf18e166d8aa4 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 13:13:31 +0200 Subject: [PATCH 16/16] table hover and striped --- woocommerce/cart/cart.php | 2 +- woocommerce/myaccount/my-orders.php | 2 +- woocommerce/myaccount/orders.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/woocommerce/cart/cart.php b/woocommerce/cart/cart.php index d63b50c..39990ab 100755 --- a/woocommerce/cart/cart.php +++ b/woocommerce/cart/cart.php @@ -28,7 +28,7 @@ do_action( 'woocommerce_before_cart' ); ?> - +
diff --git a/woocommerce/myaccount/my-orders.php b/woocommerce/myaccount/my-orders.php index 8d6c4b0..e1c084b 100755 --- a/woocommerce/myaccount/my-orders.php +++ b/woocommerce/myaccount/my-orders.php @@ -29,7 +29,7 @@ if ( $customer_orders ) : ?>

-
 
+ diff --git a/woocommerce/myaccount/orders.php b/woocommerce/myaccount/orders.php index c2b1591..64fdc2e 100755 --- a/woocommerce/myaccount/orders.php +++ b/woocommerce/myaccount/orders.php @@ -26,7 +26,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> - + $column_name ) : ?>