Product title styling
authorLaury GvR <laury@gaslightmedia.com>
Thu, 21 Apr 2016 19:36:10 +0000 (15:36 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 21 Apr 2016 19:36:10 +0000 (15:36 -0400)
css/app.css
functions.php
scss/plugins/_woocommerce.scss
woocommerce/content-product.php
woocommerce/loop/price.php [new file with mode: 0644]
woocommerce/single-product/price.php

index 32601c6..a28a818 100644 (file)
@@ -7016,6 +7016,14 @@ main.woocommerce, div.woocommerce {
       display: none; }
     main.woocommerce #content .product.type-product .price del, div.woocommerce #content .product.type-product .price del {
       color: #0f789f; }
+  main.woocommerce #content .product.type-product .price.price-single, div.woocommerce #content .product.type-product .price.price-single {
+    clear: both;
+    float: none;
+    text-align: left;
+    padding-bottom: 5px; }
+    main.woocommerce #content .product.type-product .price.price-single span, div.woocommerce #content .product.type-product .price.price-single span {
+      color: black;
+      font-size: 22px; }
   main.woocommerce #content .product.type-product .stock, div.woocommerce #content .product.type-product .stock {
     color: black;
     float: right;
@@ -7151,7 +7159,19 @@ main.woocommerce, div.woocommerce {
           margin-bottom: 25px; } }
       main.woocommerce #content ul.products li.product.type-product h3, div.woocommerce #content ul.products li.product.type-product h3 {
         font-size: 16px;
-        text-align: left; }
+        text-align: left;
+        padding: 10px 0 0; }
+      main.woocommerce #content ul.products li.product.type-product .product-list-link, div.woocommerce #content ul.products li.product.type-product .product-list-link {
+        display: block;
+        height: 220px;
+        overflow: hidden;
+        border: 1px solid lightgrey;
+        border-radius: 2px; }
+        main.woocommerce #content ul.products li.product.type-product .product-list-link .wp-post-image, div.woocommerce #content ul.products li.product.type-product .product-list-link .wp-post-image {
+          min-height: 220px;
+          width: 100%; }
+      main.woocommerce #content ul.products li.product.type-product .product-list-link-wrapper, div.woocommerce #content ul.products li.product.type-product .product-list-link-wrapper {
+        padding-right: 15px; }
       main.woocommerce #content ul.products li.product.type-product .wp-post-image, div.woocommerce #content ul.products li.product.type-product .wp-post-image {
         margin-bottom: 0;
         border: none;
index d28b9bc..429a06d 100644 (file)
@@ -163,6 +163,11 @@ add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add
 remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 10 );
 add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 30 );
 
+remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_single_price', 40 );
+remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_single_price', 40 );
+add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_single_price', 10 );
+
+
 //remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
 //add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 20 );
 
index 06ea37d..d4462af 100644 (file)
@@ -679,6 +679,16 @@ div.woocommerce {
                 color: $blue;
             }
         }
+        .price.price-single {
+            clear: both;
+            float: none;
+            text-align: left;
+            padding-bottom: 5px;
+            span {
+                color: black;
+                font-size: 22px;
+            }
+        }
         .stock {
             color: black;
             float: right;
@@ -868,6 +878,21 @@ div.woocommerce {
             h3 {
                 font-size: 16px;
                 text-align: left;
+                padding: 10px 0 0;
+            }
+            .product-list-link {
+                    display: block;
+                    height:220px;
+                    overflow: hidden;
+                    border: 1px solid lightgrey;
+                    border-radius: 2px;
+                    .wp-post-image {
+                        min-height: 220px;
+                        width: 100%;
+                    }
+            }
+            .product-list-link-wrapper {
+                padding-right: 15px;
             }
             .wp-post-image {
                 margin-bottom: 0;
index 0fd8d70..7c18d65 100644 (file)
@@ -51,28 +51,19 @@ if ( 0 === $woocommerce_loop['loop'] % $woocommerce_loop['columns'] ) {
 <?php if (!is_product()) { ?>
 <li <?php post_class( $classes ); ?>>
     <div class="row collapse">
-        <div class="small-12 large-5 column">
-            <a class="more" href="<?php the_permalink(); ?>">
+        <div class="small-12 large-5 column product-list-link-wrapper">
+            <a class="product-list-link" href="<?php the_permalink(); ?>">
             <?php echo $product->get_image(); ?>
             </a>
         </div>
-        <div class="small-12 large-7 columns">
+        <div class="small-12 large-7 columns product-list-info-wrapper">
             <div class="row">
                 <?php echo woocommerce_template_loop_product_link_open(); ?>
                 <?php do_action( 'woocommerce_shop_loop_item_title' ); ?>
                 <?php echo woocommerce_template_loop_product_link_close(); ?>
-                <?php if (!$product->has_child()) { ?>
                     <?php do_action( 'woocommerce_after_shop_loop_item_title' );?>
                     </div>
-                <?php } else { ?>
-                    </div>
-                    <div class="row">
-                        <p class="products-short-desc">
-                            <?php echo $post->post_excerpt ?>
-                        </p>
                         <a class="more" href="<?php the_permalink(); ?>">More Info...</a>
-                    </div>
-                <?php } ?>
 
             <div class="row">
                 <div class="row">
diff --git a/woocommerce/loop/price.php b/woocommerce/loop/price.php
new file mode 100644 (file)
index 0000000..dae22a4
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Loop Price
+ *
+ * This template can be overridden by copying it to yourtheme/woocommerce/loop/price.php.
+ *
+ * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
+ * will need to copy the new files to your theme to maintain compatibility. We try to do this.
+ * as little as possible, but it does happen. When this occurs the version of the template file will.
+ * be bumped and the readme will list any important changes.
+ *
+ * @see            http://docs.woothemes.com/document/template-structure/
+ * @author             WooThemes
+ * @package    WooCommerce/Templates
+ * @version     1.6.4
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+       exit; // Exit if accessed directly
+}
+
+global $product;
+?>
+
+<?php if ( $price_html = $product->get_price_html() ) : ?>
+<!--   <span class="price"><?php // echo $price_html; ?></span>-->
+<?php endif; ?>
index e7e2bd1..c206593 100644 (file)
@@ -24,7 +24,7 @@ global $product;
 ?>
 <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
 
-       <?php // if( $product->is_type( 'simple' ) ){ ?><p class="price"><?php echo $product->get_price_html(); ?></p><?php // } ?>
+       <?php // if( $product->is_type( 'simple' ) ){ ?><p class="price price-single"><?php echo $product->get_price_html(); ?></p><?php // } ?>
 
        <meta itemprop="price" content="<?php echo esc_attr( $product->get_price() ); ?>" />
        <meta itemprop="priceCurrency" content="<?php echo esc_attr( get_woocommerce_currency() ); ?>" />