From c73d7c36d306caa329064401da2f6892accc1a12 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 20:07:20 +0200 Subject: [PATCH 1/2] bootstrap style product ordering select --- woocommerce/loop/orderby.php | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 woocommerce/loop/orderby.php diff --git a/woocommerce/loop/orderby.php b/woocommerce/loop/orderby.php new file mode 100755 index 0000000..0edd386 --- /dev/null +++ b/woocommerce/loop/orderby.php @@ -0,0 +1,45 @@ + +
+ + $val ) { + if ( 'orderby' === $key || 'submit' === $key ) { + continue; + } + if ( is_array( $val ) ) { + foreach( $val as $innerVal ) { + echo ''; + } + } else { + echo ''; + } + } + ?> +
From 86df36c4ddb7b0be3fe8c0ac720d4f1f46d9d598 Mon Sep 17 00:00:00 2001 From: Stef Kariotidis Date: Sat, 19 Nov 2016 20:34:53 +0200 Subject: [PATCH 2/2] product thumbnails, ratings, short description --- .../single-product/product-thumbnails.php | 71 +++++++++++++++++++ woocommerce/single-product/rating.php | 45 ++++++++++++ woocommerce/single-product/review-rating.php | 32 +++++++++ .../single-product/short-description.php | 32 +++++++++ 4 files changed, 180 insertions(+) create mode 100755 woocommerce/single-product/product-thumbnails.php create mode 100755 woocommerce/single-product/rating.php create mode 100755 woocommerce/single-product/review-rating.php create mode 100755 woocommerce/single-product/short-description.php diff --git a/woocommerce/single-product/product-thumbnails.php b/woocommerce/single-product/product-thumbnails.php new file mode 100755 index 0000000..4d944a3 --- /dev/null +++ b/woocommerce/single-product/product-thumbnails.php @@ -0,0 +1,71 @@ +get_gallery_attachment_ids(); + +if ( $attachment_ids ) { + $loop = 0; + $columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 ); + ?> +
%s', + esc_url( $props['url'] ), + esc_attr( $image_class ), + esc_attr( $props['caption'] ), + wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ), 0, $props ) + ), + $attachment_id, + $post->ID, + esc_attr( $image_class ) + ); + + $loop++; + } + + ?>
+ get_rating_count(); +$review_count = $product->get_review_count(); +$average = $product->get_average_rating(); + +if ( $rating_count > 0 ) : ?> + +
+
+ + ', '' ); ?> + ' . $rating_count . '' ); ?> + +
+ (' . $review_count . '' ); ?>) +
+ + diff --git a/woocommerce/single-product/review-rating.php b/woocommerce/single-product/review-rating.php new file mode 100755 index 0000000..1d33eb7 --- /dev/null +++ b/woocommerce/single-product/review-rating.php @@ -0,0 +1,32 @@ +comment_ID, 'rating', true ) ); + +if ( $rating && get_option( 'woocommerce_enable_review_rating' ) === 'yes' ) { ?> + +
+ +
+ +post_excerpt ) { + return; +} + +?> +
+ post_excerpt ) ?> +