Forum Replies Created
-
AuthorPosts
-
promitaModerator
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 ''; } }
CopypromitaModeratorHi 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' );
CopyTo 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
March 29, 2023 at 9:49 AM in reply to: How can one vendor sell several brands from 1 account? #190030promitaModeratorCan 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?”
March 6, 2023 at 6:03 PM in reply to: Overriding Templates for the Marketplace Membership Module Does Not Work #187524promitaModeratorHi @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.
promitaModerator@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.
promitaModeratorHi 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' );
CopyFebruary 9, 2023 at 6:00 PM in reply to: Emails not sending to Admin and User when order is created. #180130promitaModeratorHi 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/February 7, 2023 at 5:47 PM in reply to: Vendor cannot change order status + High-Performance Order Storage compatibility #168433promitaModeratorHi l.gan, Yes this is the correct code to display the field in the storefront.
February 3, 2023 at 6:34 PM in reply to: Vendor cannot change order status + High-Performance Order Storage compatibility #150094promitaModeratorThis reply has been marked as private.January 28, 2023 at 3:51 PM in reply to: Vendor cannot change order status + High-Performance Order Storage compatibility #149882promitaModeratorHi 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.
January 25, 2023 at 3:03 PM in reply to: Vendor cannot change order status + High-Performance Order Storage compatibility #149734promitaModerator@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.December 28, 2022 at 6:35 PM in reply to: Vendor cannot change order status + High-Performance Order Storage compatibility #148593promitaModeratorHi @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 ); }
CopyDecember 10, 2022 at 5:31 PM in reply to: The prohibition of deleting and editing the name and url of the product. #147655promitaModeratorHappy to help @i.gan
December 8, 2022 at 8:31 PM in reply to: The prohibition of deleting and editing the name and url of the product. #147520promitaModeratorThis reply has been marked as private. -
AuthorPosts