testing listview sub cat
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 13 Jan 2016 14:36:00 +0000 (09:36 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 13 Jan 2016 14:36:00 +0000 (09:36 -0500)
views/list_products.php

index fc5e00c..7817e1e 100644 (file)
 <?php }?>
 
 
-<?php if($_COOKIE['view'] == "list"){ ?>
+<?php if(isset($_COOKIE['view']) || $_COOKIE['view'] == "list"){ ?>
    <div id="listView" class="row">
    <?php 
       $catNum = $_REQUEST[MICHSCI_CATEGORY_NAME];
       echo category_description($catNum);
-      $cat_children = get_term_children($cat_id, MICHSCI_CATEGORY_NAME);
    ?>
         <?php  if(isset($_COOKIE['subcat'])){ ?>
        
        <?php foreach($cat_children as $cats){
             $term = get_term($cats, MICHSCI_CATEGORY_NAME); ?>
             <?php $tags = wp_get_post_terms($product->ID,'michsci_tag'); ?>
-            <div class="<?php echo $term->slug;?> grid small-12 medium-4 columns<?php if ($product->end){ echo ' end';}?>">
-                <div class="prodImgGrid small-12 columns"><a href="<?php echo $product->href; ?>">
+            <div class="<?php echo $term->slug;?> list small-12 columns<?php if ($product->end){ echo ' end';}?>">
+                <div class="prodImgList small-12 large-3 columns"><a href="<?php echo $product->href; ?>">
                      <img id="catImg" src="<?php echo z_taxonomy_image_url($cats, array(320, 285)); ?>" class="image wp-post-image no-display" alt=" "  title="<?php echo $term->name; ?>" itemprop="image">
                 </div>
-                <div class="subCatGrid small-12 columns">
+                <div class="subCatList small-12 large-3 columns">
                     <a href="<?php echo $cat->href . $term->term_id; ?>"><?php echo $term->name; ?></a>
                 </div>
-                <div class="prodTitleGrid small-12 columns">
+                <div class="prodTitleList small-12 large-3 columns">
                     <a href="<?php echo $cat->href . $term->term_id; ?>"><strong><?php echo $term->name; ?></strong></a>
                 </div>
         </div>
@@ -90,6 +89,6 @@
     <?php endforeach; endif; ?>
    </div>
    <?php } ?>
-<?php } ?>
+<?php }