Claim your freedom to choose the perfect partner for your multi-vendor journey.

FREEDOM25

Celebrate the festive season by giving your marketplace a powerful lift!

FESTIVE20

5.0.0
Something big is coming for marketplace admins… MultiVendorX 5.0 is almost here. Are you ready?
Be the first to explore all the game-changing features!
Power your marketplace dreams with unbeatable Black Friday deals!

MVXBLACK30

Supercharge your marketplace vision with unstoppable Cyber Monday deals!

MVXCYBER30

Holiday cheer, bigger savings
Take 25% off-because your marketplace deserves a gift too.

happyholiday

Reply To: maps in vendor store page

#193910

Hi,
If you want add Advance Custom Fields in your storefront page then you need good amount of custom code to integrede the ACF plugin functionality.

Another way is add below code to your function.php of the current active theme to get the field.

add_action( 'mvx_after_shop_front', 'add_mvx_custom_fields');

function add_mvx_custom_fields() { 
    $vendor_id = get_current_vendor_id();
    $custom_value = get_user_meta( $vendor_id, '_mvx_custom_field_name', true ) ?get_user_meta( $vendor_id, '_mvx_custom_field_name', true ) : ''; 

    ?>
    <div class="panel panel-default pannel-outer-heading">
        <div class="panel-heading">
            <h3><?php _e('Custom Settings', '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"><?php _e('custom field', 'multivendorx'); ?></label>
                    <div class="col-md-6 col-sm-9">
                        <input class="form-control" type="text" placeholder="custom field" name="_mvx_custom_field_name" value="<?php echo $custom_value; ?>">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php 
}

add_action('mvx_before_vendor_dashboard', 'save_custom_fields');
function save_custom_fields(){
    global $MVX;
    $vendor_id = get_current_vendor_id();
    if ($_SERVER['REQUEST_METHOD'] == 'POST' && $MVX->endpoints->get_current_endpoint() == 'storefront') {
        if ($_POST['_mvx_custom_field_name']) {
            update_user_meta( $vendor_id, '_mvx_custom_field_name', wc_clean($_POST['_mvx_custom_field_name']) ); 
        }
    }
}

Regards,

Shopping Cart
Scroll to Top