...
Code Block |
---|
{
"tires": [
{
"id": "TWlsZXN0YXJ8fDI0NDYwMDIxfHxjb21tdW5pdHl3aG9sZXNhbGV0aXJlfHwyMjU5Mnx8Qg==",
"brand": "Milestar",
"model": "MS932 Sport",
"part_number": "24460021",
"price": 59.96,
"tax": 2.4,
"quantity": 153,
"image": "https://wl.tireconnect.ca/uploads/tires/pre_up/1/Milestar/images/ms_ms932_l.jpg",
"supplier": "communitywholesaletire",
"speed_rating": "V",
"load_index": 91,
"size": "205/55R16 91V",
"size_w": 205,
"size_h": 55,
"size_r": 16,
"selected_quantity": 4,
"cost": 41.97
}
],
"services": [
{
"key": "tire_protection_plan",
"name": "Tire Protection Plan",
"total_price": 10,
"total_tax": 0.4
},
{
"key": "wheel_alignment",
"name": "Wheel Alignment",
"total_price": 23.98,
"total_tax": 0.96
},
{
"key": "nitrogen_fill",
"name": "Nitrogen Fill",
"total_price": 100,
"total_tax": 4
},
{
"key": "disposal_fee",
"name": "Tire Recycling Fee",
"total_price": 10,
"total_tax": 0
},
{
"key": "supply_fee",
"name": "Shop Supply Fee",
"total_price": 50,
"total_tax": 0
},
{
"key": "seasonal_tire_storage",
"name": "Seasonal Tire Storage",
"total_price": 24,
"total_tax": 0.96
},
{
"key": "valve_stem_tpms",
"name": "Valve Stem or TPMS Part Kit",
"total_price": 100,
"total_tax": 4
}
],
"vehicle": {
"year": "2020",
"make": "Alfa Romeo",
"model": "4C",
"trim": "Spider",
"car_tire_id": "163508||163509"
}
}
|
|
Supplier order summary for parsing
JSON quote summary is generated in hidden DIV with id “tcwlw_pos_supplier_order_submitted” on results or summary page.
...
There are two conditions required for successful quote data extraction:
DIV with this id is detected, you can extract the content of the quote from the JSON formatted quote summary.
supplier_order_submitted=1 - READY URL parameter is equal 1
URL Examples (PIN for both 555555)
Results page:
...
Option 2 - By listening to widget events
This method can be used both with direct embedding of the TC module on the page, as well as an iframe based integration. The difference would be that when iframe is used, a container page needs to be created. This page will actually contain the widget and the event listener. The event listener function will need to pass the data captured in the event to the parent page.
Documentation
TC Widget Callback
Example
https://tutorials.tireconnect.ca/pos/05198c64d142efd851ef15e54fdd917d#/!results?size=2055516&location_id=12674&order_by=best_match&display=full&page=1
Summary page:
https://devapp.tireconnect.ca/pos/05198c64d142efd851ef15e54fdd917d#/!summary?_demo/pos_container.html
Supplier order summary for parsing
JSON quote summary is generated in hidden DIV with id “tcwlw_pos_supplier_order_submitted” on results or summary page.
Quote data extraction:
There are two conditions required for successful quote data extraction:
DIV with this id is detected, you can extract the content of the quote from the JSON formatted quote summary.
supplier_order_submitted=1 - READY URL parameter is equal 1
URL Examples (PIN for both 555555)
Results page:
https://devapp.tireconnect.ca/pos/05198c64d142efd851ef15e54fdd917d#/!results?size=2055516&location_id=12674&optionalorder_servicesby=use_best_match&display=full&page=1
Summary page:
https://devapp.tireconnect.ca/pos/05198c64d142efd851ef15e54fdd917d#/!summary?location_id=12674&optional_services=use_default&quantities%5B0%5D=4&tire_ids%5B0%5D=SGFua29va3x8MTAxNDM1OHx8a218fDEyNjc0fHxC
...
Code Block |
---|
{
"branches_status": [
{
"branch_name": "common",
"status": "success",
"invoice": "999999999"
}
],
"order_info": {
"cost": 43,
"quantity": 1,
"total_cost": 43,
"shipping_cost": null,
"total_order": 43
},
"supplier_order_fields": {
"delivery_method": "Deliver",
"po_number": "Test PO"
},
"supplier": {
"name": "KM",
"nice_name": "K&M"
},
"tire": {
"brand": "Thunderer",
"model": "Mach II R301",
"part_number": "TH0090",
"size_h": 55,
"size_r": 16,
"size_w": 205,
"size": "205/55R16 91V",
"image": "https://dev.tireconnect.ca/uploads/tires/pre_up/Thunderer/images/th_mach_ii_r301_l.jpg",
"category": "Performance",
"season": "All Season"
}
}
|
|
Option 2 - By listening to widget events
This method can be used both with direct embedding of the TC module on the page, as well as an iframe based integration. The difference would be that when iframe is used, a container page needs to be created. This page will actually contain the widget and the event listener. The event listener function will need to pass the data captured in the event to the parent page.
Documentation
TC Widget Callback
Example
...
...
...
uploads/tires/pre_up/Thunderer/images/th_mach_ii_r301_l.jpg",
"category": "Performance",
"season": "All Season"
}
}
|
|