Up to 50 percent off

product count

This topic contains 3 reply and 2 voices, and was last updated by towhid 9 years, 2 months ago
Viewing 3 Posts - 1 through 3 (of 3 total)
Author Posts
August 13, 2015 at 11:53 pm 66988
towhid 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
August 16, 2015 at 1:29 pm 67268
towhid towhid

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

August 20, 2015 at 7:25 pm 68341
Loukia Loukia

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

August 22, 2015 at 12:50 pm 68551
towhid towhid

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 3 Posts - 1 through 3 (of 3 total)