TC Widget JS Searches & JS functions

 

 

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

 

*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