Home Forums Theme Support Dokan product count

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  towhid 3 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #66988

    Loukia
    Member
    Post count: 87

    1. i have to disable the sellers to add product to the categories and add only to the subcategories

    2. i would like to add a feature to categories and subcategories which is to count the number of the products to the subcategories.
    i have created this code which i added to the child theme page archive-product.php but it seems that is not working.

    <h1><?php woocommerce_page_title(); 
    
    global $wp_query;
    // get the query object
    $cat_obj = $wp_query->get_queried_object();
    
    if($cat_obj)    {
        $category_name = $cat_obj->name;
        $category_desc = $cat_obj->description;
        $category_ID  = $cat_obj->term_id;
    }
    
    $term = get_term( $category_ID, 'product_cat' ); 
    echo '('. $term->count . ')';
    
    ?>      
            </h1>

    regards

    #67268

    towhid
    Participant
    Post count: 4505

    Hello Loukia,

    I have to check this code for myself. Please allow me some time. After completing all my works, I will check this matter.

    Thanks

    #68341

    Loukia
    Member
    Post count: 87

    Hi is been 4 days. have you checked the code?

    #68551

    towhid
    Participant
    Post count: 4505

    Hello Loukia,

    I have checked this code but it is also providing me an error. It will best if you hire an experienced developer and get the work done for you.

    I am really sorry to say we are unable to provide any possible solution due to a heavy pressure. We have lots of pending task in our queue.

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘product count’ is closed to new replies.