Advertisement
TraciBunkers

shopp category- trying to only show 2 levels

Sep 6th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.29 KB | None | 0 0
  1. <?php if(shopp('collection.hasproducts','load=prices,images') || shopp('collection.hascategories')): ?>
  2.  
  3.     <?php shopp('storefront.breadcrumb','separator= | '); ?>
  4.  
  5.     <h2><?php shopp( 'collection.name' ); ?></h2>
  6. <!-- Go to www.addthis.com/dashboard to customize your tools -->
  7. <div class="addthis_native_toolbox"></div></br>
  8.  
  9.     <div class="category">
  10.         <section class="navigation controls">
  11.             <div class="alignright">
  12.                 <?php shopp( 'storefront.orderby-list', 'dropdown=on' ); ?>
  13.             </div>
  14.         </section>
  15.  
  16.         <section class="view controls">
  17.             <?php shopp( 'storefront.views', 'label=' . __( 'Views: ', 'Shopp' ) ); ?>
  18.             <?php shopp( 'collection.pagination', 'show=10&before=<div class="alignright">' ); ?>
  19.         </section>
  20.         </div>
  21.     <br class="clear" />
  22.         <?php if(shopp('collection.hascategories')): ?>
  23.         <?php shopp('collection.coverimage','width=500&height=700&zoom=1'); ?>
  24.         <?php shopp('collection.description') ?>
  25.           <ul class="products">
  26.              <li class="row">
  27.  
  28. <ul>
  29.                 <?php while(shopp('collection.subcategories')): ?>
  30.                 <!-- display thumbnail and link -->
  31.                 <li class='product'>
  32.               <a href='<?php shopp('subcategory.url') ?>'>
  33.             <?php if(shopp('subcategory.has-images','type=thumbnail')) {shopp('subcategory.coverimage');}?>
  34.             <br class="clear" />
  35.             <h3><?php shopp('subcategory.name'); ?></h3>
  36.               </a>
  37.  
  38.         <?php endwhile; ?>
  39.      </ul>
  40.  
  41.         <?php else: ?>
  42.       <div class="alignright"><?php shopp('collection.pagination'); ?></div>
  43.     <br class="clear" />
  44. <?php shopp('collection.description') ?>
  45.     <ul class="products">
  46.         <li class="row">
  47.  
  48. <ul>
  49.         <?php while(shopp('collection.products')): ?>
  50.         <?php if(shopp('collection.row')): ?></ul>
  51.  
  52. <li class="row">
  53.  
  54. <ul><?php endif; ?>
  55.             <li class="product">
  56.                 <div class="frame">
  57.                 <a href="<?php shopp('product.url'); ?>"><?php shopp('product.thumbnail'); ?></a>
  58.                     <div class="details">
  59.                     <h4 class="name"><a href="<?php shopp('product.url'); ?>"><?php shopp('product.name'); ?></a></h4>
  60.                     <p class="price"><?php shopp('product.saleprice','starting=from'); ?> </p>
  61.                     <?php if (shopp('product.has-savings')): ?>
  62.                         <p class="savings">Save <?php shopp('product.savings','show=percent'); ?></p>
  63.                     <?php endif; ?>
  64.  
  65.                         <div class="listview">
  66.                         <p><?php shopp('product.summary'); ?></p>
  67.                         <form action="<?php shopp('cart','url'); ?>" method="post" class="shopp product">
  68.                         <?php shopp('product.addtocart'); ?>
  69.                         </form>
  70.                         </div>
  71.                     </div>
  72.                     <br class="clear" />
  73.  
  74.                 </div>
  75.  
  76.         <?php endwhile; ?>
  77.         </ul>
  78.  
  79.     <br class="clear" />
  80.     <div class="alignright"><?php shopp('collection.pagination'); ?></div>
  81.     <br class="clear" />
  82.      <?php endif; ?>
  83.  
  84. <?php else : ?>
  85.     <?php if ( ! shopp('storefront.is-landing') ) shopp( 'storefront.breadcrumb' ); ?>
  86.     <p class="notice"><?php _e( 'No products were found.', 'Shopp' ); ?></p>
  87. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement