TC Widget JS Searches & JS functions
Â
- 1 Tire Widget Demo
- 2 Wheel Widget Demo
- 3 Usage
- 4 Â Tire Widget
- 4.1 Search methods
- 4.1.1 Adding filters & options
- 4.1.1.1 Example
- 4.1.1.2 Example
- 4.1.1.3 Full usage of filters and options example might look like this
- 4.1.2 Search by Aces
- 4.1.2.1 Example
- 4.1.3 Search by Vehicle
- 4.1.3.1 Example
- 4.1.4 Staggered fitment Search
- 4.1.4.1 Example
- 4.1.5 Search by Size
- 4.1.5.1 Example
- 4.1.6 Search by Size Double
- 4.1.6.1 Example
- 4.1.7 Search by Raw Size
- 4.1.7.1 Example
- 4.1.8 Search by Part numbers
- 4.1.8.1 Example
- 4.1.9 Search by State & License Plate
- 4.1.9.1 Example
- 4.1.10 Search by VIN
- 4.1.10.1 Example
- 4.1.1 Adding filters & options
- 4.2 JS Functions
- 4.2.1 addCustomerInfo
- 4.2.1.1 Example
- 4.2.2 addSupplierOrderInfo
- 4.2.2.1 Example
- 4.2.1 addCustomerInfo
- 4.1 Search methods
- 5 Wheel Widget
- 5.1 Search methods
- 5.1.1 Full usage example might look like this
- 5.1.2 Adding filters & options
- 5.1.2.1 Example
- 5.1.2.2 Example
- 5.1.2.3 Full usage of filters and options example might look like this
- 5.1.3 Search by Vehicle
- 5.1.3.1 Example
- 5.1 Search methods
Â
Tire Widget Demo
Wheel Widget Demo
Usage
Function of the widget should be called when passing search method and parameters of the search. Method can be called just after the .init method. User is able to add several search methods and use them as he needs.
Each method accepts only one argument. It’s an object with search params. Search params look the same as in a url. After calling a method Widget performs the search according to the passed search parameters.
Â
Â
 Tire Widget
Â
Search methods
Note: Parameters highlighted bold - required.
Â
Adding filters & options
You can add filters to any of search methods.
Full list of filters:
brand
load_index
speed_rating
price
run_flat
light_truck
category
season_id
offers
Example
filters: {
brand: ['Bridgestone', 'Firestone', 'Fuzion'],
load_index: [91, 89],
speed_rating: ['H', 'V', 'W', 'S'],
price: {
from: 100,
to: 160
}
}
Â
Also, you can add search options to any of search methods.
Full list of options:
defaultSelectedQty - provide default selected Qty
minQtyInResults - provide minimum searched Qty
autoRedirectToSummary - flag, which will say widget to go to summary page if results have only 1 item
Example
{
defaultSelectedQty: 4,
minQtyInResults: 4,
autoRedirectToSummary: true
}
Full usage of filters and options example might look like this
<script>
TCWidget.init({
apikey: '[your apikey]',
container: 'tireconnect',
}).then(function(widget) {
widget.searchByVIN({
vin: '[VIN_code]',
location_id: [somelocation],
filters: {
brand: ['Bridgestone', 'Firestone', 'Fuzion'],
load_index: [91, 89],
speed_rating: ['H', 'V', 'W', 'S'],
price: {
from: 100,
to: 160
},
run_flat: 1,
light_truck: 1,
category: 10,
season_id: 1,
offers: 293
},
{
defaultSelectedQty: 4,
minQtyInResults: 4,
autoRedirectToSummary: true
}
})
});
</script>
Â
Search by Aces
aces_id - Vehicle Aces ID
location_id - Dealer's location ID
Example
Search by Vehicle
year - Year of vehicle manufacture
make - Make of vehicle
model - Model of vehicle
trim - Trim of vehicle
car_tire_id - Vehicle tire size (optional if just one for this trim)
location_id - Dealer's location ID
season_id - Tire season
Example
Â
Staggered fitment Search
*kind of the search by Vehicle that using double CarTireID separated by ||
year - Year of vehicle manufacture
make - Make of vehicle
model - Model of vehicle
trim - Trim of vehicle
car_tire_id - Vehicle tire size
location_id - Dealer's location ID
season_id - Tire season
Example
Â
Search by Size
width - Tire width
height - Aspect ratio
rim - Rim diameter
location_id - Dealer's location ID
season_id - Tire season
load_index - Load index
speed_rating - Speed rating
Example
Â
Search by Size Double
width - Tire width
f - Front tire width
r - Rear tire width
height - Aspect ratio
f - Front tire aspect ratio
r - Rear tire aspect ratio
rim - Rim diameter
f - Front tire rim diameter
r - Rear tire rim diameter
location_id - Dealer's location ID
season_id - Tire season
Example
Â
Search by Raw Size
size - Raw Size
location_id - Dealer's location ID
Example
Â
Search by Part numbers
part_numbers - Array of part numbers
location_id - Dealer's location ID
Example
Â
Search by State & License Plate
state - State
license -Â Licence Plate
location_id - Dealer's location ID
Example
Â
Search by VIN
vin - Vin
location_id - Dealer's location ID
Example
Â
JS Functions
Â
addCustomerInfo
Example
Â
addSupplierOrderInfo
editable: true/false (optional with true being default)
singleUse: true/false (optional with false being default)
Example
Â
Â
Wheel Widget
Search methods
Note: Parameters highlighted bold - required.
Full usage example might look like this
Â
Adding filters & options
You can add filters to any of search methods.
Full list of filters:
brandName
boreMax
color
width
price
Example
Â
Also you can add search options.
Full list of options:
autoRedirectToSummary - flag, which will say widget to go to summary page if results have only 1 item
Example
Full usage of filters and options example might look like this
Â
Search by Vehicle
year - Year of vehicle manufacture
make - Make of vehicle
model - Model of vehicle
trim - Trim of vehicle
bodyType - Vehicle body type
subModel - Vehicle submodel
option - Vehicle submodel option
diameter - Vehicle’s wheel diameter
location_id - Dealer's location ID
Example
Â
Â