WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Category conditional dont works (1 post)

  1. patxianton
    Member
    Posted 1 year ago #

    Hello,
    I want to make a loop to display some products according to their category.
    The products of category "photography" can be chosen amount.
    In the products of category "sculpture" can not choose quantity, there is only one product.

    The code should be displayed only in the photography category but comes in all

    <?php global $post, $product, $woocommerce_loop;
    
    ?>
    
    <?php 
    
    if (is_product_category('photography')) ; ?>
    
    <div class="quantity"><input name="<?php echo $input_name; ?>" data-min="<?php echo $min_value; ?>" data-max="<?php echo $max_value; ?>" value="<?php echo $input_value; ?>" size="4" title="Qty" class="input-text qty text" maxlength="12" /></div>
    
    <?php endif ?>

    Thanks a lot

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.