WC Lovers

WooCommerce Frontend Manager - Multivendor marketplace vendor dashboard

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Forum Replies Created

Viewing 25 posts - 776 through 800 (of 1,046 total)
  • Author
    Posts
  • in reply to: Allow only one attribute for product #111165
    Sushobhan
    Keymaster

    Hello,
    Have you use my snippet in your themes function.php? Well, the snippet should work. To debug this further I’ll require a temporary access of your site. When sharing the access, please don’t forget to mark the reply as private.
    Thanks!

    Sushobhan
    Keymaster

    Hello,
    Ideally you should try to solve the issue, not hiding it. You couldn’t tell for sure, what functionality it will break for your website users. These kind of issues mostly happen due to compatibility problem. Make sure all the plugins you use are compatible to each other and also with your version of WP.
    Thanks!

    Sushobhan
    Keymaster

    Hello,
    You can set individual store wise commission from Admin Dashboard >> Store Vendors >> [[Particular vendor]] from there go to Commission & Withdrawal tab and override your global commission settings. For more detail read here [search for Vendor Level Commission]
    Thanks!

    in reply to: Allow only one attribute for product #110944
    Sushobhan
    Keymaster

    Hello,
    It seems the product is already published before the code snippet was added. From now on, when you try to add a new product, you will see that you can’t add more than one attribute.
    Thanks!

    in reply to: Registration – Individual person & Vendor Company #110892
    Sushobhan
    Keymaster
    This reply has been marked as private.
    in reply to: Downloadable not saving #110692
    Sushobhan
    Keymaster

    Hello,
    in my local setup the code is working fine. I’m sending the full code here, kindly comment out your all existing code and use the following-

    function register_product_Custom_Type() {
    
        class WC_Product_Custom_Type extends WC_Product {
    
            public function __construct( $product ) {
                $this->product_type = 'custom_type';
                parent::__construct( $product );
            }
    
        }
    
    }
    
    add_action( 'init', 'register_product_Custom_Type' );
    
    function add_product_Custom_Type( $types ) {
        $types['custom_type'] = __( 'Custom Type', 'custom_product' );
    
        return $types;
    }
    
    add_filter( 'product_type_selector', 'add_product_Custom_Type' );
    add_filter( 'wcfm_product_types', 'add_product_Custom_Type', 50 );
    
    add_filter( 'wcfm_capability_settings_fields_product_types', function( $product_types, $handler, $wcfm_capability_options = array() ) {
        $custom_type = ( isset( $wcfm_capability_options['custom_type'] ) ) ? $wcfm_capability_options['custom_type'] : 'no';
        $product_types['custom_type'] = array( 'label' => __( 'Custom Type', 'wc-frontend-manager' ), 'name' => $handler . '[custom_type]', 'type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $custom_type );
        return $product_types;
    }, 60, 3 );
    
    function get_group_capablity( $userid = '' ) {
        if ( ! is_user_logged_in() ) return false;
        if ( ! $userid ) $userid = get_current_user_id();
        $wcfm_vendor_groups = get_user_meta( $userid, '_wcfm_vendor_group', true );
        if ( $wcfm_vendor_groups && is_array( $wcfm_vendor_groups ) && ! empty( array_filter( $wcfm_vendor_groups ) ) ) {
            $group_capability_options = array();
            foreach ( $wcfm_vendor_groups as $wcfm_vendor_group ) {
                if ( $wcfm_vendor_group ) {
                    $group_capability_options = array_merge( $group_capability_options, (array) get_post_meta( $wcfm_vendor_group, '_group_capability_options', true ) );
                }
            }
            return $group_capability_options;
        }
        return false;
    }
    
    function _allow_custom_product_types( $product_types ) {
        $wcfm_capability_options = get_group_capablity();
        if ( ! $wcfm_capability_options ) {
            if ( wcfm_is_vendor() ) {
                $wcfm_capability_options = get_option( 'wcfm_capability_options', array() );
            } elseif ( wcfm_is_manager() ) {
                $wcfm_capability_options = get_option( 'wcfm_shop_manager_capability_options', array() );
            } elseif ( wcfm_is_staff() ) {
                $wcfm_capability_options = get_option( 'wcfm_shop_staff_capability_options', array() );
            } else {
                $wcfm_capability_options = array();
            }
        }
    
        $custom_type = ( isset( $wcfm_capability_options['custom_type'] ) ) ? $wcfm_capability_options['custom_type'] : 'no';
    
        if ( $custom_type == 'yes' && ! current_user_can( 'administrator' ) )
            unset( $product_types['custom_type'] );
        return $product_types;
    }
    
    add_filter( 'wcfm_product_types', '_allow_custom_product_types', 700 );
    
    function _products_manage_meta_save_offer_type( $new_product_id, $wcfm_products_manage_form_data ) {
        global $WCFM;
        if ( $wcfm_products_manage_form_data['product_type'] == 'custom_type' ) {
            update_post_meta( $new_product_id, 'offer_type_filter', esc_attr( $wcfm_products_manage_form_data['product_type'] ) );
        } else {
            
        }
    }
    
    add_action( 'after_wcfm_products_manage_meta_save', '_products_manage_meta_save_offer_type', 50, 2 );
    
    function custom_type_downloadable_support( $fields, $product_id, $product_type ) {
        if ( $product_type == 'custom_type' ) {
            $is_downloadable = ( get_post_meta( $product_id, '_downloadable', true ) == 'yes' ) ? 'enable' : '';
            $fields["is_downloadable"]['dfvalue'] = $is_downloadable;
        }
        return $fields;
    }
    
    add_filter( 'wcfm_product_manage_fields_general', 'custom_type_downloadable_support', 10, 3 );
    
    function custom_type_downloadable_tab_data( $fields, $product_id, $product_type ) {
        if ( $product_type == 'custom_type' ) {
            $is_downloadable = ( get_post_meta( $product_id, '_downloadable', true ) == 'yes' ) ? 'enable' : '';
            if ( $is_downloadable == 'enable' ) {
                $downloadable_files = (array) get_post_meta( $product_id, '_downloadable_files', true );
                $download_limit = ( -1 == get_post_meta( $product_id, '_download_limit', true ) ) ? '' : get_post_meta( $product_id, '_download_limit', true );
                $download_expiry = ( -1 == get_post_meta( $product_id, '_download_expiry', true ) ) ? '' : get_post_meta( $product_id, '_download_expiry', true );
            }
            $fields["downloadable_files"]['value'] = $downloadable_files;
            $fields["download_limit"]['value'] = $download_limit;
            $fields["download_expiry"]['value'] = $download_expiry;
        }
        return $fields;
    }
    
    add_filter( 'wcfm_product_fields_downloadable', 'custom_type_downloadable_tab_data', 10, 3 );

    Let me know how it goes.
    Thanks!

    in reply to: Cannot upload products – Error code #110690
    Sushobhan
    Keymaster

    Hello,
    This is the easiest way to check if the problem is coming from WCFM or not. Detecting and isolating the incompatible plugin is in step 2. This would hardly take a minute or two. Still, if you want, share me a temporary access of your site so that I can debug this for you. When sharing the access, please don’t forget to mark the reply as private.
    Thanks!

    in reply to: Registration – Individual person & Vendor Company #110689
    Sushobhan
    Keymaster

    Hi,
    You can change the vendor storefront slug http://………../shop/store/[your_store] to your preference from Settings >> Marketplace Settings, change the Vendor Store URL value to your desired one. Your current WordPress installation folder is named shop, so for now all the link in your site starts with http://………../shop/.
    Thanks!

    in reply to: Allow only one attribute for product #110260
    Sushobhan
    Keymaster

    Hello,
    Kindly use the following snippet-

    add_filter( 'wcfm_attribute_limit', function( $limit ) {
        return 1;
    } );

    Add this code to your child theme’s functions.php
    In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

    in reply to: Cannot upload products – Error code #110247
    Sushobhan
    Keymaster

    Hello,
    There seems to be a plugin or theme conflict. Kindly test this with all other plugins disabled except WooCommerce and WCFM plugins. If the problem persists try changing the theme as well.
    Thanks!

    in reply to: Mandatory Price #110238
    Sushobhan
    Keymaster

    Hello,
    Thanks for getting in touch. To make pricing fields mandatory, go to Settings page from Admin dashboard and click on Product Custom Validation. From there you can choose the fields which you want to make mandatory. Please note this feature is a part of our ultimate plugin.
    Thanks!

    in reply to: Downloadable not saving #110235
    Sushobhan
    Keymaster

    Hello,
    Replace your existing _allow_custom_product_types function with the following code snippet-

    function get_group_capablity( $userid = '' ) {
        if ( ! is_user_logged_in() ) return false;
        if ( ! $userid ) $userid = get_current_user_id();
        $wcfm_vendor_groups = get_user_meta( $userid, '_wcfm_vendor_group', true );
        if ( $wcfm_vendor_groups && is_array( $wcfm_vendor_groups ) && ! empty( array_filter( $wcfm_vendor_groups ) ) ) {
            $group_capability_options = array();
            foreach ( $wcfm_vendor_groups as $wcfm_vendor_group ) {
                if ( $wcfm_vendor_group ) {
                    $group_capability_options = array_merge( $group_capability_options, (array) get_post_meta( $wcfm_vendor_group, '_group_capability_options', true ) );
                }
            }
            return $group_capability_options;
        }
        return false;
    }
    
    function _allow_custom_product_types( $product_types ) {
        $wcfm_capability_options = get_group_capablity();
        if ( ! $wcfm_capability_options ) {
            if ( wcfm_is_vendor() ) {
                $wcfm_capability_options = get_option( 'wcfm_capability_options', array() );
            } elseif ( wcfm_is_manager() ) {
                $wcfm_capability_options = get_option( 'wcfm_shop_manager_capability_options', array() );
            } elseif ( wcfm_is_staff() ) {
                $wcfm_capability_options = get_option( 'wcfm_shop_staff_capability_options', array() );
            } else {
                $wcfm_capability_options = array();
            }
        }
    
        $custom_type = ( isset( $wcfm_capability_options['custom_type'] ) ) ? $wcfm_capability_options['custom_type'] : 'no';
    
        if ( $custom_type == 'yes' && ! current_user_can( 'administrator' ) )
            unset( $product_types['custom_type'] );
        return $product_types;
    }

    Thanks!

    in reply to: Registration – Individual person & Vendor Company #110225
    Sushobhan
    Keymaster
    This reply has been marked as private.
    in reply to: Remove the virtual and downloadable product check boxes #110220
    Sushobhan
    Keymaster

    Hi Claire,
    Yes, its a part of our Ultimate plugin. Sorry I forget to mention that earlier. But, if you want to only hide virtual and downloadable options, you won’t need the ultimate plugin, use the following snippet for that-

    function disable_virtual_downloadable_support( $general_fields ) {
        if ( isset( $general_fields['is_virtual'] ) )
            unset( $general_fields['is_virtual'] );
        if ( isset( $general_fields['is_downloadable'] ) )
            unset( $general_fields['is_downloadable'] );
        return $general_fields;
    }
    
    add_filter( 'wcfm_product_manage_fields_general', 'disable_virtual_downloadable_support' );

    Add this code to your child theme’s functions.php

    In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

    in reply to: Registration – Individual person & Vendor Company #110070
    Sushobhan
    Keymaster

    Hello,
    You need to use Loco translate to translate those fields. Here is the guide- https://localise.biz/wordpress/plugin/beginners
    Thanks!

    in reply to: Wild Cards for postal codes shipping zones #110067
    Sushobhan
    Keymaster

    Hello,
    We have plan for something like this. But as of now, there is none 🙁
    Thanks!

    in reply to: Downloadable not saving #109973
    Sushobhan
    Keymaster

    Hello,
    Please use the following snippet. Give special attention to ‘wcfm_capability_settings_fields_product_types’ filter and ‘_allow_custom_product_types’ function to see why your code was not working.

    function register_product_Custom_Type() {
    
        class WC_Product_Custom_Type extends WC_Product {
    
            public function __construct( $product ) {
                $this->product_type = 'custom_type';
                parent::__construct( $product );
            }
    
        }
    
    }
    add_action( 'init', 'register_product_Custom_Type' );
    
    function add_product_Custom_Type( $types ) {
        $types['custom_type'] = __( 'Custom Type', 'custom_product' );
    
        return $types;
    }
    add_filter( 'product_type_selector', 'add_product_Custom_Type' );
    add_filter( 'wcfm_product_types', 'add_product_Custom_Type', 50 );
    
    add_filter( 'wcfm_capability_settings_fields_product_types', function( $product_types, $handler, $wcfm_capability_options = array() ) {
        $custom_type = ( isset( $wcfm_capability_options['custom_type'] ) ) ? $wcfm_capability_options['custom_type'] : 'no';
        $product_types['custom_type'] = array( 'label' => __( 'Custom Type', 'wc-frontend-manager' ), 'name' => $handler . '[custom_type]', 'type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $custom_type );
        return $product_types;
    }, 60, 3 );
    
    function _allow_custom_product_types( $product_types ) {
        $wcfm_capability_options = array();
        if(wcfm_is_vendor()) {
            $wcfm_capability_options = get_option( 'wcfm_capability_options', array() );
        } elseif(wcfm_is_manager()) {
            $wcfm_capability_options = get_option( 'wcfm_shop_manager_capability_options', array() );
        } elseif(wcfm_is_staff()) {
            $wcfm_capability_options = get_option( 'wcfm_shop_staff_capability_options', array() );
        }
    
        $custom_type = ( isset( $wcfm_capability_options['custom_type'] ) ) ? $wcfm_capability_options['custom_type'] : 'no';
    
        if ( $custom_type == 'yes' && !current_user_can( 'administrator' ) )
            unset( $product_types['custom_type'] );
        return $product_types;
    }
    
    add_filter( 'wcfm_product_types', '_allow_custom_product_types', 700 );
    
    function _products_manage_meta_save_offer_type( $new_product_id, $wcfm_products_manage_form_data ) {
        global $WCFM;
        if ( $wcfm_products_manage_form_data['product_type'] == 'custom_type' ) {
            update_post_meta( $new_product_id, 'offer_type_filter', esc_attr( $wcfm_products_manage_form_data['product_type'] ) );
        } else {
            
        }
    }
    
    add_action( 'after_wcfm_products_manage_meta_save', '_products_manage_meta_save_offer_type', 50, 2 );
    
    function custom_type_downloadable_support( $fields, $product_id, $product_type ) {
        if ( $product_type == 'custom_type' ) {
            $is_downloadable = ( get_post_meta( $product_id, '_downloadable', true ) == 'yes' ) ? 'enable' : '';
            $fields["is_downloadable"]['dfvalue'] = $is_downloadable;
        }
        return $fields;
    }
    
    add_filter( 'wcfm_product_manage_fields_general', 'custom_type_downloadable_support', 10, 3 );
    
    function custom_type_downloadable_tab_data( $fields, $product_id, $product_type ) {
        if ( $product_type == 'custom_type' ) {
            $is_downloadable = ( get_post_meta( $product_id, '_downloadable', true ) == 'yes' ) ? 'enable' : '';
            if ( $is_downloadable == 'enable' ) {
                $downloadable_files = (array) get_post_meta( $product_id, '_downloadable_files', true );
                $download_limit = ( -1 == get_post_meta( $product_id, '_download_limit', true ) ) ? '' : get_post_meta( $product_id, '_download_limit', true );
                $download_expiry = ( -1 == get_post_meta( $product_id, '_download_expiry', true ) ) ? '' : get_post_meta( $product_id, '_download_expiry', true );
            }
            $fields["downloadable_files"]['value'] = $downloadable_files;
            $fields["download_limit"]['value'] = $download_limit;
            $fields["download_expiry"]['value'] = $download_expiry;
        }
        return $fields;
    }
    
    add_filter( 'wcfm_product_fields_downloadable', 'custom_type_downloadable_tab_data', 10, 3 );

    Thanks!

    in reply to: Registration – Individual person & Vendor Company #109969
    Sushobhan
    Keymaster

    Hi,
    Please use Membership Plan page as your registration page [ link- http://www.imnlimited.com/shop/vendor-membership/ ]. As, I can see, You are still using default registration page, that’s why you are not getting the plan selection step.
    In your membership settings page, you have chosen a different page for ‘Custom Plan Page’; deselect this value back to ‘–Select a page–‘ and checkout the default flow of registration.

    Thanks.

    in reply to: Registration – Individual person & Vendor Company #109964
    Sushobhan
    Keymaster

    Hello,
    Can you please send me your current membership settings page snapshot? Also send me a link of your site.
    Thanks!

    in reply to: Registration – Individual person & Vendor Company #109963
    Sushobhan
    Keymaster

    You can customize registration fields from Settings >> Vendor Registration page. You can make fields mandatory or add new custom registration fields from there.
    Thanks!

    in reply to: Registration – Individual person & Vendor Company #109954
    Sushobhan
    Keymaster

    Hello,
    I just confirm this flow in my last reply. If you are following my replies, then you must have set Subscription First Step value to Registration and use membership plan page as your registration page. So now, when anyone comes to this page for registration, first the registration form is opened. After they fill their details and go to the next step, there they will see the 3 membership plans to choose from.
    Is there anything in my answer that you didn’t get? Let me know!

    in reply to: Wild Cards for postal codes shipping zones #109916
    Sushobhan
    Keymaster

    Hello,
    We are in final phase of implementing this feature. Hopefully within this month you can expect this update.
    Thanks!

    in reply to: Approve products befor publishing #109908
    Sushobhan
    Keymaster

    Hello,
    There is a risk involved in this. For instance, what if vendors try to cheat the marketplace by continually drafting the products once is hits low or nil inventory stock and in that place publish other products. In that case, they will be able to sell more number of products than their allowed product limit.
    That’s why we keep it like this.
    Thanks!

    in reply to: Registration – Individual person & Vendor Company #109865
    Sushobhan
    Keymaster

    Hello,
    I guess you created different membership plans ‘Private’ and ‘Business’ for that purpose. Now when a person signup as a vendor, after they fill out registration fields then they will need to select the corresponding membership plan applicable for them.
    Do you want something else?
    Thanks!

    in reply to: Downloadable not saving #109852
    Sushobhan
    Keymaster

    Hello,
    Kindly provide me your code snippet to check. The variable $handler can be used to check for user type. For shop managers the value of $handler is ‘wcfm_shop_manager_capability_options’. So you can add a check on the value if you want to make these capability available for a particular user type.
    Thanks!

Viewing 25 posts - 776 through 800 (of 1,046 total)