Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › openstreetmaps.org instead of Google Maps
- This topic has 13 replies, 2 voices, and was last updated 5 years, 9 months ago by WCFM Forum.
- AuthorPosts
- January 29, 2019 at 7:15 am #45663ArnabGuest
Hi team, amazing plugin, great stuff! I am from India and as you may know Google is not accepting Indian debit cards and some Indian credit cards while generating Google Map API key. I am also using Geo my WP on my wordpress website and Geo my WP gives two options for Map providers , one is Google maps and the other one is Leaflet using the API of openstreetmaps.org which is opensource. But it seems to auto assign store location with product location and display store location WCFM needs Google Maps API key. My question is whether it possible to do this with Leaflet(openstreetmaps.org)?
- January 29, 2019 at 7:41 am #45665WCFM ForumMember
Hi,
Thanks for get in touch with us.
Well, WCFM only works with Google MAP right now.
And we are also from India. Please use this Map Key for now for testing – AIzaSyB2YeMKniOp8PvU2qPj99m7LTedKOEGYUM
Hope you are doing this a client project, so ask your client to generate Google Map Key with valid credit card.
Thank You
- February 4, 2019 at 8:53 pm #46629ArnabGuest
Great to hear that WCFM team is also from India. Actually i am doing this as a personal project. In the meanwhile I am communicating with the bank and trying to get a valid credit card and its taking some time. I have a few questions related to the Maps provider and the WCFM plugin and the ultimate version in general which i am hoping to get some clarifications.
1 : Actually the openstreetmaps works with the wcfm plugin as i have checked, in the Store Manager> Products> Add New> Location>… Under the location tab there is a field to enter Address and below it there is the openstreet Map . In the Address field i am not being able to search for a location in the map, but i can drag the blue marker in the map and set it to my desired location in the map and that automatically assigns the location to the product. Is there a workaround this by which i can manually enter an address in the search field which will automatically update the location in the map and assign the location to the product all using openstreetmaps.org(Leaflet).? Openstreetmaps works fine from the frontend , a user can easily search products by tracking his current location or typing a location manually in the Enter Address field of the Geo My WP plugin.
2 : Is there a way to auto assign vendor-store location to product location so that the vendor of the store doesn’t have to manually enter the address of each product individually?
3 : I really love the feature that allows a user to follow any store. How to add the store follow button in every vendor-store? Also, is there a shortcode to show the user a list of all the stores he/she has followed in his homepage, so that the user can easily access all his favorite stores.?
- February 5, 2019 at 5:11 am #46659WCFM ForumMember
Hi,
2 : Is there a way to auto assign vendor-store location to product location so that the vendor of the store doesn’t have to manually enter the address of each product individually?
*** If you are using GEO my WP then you already have this feature. If vendor already setup their store location from setting panel hence when he go to create a product, address auto-fill with store location. He also allowed to change those.
3 : I really love the feature that allows a user to follow any store. How to add the store follow button in every vendor-store? Also, is there a shortcode to show the user a list of all the stores he/she has followed in his homepage, so that the user can easily access all his favorite stores.?
*** No, there is no such short code, but a user may check his following store from My Account -> Following tab
Follow button automatically added under Store pages, you don’t have to do anything.
Between, Follower/following module comes with WCFM Ultimate, hope you have that!
Thank You
- February 6, 2019 at 8:06 am #46847ArnabGuest
Hi,
*** No, there is no such short code, but a user may check his following store from My Account -> Following tab
– I just want to make is easier for the users to access their favorite stores. Can i get a shortcode by custom coding and can you guys help me with the customization.
That would be really cool.Also, is there a way to search nearby stores using the Geo my WP plugin?
Thank you
- February 7, 2019 at 10:53 am #47002WCFM ForumMember
HI,
Using this query you will get list of following stores for an loggedin user –
$followings_query = "SELECT * FROM {$wpdb->prefix}wcfm_following_followers AS followings"; $followings_query .= " WHERE 1 = 1"; $followings_query .= " AND <code>follower_id</code> = " . get_current_user_id(); $followings_query .= " ORDER BY followings.<code>ID</code> DESC"; $wcfm_followings = $wpdb->get_results( $followings_query );
Now, using this you may do anything with Following stores.
Thank You
- February 15, 2019 at 2:27 pm #48419Arnab MukherjeeGuest
Thank you so much. I am new to wordpress i know a little bit of PHP, I can make small modifications if i get the exact instructions or steps to follow. Could you please tell me where can i insert this code snippet. I just want to show the users a section in their homepage where all the stores they have followed shall be listed. Or a direct link in the menu (not under My account ) from where they can see all their followed stores.
Thank You for your excellent support. - February 16, 2019 at 1:27 pm #48523WCFM ForumMember
Hi,
Pleas install this plugin – https://wordpress.org/plugins/code-snippets/
And add that code using this.For store list create a page using short code –
[wcfm_stores]
Now, add that page in your site’s menu.Thank You
- February 18, 2019 at 6:31 am #48706Arnab MukherjeeGuest
I installed and activated the Code snippet plugin and inserted the code that you gave me but it gave me the following error “Don’t Panic
The code snippet you are trying to save produced a fatal error on line 6:Uncaught Error: Call to a member function get_results() on null in X:\xampp\htdocs\Site.test\wp-content\plugins\code-snippets\php\admin-menus\class-edit-menu.php(187) : eval()’d code:6 Stack trace: #0 X:\xampp\htdocs\Site.test\wp-content\plugins\code-snippets\php\admin-menus\class-edit-menu.php(187): eval() #1 X:\xampp\htdocs\Site.test\wp-content\plugins\code-snippets\php\admin-menus\class-edit-menu.php(233): Code_Snippets_Edit_Menu->validate_code(Object(Code_Snippet)) #2 X:\xampp\htdocs\Site.test\wp-content\plugins\code-snippets\php\admin-menus\class-edit-menu.php(96): Code_Snippets_Edit_Menu->save_posted_snippet() #3 X:\xampp\htdocs\Site.test\wp-content\plugins\code-snippets\php\admin-menus\class-edit-menu.php(81): Code_Snippets_Edit_Menu->process_actions() #4 X:\xampp\htdocs\Site.test\wp-includes\class-wp-hook.php(286): Code_Snippets_Edit_Menu->load(”) #5 X:\xampp\htdocs\Site.test\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #6 X:\xampp\htdocs\Site.test\wp-includes\plugin.php(453)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.”
Am i doing something wrong? Please help .
Thank You - February 18, 2019 at 5:20 pm #48794WCFM ForumMember
Hi,
Which code? I gave a part of code.
Well, do you have defined this with the code?
global $wpdb;
Thank You
- February 18, 2019 at 6:56 pm #48833Arnab MukherjeeGuest
i inserted this query into the code snippet plugin :
$followings_query = “SELECT * FROM {$wpdb->prefix}wcfm_following_followers AS followings”;
$followings_query .= ” WHERE 1 = 1″;
$followings_query .= ” ANDfollower_id
= ” . get_current_user_id();
$followings_query .= ” ORDER BY followings.ID
DESC”;$wcfm_followings = $wpdb->get_results( $followings_query );
I am new to wordpress i have some experience with HTML/CSS/JS/PHP and programming in general. But i can follow instructions and make small changes in functions.php file etc. If you can give me a step by step guide in what i need to do to achieve this that would be very helpful. Thank You so much .
- February 19, 2019 at 6:40 am #48889WCFM ForumMember
HI,
Code is perfect, just have to define global variable first –
global $wpdb; $followings_query = "SELECT * FROM {$wpdb->prefix}wcfm_following_followers AS followings"; $followings_query .= " WHERE 1 = 1"; $followings_query .= " AND <code>follower_id</code> = " . get_current_user_id(); $followings_query .= " ORDER BY followings.<code>ID</code> DESC"; $wcfm_followings = $wpdb->get_results( $followings_query );
Thank You
- February 19, 2019 at 2:43 pm #49017Arnab MukherjeeGuest
Hi, i did that and added the shortcode to a page, it shows a list of all the stores. As i mentioned i only want to show the stores that a user has followed. Can you please tell me if this can be done. I want to show the users a list of all the stores that they have followed on their homepage or the menu so that the can get to it easily.
- February 19, 2019 at 2:53 pm #49023WCFM ForumMember
Hi,
What code you have written, show me that.
Thank You
- AuthorPosts
- The topic ‘openstreetmaps.org instead of Google Maps’ is closed to new replies.