Skip to content

Commit 7d9670b

Browse files
authored
Merge pull request #12 from findologic/FINDO-8654_include_variant_details_in_json_response
FINDO-8654_include_variant_details_in_json_response
2 parents 99803d5 + 22258dd commit 7d9670b

File tree

3 files changed

+354
-116
lines changed

3 files changed

+354
-116
lines changed

example/responseWithVariants.json

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"request": {
3+
"query": "Blubergurken",
4+
"first": 0,
5+
"count": 24,
6+
"serviceId": "F53ABAB42D7931BE13532AFCA1A95CCE",
7+
"usergroup": "foo",
8+
"userId": "cd7984ec-e0c5-4bfb-a925-d607668153cd",
9+
"order": {
10+
"field": "salesfrequency",
11+
"relevanceBased": true,
12+
"direction": "DESC"
13+
}
14+
},
15+
"result": {
16+
"metadata": {
17+
"effectiveQuery": "Blubbergurken",
18+
"totalResults": 1337,
19+
"requestId": "9cd42225-90d0-4858-bcb6-b05f33d8ec5e",
20+
"searchConcept": "Seeds",
21+
"currencySymbol": "",
22+
"landingpage": {
23+
"name": "New arrivals",
24+
"url": "https://example.org/new_stuff.html"
25+
},
26+
"promotion": {
27+
"name": "Blubbergurken Brand",
28+
"url": "https://example.org/top_brands/Blubbergurken_International_Inc.html",
29+
"imageUrl": "https://example.org/top_brands/blubbergurken_international.png"
30+
}
31+
},
32+
"variant": {
33+
"name": "sdym",
34+
"correctedQuery": "Blubbergurken"
35+
},
36+
"items": [
37+
{
38+
"id": "123ab",
39+
"url": "https://example.org/product.html",
40+
"imageUrl": "https://example.org/product.png",
41+
"name": "Blubbergurken Seeds",
42+
"highlightedName": "<span class=\"flEmphasis\">Blubbergurken</span> Seeds",
43+
"price": 13.37,
44+
"ordernumbers": ["0012BLUB-42"],
45+
"matchingOrdernumber": "34567",
46+
"score": 4.667,
47+
"summary": "These are some very nice seeds.",
48+
"properties": {
49+
"overriddenPrice": "15.00",
50+
"taxRate": "20"
51+
},
52+
"productPlacement": "Seeds spring 2020",
53+
"pushRules": [
54+
"Seeds",
55+
"Cucumbers"
56+
],
57+
"attributes": {
58+
"cat": [
59+
"Gardening"
60+
],
61+
"vendor": [
62+
"Blubbergurken International Inc."
63+
]
64+
},
65+
"variants": [
66+
{
67+
"id": "123ab-A",
68+
"url": "https://example.org/product-a.html",
69+
"imageUrl": "https://example.org/product-a.png",
70+
"name": "Blubbergurken Seeds - Class A",
71+
"price": 15.00,
72+
"ordernumbers": ["0012BLUB-42-A"],
73+
"matchingOrdernumber": "",
74+
"score": 4.667,
75+
"summary": "These are some very nice seeds.",
76+
"properties": {
77+
"overriddenPrice": "15.00",
78+
"taxRate": "20"
79+
},
80+
"attributes": {
81+
"cat": [
82+
"Gardening"
83+
],
84+
"vendor": [
85+
"Blubbergurken International Inc."
86+
]
87+
}
88+
},
89+
{
90+
"id": "123ab-A",
91+
"url": null,
92+
"imageUrl": null,
93+
"name": null,
94+
"price": null,
95+
"ordernumbers": ["0012BLUB-42-A"],
96+
"matchingOrdernumber": "",
97+
"score": 0,
98+
"summary": null,
99+
"properties": {},
100+
"attributes": {}
101+
}
102+
]
103+
}
104+
],
105+
"filters": {
106+
"main": [
107+
{
108+
"name": "cat",
109+
"displayName": "Category",
110+
"type": "select",
111+
"selectMode": "single",
112+
"values": [
113+
{
114+
"displayName": "Spring",
115+
"value": "Gardening_Spring",
116+
"weight": 1.2,
117+
"frequency": 13
118+
}
119+
],
120+
"pinnedFilterValueCount": 6
121+
},
122+
{
123+
"type": "range-slider",
124+
"totalRange": {
125+
"min": 2.37,
126+
"max": 10106.09
127+
},
128+
"selectedRange": {
129+
"min": 2.37,
130+
"max": 10106.09
131+
},
132+
"stepSize": 0.1,
133+
"unit": "",
134+
"name": "price",
135+
"displayName": "Preis",
136+
"selectMode": "single",
137+
"values": [
138+
{
139+
"value": {
140+
"min": 2.37,
141+
"max": 30.75
142+
},
143+
"weight": 0.3948,
144+
"frequency": null
145+
}
146+
]
147+
},
148+
{
149+
"name": "vendor",
150+
"displayName": "Brand",
151+
"type": "select",
152+
"selectMode": "multiple",
153+
"noAvailableFiltersText": "Sorry, no more filters for you!",
154+
"values": [
155+
{
156+
"value": "Blubbergurken International Inc.",
157+
"weight": 0.8,
158+
"frequency": 5,
159+
"selected": true,
160+
"frequencyType" : "additive"
161+
}
162+
]
163+
}
164+
],
165+
"other": [
166+
{
167+
"name": "color",
168+
"displayName": "Color",
169+
"type": "color",
170+
"selectMode": "multiple",
171+
"cssClass": "my-colors",
172+
"values": [
173+
{
174+
"value": "Green",
175+
"color": "#00FF00"
176+
}
177+
]
178+
}
179+
]
180+
}
181+
}
182+
}

0 commit comments

Comments
 (0)