Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › How to change the default search radius? (google map)
- This topic has 19 replies, 6 voices, and was last updated 4 years, 6 months ago by Sarmistha Chakraborty.
- AuthorPosts
- August 28, 2019 at 11:18 am #78739id.manageParticipant
Hi Guys,
May I ask you how can I change the range of the search radius? Current one is 0 to 100km. May I change it from 0 to 5 miles?
Thanks!
- August 30, 2019 at 6:58 am #79154WCFM ForumMember
Hi,
Right now, this only support distance in “KM”, not in “Miles”.
If you want to set some different range in KM, that will be possible.
Thank You
- August 30, 2019 at 9:15 am #79206id.manageParticipant
Thank you, Please can you tell me how to changer the range in KM? Thanks
- September 2, 2019 at 6:33 am #79549WCFM ForumMember
HI,
Please keep add this code to your site –
add_filter( 'wcfmmp_radius_filter_max_distance', function( $distance ) { return 500; });
Well, this will work after WCFM Marketplace next update.
Thank You
- September 3, 2019 at 11:14 am #79782id.manageParticipant
Hi Thank you.
May I ask you when is the next update? And where shall I add this code to? The function sheet?
- September 4, 2019 at 8:56 am #79965WCFM ForumMember
Hi,
Well, this update is already there, WCFM Marketplace 3.1.10
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- September 4, 2019 at 11:42 am #80010id.manageParticipant
Thank you!
- September 4, 2019 at 12:12 pm #80022WCFM ForumMember
Welcome 🙂
- September 26, 2019 at 3:01 pm #83762Bernard OmolafeParticipant
In the UK we use miles. It would be great to have that.
- September 27, 2019 at 1:22 pm #83969WCFM ForumMember
Will add that option.
- September 27, 2019 at 4:48 pm #84036Bernard OmolafeParticipant
Excellent thanks!!!
- November 13, 2019 at 4:16 pm #92159villanidomenicoParticipant
Hi try add the code with snipped but it not works or i don’t now wher it show for change the radius 0 to 5 Km
- November 22, 2019 at 10:58 am #93391WCFM ForumMember
Well, we have already added this as setting option at WCFM Admin Setting -> GEO Location – https://ibb.co/8XpDDvx
No more custom code require for the purpose.
Thank You
- April 30, 2020 at 3:26 pm #125024justboloindiaParticipant
Hi
By default the search redious bar is at 2km. Want to set it till maximum range set on store manager. How to do that.- April 30, 2020 at 7:05 pm #125095Sarmistha ChakrabortyMember
Hello,
For this you need to adjust “Maximum Radius to Search” (From WCFM-dashboard->Settings->Geo Location) and Radius start distance –
add_filter('wcfmmp_radius_filter_start_distance',function($start_distance){ return 20; });
Example – If you set Maximum Radius to Search -100
Radius start distance – 20
Then “radius range” value will be 100/20 = 5Hope you understand.
Thanks.
Attachments:
You must be logged in to view attached files.
- May 1, 2020 at 8:29 pm #125464justboloindiaParticipant
Hi,
My maximum search redious is 10, I want the default to 10 also. So, I have added following to my functions.phpadd_filter(‘wcfmmp_radius_filter_start_distance’,function($start_distance){
return 1;
});But it’s not working. Please suggest.
- May 1, 2020 at 8:58 pm #125471Sarmistha ChakrabortyMember
Hello,
Please check you have saved the “Maximum Radius to Search” settings 10km.(PFA) and added below code in your activated theme’s functions.php.
add_filter('wcfmmp_radius_filter_start_distance',function($start_distance){ return 1; });
And please confirm whether you are able to see this picture2.png n front-end or not?
Thanks.
Attachments:
You must be logged in to view attached files.
- May 1, 2020 at 10:11 pm #125510justboloindiaParticipant
Hi,
Yes I can see that. The code is worked like gem. Good work. Keep it up guys. - May 2, 2020 at 2:51 pm #125676justboloindiaParticipant
Hi,
The map on shop page is taking much space. So, we want to remove the product image from shop pages. Can you please guide us regarding the same?- May 3, 2020 at 12:39 pm #125944Sarmistha ChakrabortyMember
Hello,
Try this below code in your activated theme’s functions.php.
function remove_woocommerce_actions() { add_action( 'woocommerce_before_shop_loop_item_title', 'wcfm_removewoocommerce_template_loop_product_thumbnail', 9 ); } add_action( 'init', 'remove_woocommerce_actions' ); function wcfm_removewoocommerce_template_loop_product_thumbnail(){ if ( function_exists( 'wcfm_is_store_page' ) && !wcfm_is_store_page()) { remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); } }
Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.