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

maps in vendor store page

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #193901
      matteor182
      Participant

      I need to insert a map in the vendor store under the description, I searched for a hook , but this link : https://multivendorx.com/knowledgebase/wcmp-hooks-filters/ is broken,

      can you help me ?

      i need a hook to be able to insert my code to generate a map with the address of the seller.

      Thank you very much

    • #193904
      matteor182
      Participant

      I found a hook mvx_additional_button_at_banner’ that I can use ,

      but at this point I would instead need to insert a custom field in the store information ,

      so that I can insert the iframe code of a map for each user

      how can I insert an ACF custom field in this point of the seller’s profile?

      Thank you very much

    • #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,

    • #193921
      matteor182
      Participant

      ok it seems to work correctly, I’ll do a couple more tests, in the meantime, thank you very much

    • #193941

      You are welcome. Please let us know if you need any further assistance.

    • #195633

      Its been a while and we have not heard back from you. We are closing this thread as of now. If you need help or face issue in future please open a new thread.

Viewing 5 reply threads
  • The topic ‘maps in vendor store page’ is closed to new replies.
Shopping Cart
Scroll to Top