Today we’ll be taking a look at WPSuperDealer and the locations tab on the settings page.
Here's a quick video to get you started.
You can find the locations tab by going to, dashboard, vehicles, settings.
Vehicle locations control all of the contact information for their vehicles.
They also give you the ability to hide prices and add a pack to all of the vehicle prices for that location
This makes it easy for a sales manager to bump all the prices by a set amount in one easy move or hide the prices for just their location, in anticipation of a sales event.
Make sure you fill out the location information as completely as possible.
This section allows you to enter a U.R.L to the different contact form pages you might be using.
You can dynamically enter vehicle data in the url by wrapping the lower case field name in curly brackets
Make sure you replace any spaces with underscores
For example, to add stock number to the end of the U.R.L you would write
When the url is printed on the page it will replace the tag with the value from the vehicle.
This gives you the ability to pass information from the vehicle directly to your forms.
If you have more than one location then you can add a second location by clicking the add location button and entering a name, for the location.
You should now see both locations in a table.
If you have more than one location, then when adding, or editing your vehicles, you just need to select the location, then save your vehicle.
If you only have a single default location, then you don’t need to add it to your vehicle, WPSuperDealer will associate the default location with any vehicle that doesn’t specifically have one
When editing a vehicle it’s possible to create a new location by just typing in a new name
You can then go back to your settings, after editing the vehicle, and fill in the location details
If you would like to prevent users from creating new locations when editing vehicles then you need to go to the vehicle options tab
Then click on location in the global specifications
Toggle restrict options to on
Now click save
If we go back to the vehicle edit page we can now see the field has become a dropdown and users can no longer create location from the vehicle edit screen
This concludes a basic look at the vehicle locations tab
For those who are interested, we’ll be continuing with a deeper, more technical, look at locations
So how are vehicle locations stored?
Well, Vehicle locations are a taxonomy, which is kind of like, a fancy way of saying a type of category
If you go to the vehicle options tab, you’ll see location is listed as one of the global specifications
Clicking on it will open a small form that gives us a little more control
We can disable the global field
This doesn’t keep the default location from working
But it does hide the location field on the vehicle edit page
You also have the restrict options toggle that we looked at earlier
Then there’s another toggle that says, show taxonomy u.i
Let’s toggle that on
Then we can save our settings, and if we look in the admin menu under vehicles, we’ll see locations is now listed
We’ll go ahead and click so you can see it
This is just your standard WordPress taxonomy management page
If you’re not familiar with it, then it’s probably best to keep it hidden
For those who are interested in the, under the hood code stuff, you’ll want to know that the location is also stored in a post meta field.
That means a vehicle stores the location, and other global taxonomy fields, as both a term for the taxonomy and as a post meta field
This allows us to leverage the smooth search of meta fields, while still being able to take advantage of the taxonomies for grouping and categorizing vehicles
Weird, but true
That’s going to bring us to an end of our discussion today