Adjust product containers for auctions to accommodate lack of sidebar
authorLaury <laury@gaslightmedia.com>
Wed, 10 Apr 2019 19:52:43 +0000 (15:52 -0400)
committerLaury <laury@gaslightmedia.com>
Wed, 10 Apr 2019 19:52:43 +0000 (15:52 -0400)
parts/shop-quick-display.php
woocommerce.php

index 32fb029..a5dc13a 100644 (file)
@@ -1,4 +1,4 @@
-                                <div id="woo-quick-display" class="small-12 medium-9 columns">
+                               <div id="woo-quick-display" class="small-12<?php if (!$product->is_type("auction") ) { echo " medium-9"; } ?> columns">
                                     <div id="woo-quick-cart-icon" class="small-3 columns left">
                                         <div class="woo-quick-cart-image">
                                             <a class="woo-quick-cart-link" href="<?php echo $woocommerce->cart->get_cart_url();?>">
@@ -26,4 +26,4 @@
                                         ?>
                                         <a href="<?php echo $woocommerce->cart->get_checkout_url(); ?>" class="button">checkout</a>
                                     </div>
-                                </div>
\ No newline at end of file
+                                </div>
index 334b350..0739d1d 100644 (file)
@@ -9,12 +9,14 @@
                     include "sections/header.php";
                     include "sections/off-canvas.php";
                     include "sections/top-bar.php";?>
-                    <main class="page-inside woocommerce">
+                    <main class="page-inside woocommerce<?php if ($product->is_type("auction")) { echo " product-auction";} ?>">
                         <div id="content-wrapper" class='side-shadow woocommerce-wrapper'>
                             <div class="row">
-                                <div class="medium-3 columns show-for-medium-up shop-sidebar-wrapper">
-                                    <?php include "parts/shop-sidebar.php";?>
-                                </div>
+                               <?php if (!$product->is_type("auction") ) { ?>
+                                   <div class="medium-3 columns show-for-medium-up shop-sidebar-wrapper">
+                                       <?php include "parts/shop-sidebar.php";?>
+                                   </div>
+                               <?php } ?>
                                 <?php include "parts/shop-quick-display.php";?>
 
                                 <?php if (is_shop()) { ?>
 
                                     <?php
                                             /**
-                                                                                * woocommerce_before_main_content hook
-                                                                                *
-                                                                                * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
-                                                                                * @hooked woocommerce_breadcrumb - 20
-                                                                                */
+                                             * woocommerce_before_main_content hook
+                                             *
+                                             * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
+                                             * @hooked woocommerce_breadcrumb - 20
+                                             */
                                             function wc_category_title_archive_products(){
 
                                                 $product_cats = wp_get_post_terms( get_the_ID(), 'product_cat' );
                                     ?>
                                     </div>
                                 <?php } else if (is_product()) { ?>
-                                    <div class="small-12 medium-9 columns main woo-single-product">
+                                       <div class="small-12<?php if ( !$product->is_type("auction") ) { echo " medium-9";} ?> columns main woo-single-product">
                                         <?php
                                             if(function_exists('pf_show_link')){echo pf_show_link();}
                                         ?>
         </div><!--End of off-canvas-->
         <?php wp_footer();?>
     </body>
-</html>
\ No newline at end of file
+</html>