Table of Contents |
---|
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.
Sample of adding search by VIN method
Code Block |
---|
widget.searchByVIN({ vin: '[VIN_code]', location_id: [somelocation] }); |
Full usage example might look like this
Code Block |
---|
<script> TCWidget.init({ apikey: '[your apikey]', container: 'tireconnect', }).then(function(widget) { widget.searchByVIN({ vin: '[VIN_code]', location_id: [somelocation] }) }); </script> |
Search methods
Note: Parameters highlighted bold - required.
Search by Aces
aces_id - Vehicle Aces ID
location_id - Dealer's location ID
Example
Code Block |
---|
widget.searchByVehicle({ aces_id: 268647, location_id: 15290 }); |
Search by Vehicle
year - Year of vehicle manufacture
...
location_id - Dealer's location ID
season_id - Tire season
Example
Code Block |
---|
widget.searchByVehicle({ year: '2017', make: 'Toyota', model: 'Highlander', trim: 'SE', car_tire_id: '168544', location_id: 12650, season_id: 'all' }); |
Staggered fitment Search
*kind of the search by Vehicle that using double CarTireID separated by ||
...
location_id - Dealer's location ID
season_id - Tire season
Example
Code Block |
---|
widget.searchByVehicle({ year: '2016', make: 'BMW', model: '228i xDrive', trim: 'Coupe', car_tire_id: '142318||142319', location_id: 15290, season_id: 'all' }); |
Search by Size
width - Tire width
height - Aspect ratio
...
speed_rating - Speed rating
Example
Code Block |
---|
widget.searchBySize({ width: 195, height: 65, rim: 15, location_id: 15290, season_id: 'all', load_index: '89', speed_rating: 'H' }); |
Search by Size Double
width - Tire width
f - Front tire width
...
location_id - Dealer's location ID
season_id - Tire season
Example
Code Block |
---|
widget.searchBySize({ width: {f: 195, r: 205}, height: {f: 65, r: 55}, rim: {f: 15, r: 16}, location_id: 15290, season_id: 'all' }); |
Search by Raw Size
size - Raw Size
location_id - Dealer's location ID
Example
Code Block |
---|
widget.searchByRawSize({ size: 1956515, location_id: 15290 }); |
Search by Part numbers
part_numbers - Array of part numbers
location_id - Dealer's location ID
Example
Code Block |
---|
widget.searchByPartNumbers({ part_numbers: ['9','90000003278','240','8501','15494650000','402542073','100A1524','1014241','78380','84671','72016','90000007446','38076'], location_id: 15290 }); |
Search by State & License Plate
state - State
license - Licence Plate
location_id - Dealer's location ID
Example
Code Block |
---|
widget.searchByLicense({ state: 'NH', license: '12345' location_id: 15290 }); |
Search by VIN
vin - Vin
location_id - Dealer's location ID
Example
Code Block |
---|
widget.searchByVIN({ vin: '1N4AZ1CPXJC309165', location_id: 15290 }); |
addCustomerInfo
Example
Code Block |
---|
widget.addCustomerInfo({ name: 'John Doe', phone: '4564564562', email: 'john@doe.com', zipPostalCode: 'L4S0B8', city: 'Richmond Hill', stateProvince: 'ON', addressLine1: '30 Via Renzo Drive', addressLine2: 'Suite 254', preferredTime: '2020-11-30 17:15', //15 min step wayToContact: 'phone', vehicle: { year: '2020', make: 'Honda', model: 'CR-V', trim: 'LX', carTireId: 162713, } }); |
addSupplierOrderInfo
editable: true/false (optional with true being default)
singleUse: true/false (optional with false being default)
Example
Code Block |
---|
widget.addSupplierOrderInfo({
poNumber: {
value: '111222333',
editable: false,
singleUse: false,
}
}); |