Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 10th, 2013, 09:57 PM
konstruweb konstruweb is offline
 
Join Date: Sep 2013
Posts: 24
Lightbulb Top Level Category View

Hello, I reordered my store in categories and sub-categories, I wonder if is possible to establish a custom view just to my top level categories, integrating thumbnails and removing list of products. (image attached)



http://www.thepaintballstore.net/sho...gory/clothing/

Thanks in advance,

Mauricio
  #2  
Old December 10th, 2013, 10:40 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Well, there's no simple way to do it. However you can use a little php conditional to check what to display.

For example, to hide your list of products and pagination on Top level category pages, you would wrap all of the code in your Product list module between these 2 tags:

PHP Code:
<?php if ( $category->parent != ) : ?>
PHP Code:
<?php endif; ?>
Basically that says if this category is NOT a parent category (ie. equal to 0) then display what is between these tags.

Maybe this will make more sense:

PHP Code:
<?php if ( $category->parent != ) : ?>
    Display sub-category stuff here
<?php endif; ?>

<?php if ( $category->parent == ) : ?>
    Display top level category stuff here
<?php endif; ?>
So if you go here: The Factory > Your Store > VIEWS > CATEGORY PAGE > Default > Product list > Theme settings () and change the code that you have in there to this:

HTML Code:
<?php if ( $category->parent != 0 ) : ?>

<!-- Pagination Links (Top) -->
<div class="pgr">
  Pages:
  [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
  [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
  [pager.pages delim=' ']
  [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
  [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Top) -->


<!-- Product List -->
<div class="pl">
  [product.each]
  <div class="t1 col3">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div>
    <div class="prc">[product.currency mode="sign"][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details of [product.name]" class="dfbutton dfred dflarge dfrounded">More Details</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div>
<!-- /Product List -->


<!-- Pagination Links (Bottom) -->
<div class="pgr">
  Pages:
  [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
  [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
  [pager.pages delim=' ']
  [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
  [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Bottom) -->

<?php endif; ?>
... then your products will show only on sub-category pages.

The same applies to your category images... You can wrap them in those PHP tags depending on what you want to display and on what type of page.

Eric
  #3  
Old December 11th, 2013, 01:53 PM
konstruweb konstruweb is offline
 
Join Date: Sep 2013
Posts: 24
Default

Thanks Eric!, im going to make that code test,

have a great day

Mauricio
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show sub category items in top level category balkon_oase Questions 2 March 11th, 2013 04:58 AM
No Meta Data and Category Desciption on Default Category Page View cashnow Problems 5 February 4th, 2011 11:08 AM
How do I make a category view for my sidebar that only includes one main category? dcutri Questions 3 January 26th, 2011 01:40 PM
Make merchant selection, at store level, same as at factory level patagonia Feature Requests 0 January 14th, 2011 11:59 AM


All times are GMT -5. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.