disabling category product count taxonomy if possible with out disturbing products showing in market

ok i realise my subsites are carrying over the product count from the first site set up is there a way to disable the count feature with out causing disruption to the first site that was set up

What I have realised is that if the count is zero the category does not appear but what is happening is that all the category taxonomies are be carried over except the count feature to the new subsites as it is causing categories to appear despite no products being added.

so if site A had 3 items in Clothing then that amount is being carried over to site B despite no products being added. this is also happening with tags as well

regards

  • Luís

    Hi antony ,

    Hope you're doing well today!

    From what I tested , this is not a default behaviour of MarketPress. We worked in a previous topic to create global terms for the network and I think this is caused by the "Multisite Global Terms".

    I flagged the SLS team (our code experts :slight_smile: ) to investigate further and get their valuable feedback in order to check if we can avoid this to happen.

    Since this team deals with more advanced threads it may take them longer to reply.

    Cheers, Luís

  • antony

    Ok i have narrowed down my problem to the multisite global terms plugin with the catergory count in my subsites to the amount of a product in a category being carried forward to subsequent subsites

    this plugin only has one page of code as below

    <?php
    /**
    * Plugin Name: Multisite Global Terms
    * Version: 1.0
    * Network: true
    * Plugin URI: http://buddydev.com/plugin/mu-global-terms/
    * Author: Brajesh Singh
    * Author URI: http://buddydev.com
    * Description: The plugin allows make all the taxonomy terms( It is not taxonomy, just terms) global. The terms can be added from any of the sub site and depending on the currently available taxonomy( registered taxonomy) of a sub site, the terms will be available there
    */

    //even before any taxonmy/terms are initialized, we reset the tables
    add_action( 'init', 'buddydev_change_tax_terms_table', 0 );
    //on blog switching, we need to reset it again, so it does not use current blog's tax/terms only
    //it works both on switch/restore blog
    add_action( 'switch_blog', 'buddydev_change_tax_terms_table', 0 );

    function buddydev_change_tax_terms_table(){
    global $wpdb;
    //change terms table to use main site's
    $wpdb->terms = $wpdb->base_prefix . 'terms';
    //change taxonomy table to use main site's taxonomy table
    $wpdb->term_taxonomy = $wpdb->base_prefix . 'term_taxonomy';
    //if you want to use a different sub sites table for sharing, you can replca e$wpdb->vbase_prefix with $wpdb->get_blog_prefix( $blog_id )
    }

    is is possible with in this to disable the category count taxonomy from being carried forward, this should solve the issue

    Regards
    Antony Barker

  • antony

    ok i managed to get a fix , removed the inventory in the main site, and removed subsites created by super admin.

    Then i changed the following in the Multisite Global Terms plugin

    $wpdb->terms = $wpdb->base_prefix . 'terms';
    //change taxonomy table to use main site's taxonomy table
    $wpdb->term_taxonomy = $wpdb->base_prefix . 'term_taxonomy';

    to this
    $wpdb->terms = $wpdb->get_blog_prefix( $blog_id="1" ) . 'terms';
    //change taxonomy table to use main site's taxonomy table
    $wpdb->term_taxonomy = $wpdb->get_blog_prefix( $blog_id ) . 'term_taxonomy';

    This allows each subsite to ignore the category count and show the correct number of products per category.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.