Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards

promita

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 37 total)
  • Author
    Posts
  • in reply to: how to show checkbox value from vendor dashboard #190316
    promita
    Moderator

    Hi l.gan, add this code in functions.php of your current active theme:

    
    add_action( 'mvx_after_shop_front', 'extra_delivery_express' );
    /*form for vendor dashboard set field*/
    function extra_delivery_express() {
        $vendor_id = get_current_vendor_id();
        $vendor_delivery_express = '';
        $vendor_delivery_express = get_user_meta($vendor_id, '_vendor_delivery_express', true) ? get_user_meta($vendor_id, '_vendor_delivery_express', true) : $vendor_delivery_express;
        $express_delivery_hour_vendor = '';
        $express_delivery_hour_vendor = get_user_meta($vendor_id, '_express_delivery_hour_vendor', true );
    
        ?>
    
        <div class="panel panel-default pannel-outer-heading">
        <div class="panel-heading d-flex">
        <h3><?php _e('Express', 'multivendorx'); ?></h3>
        </div>
        <div class="panel-body panel-content-padding form-horizontal">
        <div class="mvx_media_block">
    
        <div class="form-group">
        <label class="control-label col-sm-3 col-md-3" for="_vendor_delivery_express"></label>
        <div class="col-md-6 col-sm-9">
        <input type="hidden" name="_vendor_delivery_express" value="no">
        <input type="checkbox" id="myCheck" onclick="myFunction()" name="_vendor_delivery_express" value="yes" <?php echo ($vendor_delivery_express=='yes' ? 'checked' : '');?>>
        </div>
        </div>
    
        <div class="form-group" id="text" style="" >
        <label class="control-label col-sm-3 col-md-3"></label>
        <div class="col-md-6 col-sm-9">
        <select name="global_ex_hour_vendor" class="form-control" value="">
            <option selected value=""> — — </option>
    
            <?php if($express_delivery_hour_vendor){?>
            <option selected value="<?php echo $express_delivery_hour_vendor; ?>"><?php echo $express_delivery_hour_vendor; ?></option>
            <?php }
            ?>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="6">6</option>
        </select>
        </div>
        </div>
    
        </div>
        </div>
        </div>
    
        <script>
        function myFunction() {
            var checkBox = document.getElementById("myCheck");
            var text = document.getElementById("text");
            if (checkBox.checked == true){
            text.style.display = "block";
            text2.style.display = "block";
            } else {
            text.style.display = "none";
            text2.style.display = "none";
            }
        }
        </script>
    
    <?php
    }
    
    //save the field in database
    add_action('mvx_save_custom_store', 'save_field_delivery_express', 10, 1);
    function save_field_delivery_express($user_id){
        $vendor_delivery_express = $_POST['_vendor_delivery_express'];
        update_user_meta($user_id, '_vendor_delivery_express', $vendor_delivery_express);
        $express_delivery_hour_vendor = $_POST['global_ex_hour_vendor'];
        update_user_meta($user_id, '_express_delivery_hour_vendor', $express_delivery_hour_vendor);
    }
    
    //display the field
    add_action('woocommerce_single_product_summary', 'display_field_delivery_express', 25);
    function display_field_delivery_express (){
        $vendor = get_userdata(get_the_author_meta('ID'));
        $vendor_delivery_express_display = get_user_meta($vendor->id, '_vendor_delivery_express', true );
        $express_delivery_hour_vendor = get_user_meta($vendor->id, '_express_delivery_hour_vendor', true );
        if ( $vendor_delivery_express_display ) {
            if ( $vendor_delivery_express_display && $express_delivery_hour_vendor ) {
                echo '<div class="expressdelivery">express - ' . $express_delivery_hour_vendor .'</div>';
            } else {
                echo '';
            }
            echo '';
        }
    }
    
    Copy
    in reply to: Remove tabs from vendor shop page and customize #190190
    promita
    Moderator

    Hi mohsina.mce13, to remove those options you can add this code in functions.php of your current active theme :

    
    //remove my shop tab
    add_filter( 'mvx_vendor_dashboard_header_nav', 'remove_my_shop_tab', 10, 1 );
    function remove_my_shop_tab($header_nav) {
        unset($header_nav['shop-link']);
        return $header_nav;
    }
    
    //remove progress bar
    add_filter( 'mvx_vendor_dashboard_show_progress_bar', '__return_false' );
    
    Copy

    To change the dashboard color, Go to admin dashboard >> MultiVendorX >> Settings >> Seller dashboard , from here you can choose different color scheme for the vendor dashboard according to your choice https://prnt.sc/_2Lc32OTw6oV

    in reply to: How can one vendor sell several brands from 1 account? #190030
    promita
    Moderator

    Can you please explain this a bit more i.e. what are you referring as “Can you please tell me if you have examples with adding an attribute?”

    in reply to: WCMP to MVX #189177
    promita
    Moderator

    Hi @2ki, We fixed the issue in your site. Please check.

    promita
    Moderator

    Hi @Justin Harrison, Sorry for the inconvenience. Actually, there was an issue with the overriding instruction. I have added the proper folder structure in your site, please check the modification now.

    in reply to: WCMP to MVX #187413
    promita
    Moderator

    @2ki, In order to remove those types you can override the shopfront.php file in your current active theme and remove line no 32 and 33.

    in reply to: MapBox in checkout #180716
    promita
    Moderator

    Hi a.dalcamo, to remove the mapbox from checkout page add this code in the functions.php of your current active theme.

    
    add_filter( 'mvx_is_allow_checkout_user_location', '__return_false' );
    
    Copy
    in reply to: Emails not sending to Admin and User when order is created. #180130
    promita
    Moderator

    Hi Jacinta Thomas, we show the wholesaler price using woocommerce filter.
    so you need to use ‘woocommerce_get_price_html’ filter to add your checking. For reference you may see this link https://sarathlal.com/display-product-price-for-logged-in-users-only-woocommerce/

    promita
    Moderator

    Hi l.gan, Yes this is the correct code to display the field in the storefront.

    promita
    Moderator
    This reply has been marked as private.
    promita
    Moderator

    Hi l.gan, you saved the data in post meta but you need to save this in user meta. You also need to use ‘mvx_save_custom_store’ hook for this.

    promita
    Moderator

    @l.gan, can you please confirm exactly where do you want to display the extra field?

    I have checked the storefront page the custom field is there.
    So, please do explain what further modification are you looking for so we can assist you accordingly.

    promita
    Moderator

    Hi @l.gan, thanks for your access. I have added the code in your code-snippets.
    Here is the code that I have added already.

    
    //Add a bulk action to Orders bulk actions dropdown
    add_filter('mvx_bulk_actions_vendor_order_list', 'mvx_add_bulk_options_vendor_order_list', 10, 2);
    function mvx_add_bulk_options_vendor_order_list( $list, $vendor ) {
    	$add_bulk = array(
    		'mark_delivery'   => __( 'Change status to delivery', 'multivendorx' ),
    		);
    	return array_merge( $list, $add_bulk );
    }
    
    Copy
    promita
    Moderator

    Happy to help @i.gan

    promita
    Moderator
    This reply has been marked as private.
Viewing 15 posts - 16 through 30 (of 37 total)