- This topic has 5 replies, 3 voices, and was last updated 2 years, 7 months ago by
Sangita Support Squad.
-
AuthorPosts
-
-
June 29, 2023 at 2:59 PM #193901
matteor182
ParticipantI 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
-
June 29, 2023 at 4:16 PM #193904
matteor182
ParticipantI 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
-
June 29, 2023 at 6:52 PM #193910
MVX Support Ninja
KeymasterHi,
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,
-
June 29, 2023 at 9:35 PM #193921
matteor182
Participantok it seems to work correctly, I’ll do a couple more tests, in the meantime, thank you very much
-
June 30, 2023 at 10:36 AM #193941
Sangita Support Squad
KeymasterYou are welcome. Please let us know if you need any further assistance.
-
August 29, 2023 at 6:04 PM #195633
Sangita Support Squad
KeymasterIts 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.
-
-
AuthorPosts
- The topic ‘maps in vendor store page’ is closed to new replies.






