WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
Excluding a category from the products page (1 post)

  1. LSB Web Design
    Member
    Posted 4 months ago #

    Hi I am trying to exclude a number of categories from the products page but I cant seem to get it to work correctly following the instructions on this page: http://docs.getshopped.org/documentation/theme-hacks/

    I have added the following code to the wpsc-products_page.php file after line 65:

    <div class="product_grid_display group">
    <?php while (wpsc_have_products()) : wpsc_the_product(); ?>
    <?php
    $prod_id = wpsc_the_product_id();
    $category = get_the_product_category( $prod_id );
    //echo('<pre>').print_r($category,1).'</pre>';
    if($category[0]->term_id == 143){
    	//skip
    	} else {?>
    
    	<div class="product_grid_item product_view_<?php echo wpsc_the_product_id(); ?>">
    
    	<?php if(wpsc_the_product_thumbnail()) :?>
    	<div class="item_image">

    Im then not sure on the next part.
    What exactly do I need to add to the wpsc-grid_view.php file and on what line?

    Guidance on this would be appreciated.

    https://wordpress.org/plugins/wp-e-commerce/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags