nopcommerce-How to get customer and verdor geolocations? - nopcommerce

I want to track customer location and vendor locations. E.g: I am customer and i need service from vendors which are in 10km range of my location. For this functionality i need to track customer location and vendor location and then find all venders which are in 10km range.
Does nopcommerce is having any plugins for this functionality or we need to customize current functionality. If we need to customize then please help me how to achieve this functionality.

You're at wrong place if you're asking for third party plugin, that is off topic here. If you're asking for customization, here to go:
1). Integrate Google map with registration page, user have to select location by search or draggable marker.
2). Save lat/long to the DB (add custom field or use plugin table).
3). Query by current user location and get all lat/long(range of 10km) from database and show it to the map.
Bonus: you can refer nopCommerce pickup point code, they have used Geo-Location service over there
Hope this helps!

Related

How to create a client portal using WordPress, Elementor pro?

I need to create a client portal which let my clients to see their order status and other progress. We don't sell them online just need to let my customers to see updates in their dashboard and let them to download their invoices and other stuff. I need to add orders and order updates by my staff. so I can't use woocommerce. Please help tell me how to do this.
[what i am about to say is kind of a hack but...] Since what you want is not automation and you have to update every invoice manually, I think you could use acf to create a WYSIWYG field and then create a table inside it (make field condition "User->Add/Edit". Then you can update the field for each user. But keep in mind that because this field is on /profile.php you have to block users from accessing wp-admin.
To show the table in front-end you could use some plugins. Or you could use PHP (if you know how to).
I dont know if there is any plugin for creating invoices but I think you could also use them.

wordpress - how let users add location on a map?

I'm using Wordpress to build my website, i want to add a form that will have: name, description, image and location on a map. that is letting the users add their own marker on a map.
and by pressing 'submit' the whole data (name, description, image, longitude, latitude) would be saved to a database.
how can i do that? which plugins should i use?
You could use Google Placemarks and give them access to the creation of the 'Placemarks' custom post type that plugin utilises. You might have to hack the featured image..
Alternatively, you're looking at full custom post type creation and google maps API integration, a custom loop that utilises of the featured image.
Plugin that comes closest to what you need is what SMacFadyen suggested - BGMP. But if you want to do that yourself you would need to look into this:
Google Maps JavaScript API
WordPress Custom Post Types
WordPress Meta Boxes
For the first one there is lots of tutorials on how to display map and InfoWindows so you shouldn't have much problem with that. For Custom Post Types there is an awesome generator which should do 99% of your work. For Meta Boxes you can go several ways:
plugin - easiest but you would depend on a plugin which I don't like very much
from scratch - tutorial - which is a lot better than plugin but requires a lot of work
one of the meta box libraries - this is the way I usually go - I'm developing my own but it's not ready yet so in the mean time I would recommend My-Meta-Box or Reusable Custom WordPress Meta Boxes
Several times, when searching how to make this work, I stumbled upon this thread. Every time, I wasn't really happy with the way existing plugins deal with this. So, I now put this together myself.
Here's an overview of my solution.
Use the plugin Custom Post Type UI to create a custom post type for the markers on the map.
Use the plugin Advanced Custom Fields to add a field to this custom post type which represents the location. The field type is of type 'Google Map'.
Copy the standard Google Maps API clustering example to the appropriate theme file in your theme.
For showing your markers, generate the list of locations by, in your theme file, requesting the posts of your newly created custom post type.
For each marker/location, pick up the 'Google Map' field and abstract the latitude and longitude.
For each marker/location, construct the appropriate array element for the array with all locations, with, at least, the latitude and the longitude, and probably also the contents of an infowindow.
This should give you a map with all locations plotted out.
To allow users to add locations:
Add a listener to your map that listens for clicks and returns the location clicked. Perhaps this listener is only running after the user has expressed his intent to add a location to the map.
When the user has clicked, open a form, for example in a modal. The form should contain hidden fields with the latitude and longitude and could, for example, also contain a static image of the relevant location. Other form fields would be the fields you need for your purpose.
Submit the form using AJAX. Refer, for example, to this tutorial. In your theme's functions.php, you can then validate the submission and add the new submission to your Wordpress database, matching your new custom post type.
Depending on how you store your new location, on your next map reload, the new location will be included. (Or you perhaps need to authorise the new location, first.)
You can also reload all locations through AJAX.
Profile Builder allows you to do just that. Create a front-end register form including the required custom fields and a map field for users to pin or enter their location.
Then using the built-in User Listing (Member Directory) module, you can display a map of all users locations.

embed google maps with search and locator functionality in drupal 7..?

I Want to to create a page in my drupal 7 site with a google map on it, which shows hospitals, clinics and pharmacies near the user.
I tried, location module and openLayerslocator. But I couldn't figure how to achieve it using these modules. Initially I came to know that, I can use to openLayers locator, but there is no documentation or guide that's available to achieve it.
But as far as I understand, both modules work in a similar way but NOT as I want it to. In both module, I will have a content type called 'Location' and it will as for address,zip code etc while creating the content with that type. Then there will be a view, which takes these address from those 'Location' noddes and displays those addresses on a google map..! But THAT'S NOT WHAT I WANT.
I do not want user to create any content or anything, the map sits there as a page where user visits it, to see what are the hospitals etc are there around him. When user navigates to that page, he will just enter his city, address or zipcode (like in a form and hits find) to see what are the hospitals around him (let's say around a distance of 50km). By default, when he navigates to the page, the map should be showing those places like hospitals and clinics around his default address (It will be available from the database.).
So how can I achieve it...??
Thanks in advance.

Wordpress or Drupal: Plugin for sub threads

I'm looking for a wordpress OR drupal plugin with which the users of my site can create a sub discussion to an article by themselves and invite other users to join. This subdiscussion should be invisible to not invited Users. Is there anything similar? Or could I do this some other way?
I didn't decide for wordpress or drupal by now, so which ever cms can do this will be it.
Thanks for your answers!
I don't know of such a module for Drupal but if you'll go for the custom module route here's some pointers to how it could be implemented:
Create a content type called Subarticle, enable comments and add a Node reference field to it. Allow your users to create nodes of that type.
For the widget of the node reference, use the Node Reference URL Widget module which will create a link on each Article, something like Create a Subarticle, automatically making the new subarticle point to the article.
For display, views could be used with a node argument on the node reference field.
For invites and visibility, check out Organic Groups. When a new subarticle is saved you'll have to programmatically create a new organic group, make the current user the owner and add the subarticle to that group. With an organic group he can then invite users.
You could use Vanilla, that can be easily integrated wtih Drupal or Wordpress (or anything). Check out this podcast to see how easy it is to plug into WP. There are plugins for Vanilla that provide the private thread functionality you are looking for.

How can I set the user selected value of an exposed location Views filter for the entire Drupal 6 website?

I am currently working on a website which lists the businesses as per either their location or the category to which it belongs. Check: http://frugalmillionaire.net/
Existing Functionality implemented (Views, CCK and Taxonomy):
On clicking the Primary Menu Links the Business Category are passed as an argument to the View. Hence the view displays the business listings of the specific category only. Also to implement the Find Local Coupons Block ; a filter of the same view is exposed in a block.
My client wants to give the user the option to set his/her location on the website . Once the user sets that location then upon clicking the links in the primary menu (Restaurant) should list only the restaurants which are of the location set. Similarly clicking on any of the primary menu links should display of the businesses of the location set only.
Potential ways to do it :
1)Set the value selected by the user in the exposed filter. How can this be done?
2) Using Cookies. Can I use the Drupal Cookie to somehow achieve this?
Kindly help me out .
Any help/pointers/relevant links would be deeply appreciated.
Thanks
I think you are asking three different things.
1. How do you get location information from the current user and store it?
If the user is setting and forgetting their location, make a Profile Field. The Location module might be of help. If the user just types in a location for temporary usage, save it to their session.
2. How do you theme a site based on the user's location?
hook_menu_alter() can be used to change what your primary links are doing based on user data.
3. How do you preload the business Views based on this location?
Invoke the View programmatically,
where location information (when
available) is inserted in place of
the exposed filters. Useful Views Documentation.
Set the relevant information in your
View with Arguments. Set the default
to the user's location. Because you are relying on a dynamic default, you never need to send a "real" argument to the view.

Resources