Skip to content

Commit f25bc04

Browse files
committed
Updated samples and articles from gitlab 5eeabbe5c10dfd490872b09dd82f217f99544b71
1 parent c147ea9 commit f25bc04

File tree

5 files changed

+83
-38
lines changed

5 files changed

+83
-38
lines changed

docs/feeds/offer/fields/sale_price.md

Lines changed: 79 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ sale_price -- can be enhanced by --- sale_price_effective_date
4444
- Number *may* have **two decimals**, separated by a `.` (dot)
4545
- Currency must be three upper case characters and a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency
4646
- Zero prices are **not** allowed
47+
- Must be lower than [`price`](/feeds/offer/fields/price.md)
4748

4849

4950
## Best Practices
@@ -75,6 +76,7 @@ Here are examples of how a valid *sale_price* value should look like in XML and
7576

7677
```xml
7778
<g:sale_price>99.99 SEK</g:sale_price>
79+
<g:price>3200000 SEK</g:price>
7880
```
7981

8082
:::
@@ -85,34 +87,42 @@ Here are examples of how a valid *sale_price* value should look like in XML and
8587

8688
```xml
8789
<g:sale_price>99.99 SEK</g:sale_price>
90+
<g:price>3200000 SEK</g:price>
8891
```
8992

9093
```xml
9194
<g:sale_price>100 SEK</g:sale_price>
95+
<g:price>3200000 SEK</g:price>
9296
```
9397

9498
```xml
9599
<g:sale_price>SEK 100</g:sale_price>
100+
<g:price>3200000 SEK</g:price>
96101
```
97102

98103
```xml
99104
<g:sale_price>99,99 SEK</g:sale_price>
105+
<g:price>3200000 SEK</g:price>
100106
```
101107

102108
```xml
103109
<g:sale_price>10,000.00 SEK</g:sale_price>
110+
<g:price>3200000 SEK</g:price>
104111
```
105112

106113
```xml
107114
<g:sale_price>10 000.00 SEK</g:sale_price>
115+
<g:price>3200000 SEK</g:price>
108116
```
109117

110118
```xml
111119
<g:sale_price>10.000 SEK</g:sale_price>
120+
<g:price>3200000 SEK</g:price>
112121
```
113122

114123
```xml
115124
<g:sale_price>1.144.000 SEK</g:sale_price>
125+
<g:price>3200000 SEK</g:price>
116126
```
117127

118128

@@ -125,8 +135,8 @@ Here are examples of how a valid *sale_price* value should look like in XML and
125135
:::tip Valid Value
126136

127137
```csv
128-
sale_price
129-
99.99 SEK
138+
sale_price,price
139+
99.99 SEK,3200000 SEK
130140
```
131141

132142
:::
@@ -136,43 +146,43 @@ sale_price
136146
<div>
137147

138148
```csv
139-
sale_price
140-
99.99 SEK
149+
sale_price,price
150+
99.99 SEK,3200000 SEK
141151
```
142152

143153
```csv
144-
sale_price
145-
100 SEK
154+
sale_price,price
155+
100 SEK,3200000 SEK
146156
```
147157

148158
```csv
149-
sale_price
150-
SEK 100
159+
sale_price,price
160+
SEK 100,3200000 SEK
151161
```
152162

153163
```csv
154-
sale_price
155-
"99,99 SEK"
164+
sale_price,price
165+
"99,99 SEK",3200000 SEK
156166
```
157167

158168
```csv
159-
sale_price
160-
"10,000.00 SEK"
169+
sale_price,price
170+
"10,000.00 SEK",3200000 SEK
161171
```
162172

163173
```csv
164-
sale_price
165-
10 000.00 SEK
174+
sale_price,price
175+
10 000.00 SEK,3200000 SEK
166176
```
167177

168178
```csv
169-
sale_price
170-
10.000 SEK
179+
sale_price,price
180+
10.000 SEK,3200000 SEK
171181
```
172182

173183
```csv
174-
sale_price
175-
1.144.000 SEK
184+
sale_price,price
185+
1.144.000 SEK,3200000 SEK
176186
```
177187

178188

@@ -194,6 +204,7 @@ Below you will find possible error codes generated when validating this field al
194204

195205
```xml
196206
<g:sale_price>100$</g:sale_price>
207+
<g:price>3200000 SEK</g:price>
197208
```
198209

199210
:::
@@ -203,6 +214,7 @@ Below you will find possible error codes generated when validating this field al
203214

204215
```xml
205216
<g:sale_price>SEK</g:sale_price>
217+
<g:price>3200000 SEK</g:price>
206218
```
207219

208220
:::
@@ -212,12 +224,15 @@ Below you will find possible error codes generated when validating this field al
212224

213225
```xml
214226
<g:sale_price>10.0.00.00 SEK</g:sale_price>
227+
<g:price>3200000 SEK</g:price>
215228
```
216229
```xml
217230
<g:sale_price>10.0.00.00 SEK</g:sale_price>
231+
<g:price>3200000 SEK</g:price>
218232
```
219233
```xml
220234
<g:sale_price>foo SEK</g:sale_price>
235+
<g:price>3200000 SEK</g:price>
221236
```
222237

223238
:::
@@ -227,9 +242,25 @@ Below you will find possible error codes generated when validating this field al
227242

228243
```xml
229244
<g:sale_price>-10 SEK</g:sale_price>
245+
<g:price>3200000 SEK</g:price>
230246
```
231247
```xml
232248
<g:sale_price>0 SEK</g:sale_price>
249+
<g:price>3200000 SEK</g:price>
250+
```
251+
252+
:::
253+
254+
:::danger[**<Anchor id="validation_sale_price_is_not_lower_then_price" title="validation_sale_price_is_not_lower_then_price" />**]
255+
256+
257+
```xml
258+
<g:sale_price>100 SEK</g:sale_price>
259+
<g:price>100 SEK</g:price>
260+
```
261+
```xml
262+
<g:sale_price>100 SEK</g:sale_price>
263+
<g:price>50 SEK</g:price>
233264
```
234265

235266
:::
@@ -239,6 +270,7 @@ Below you will find possible error codes generated when validating this field al
239270

240271
```xml
241272
<g:sale_price>$100</g:sale_price>
273+
<g:price>3200000 SEK</g:price>
242274
```
243275

244276
:::
@@ -250,56 +282,69 @@ Below you will find possible error codes generated when validating this field al
250282
:::danger <Anchor id="validation_missing_currency" title="validation_missing_currency" />
251283

252284
```csv
253-
sale_price
254-
100$
285+
sale_price,price
286+
100$,3200000 SEK
255287
```
256288

257289
:::
258290

259291
:::danger <Anchor id="validation_missing_price_value" title="validation_missing_price_value" />
260292

261293
```csv
262-
sale_price
263-
SEK
294+
sale_price,price
295+
SEK,3200000 SEK
264296
```
265297

266298
:::
267299

268300
:::danger <Anchor id="validation_not_number" title="validation_not_number" />
269301

270302
```csv
271-
sale_price
272-
10.0.00.00 SEK
303+
sale_price,price
304+
10.0.00.00 SEK,3200000 SEK
273305
```
274306
```csv
275-
sale_price
276-
10.0.00.00 SEK
307+
sale_price,price
308+
10.0.00.00 SEK,3200000 SEK
277309
```
278310
```csv
279-
sale_price
280-
foo SEK
311+
sale_price,price
312+
foo SEK,3200000 SEK
281313
```
282314

283315
:::
284316

285317
:::danger <Anchor id="validation_not_positive_number" title="validation_not_positive_number" />
286318

287319
```csv
288-
sale_price
289-
-10 SEK
320+
sale_price,price
321+
-10 SEK,3200000 SEK
322+
```
323+
```csv
324+
sale_price,price
325+
0 SEK,3200000 SEK
326+
```
327+
328+
:::
329+
330+
:::danger <Anchor id="validation_sale_price_is_not_lower_then_price" title="validation_sale_price_is_not_lower_then_price" />
331+
332+
```csv
333+
sale_price,price
334+
100 SEK,100 SEK
290335
```
291336
```csv
292-
sale_price
293-
0 SEK
337+
sale_price,price
338+
100 SEK,50 SEK
294339
```
295340

296341
:::
297342

298343
:::danger <Anchor id="validation_unknown_currency" title="validation_unknown_currency" />
299344

300345
```csv
301-
sale_price
302-
$100
346+
sale_price,price
347+
$100,3200000 SEK
303348
```
304349

305350
:::
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
```csv
22
id,title,price,link,additional_image_link,adult,affiliate_link,age_group,availability,availability_date,brand,color,condition,description,energy_efficiency_class,gender,google_product_category,gtin,image_link,is_bundle,item_group_id,material,member_price,mpn,pattern,prisjakt_id,product_detail(section_name:attribute_name:attribute_value),product_type,promotion_id,sale_price,sale_price_effective_date,shipping(country:region:service:price:min_handling_time:max_handling_time:min_transit_time:max_transit_time),shipping_height,shipping_label,shipping_length,shipping_weight,shipping_width,size,size_system
3-
a b./)(,Samsung Galaxy S8 Black 128G,1.144.000 SEK,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,"https://example.com/image1.jpg,https://example.com/image2.jpg",fAlSE,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,toddler,preorder,2021-03-21,Sony,RED/GREEN/BLUE,used,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",g,unisex,Sporting Goods > Athletics > Figure Skating & Hockey > Ice Skates,"10614141000415,90311017",ftp://example.com/link,fAlSE,aaa111,Cotton/Leather,1.144.000 SEK,MGCH3LL/A,strips,1,disc:memory:500 GB,computer_accessories,super promo,11.50 SEK,2016-02-24/2016-02-26,"SE:Skåne:Express:25.00 SEK:1:2:1:3,SE:Skåne:POST:5.00 SEK:1:5:1:3,SE:Skåne:Express:45.00 SEK:1:8:3:10",15.2 in,dhl/free,15.2 in,11 lb,15.2 in,XS,eu
3+
a b./)(,Samsung Galaxy S8 Black 128G,3200000 SEK,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,"https://example.com/image1.jpg,https://example.com/image2.jpg",fAlSE,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,toddler,preorder,2021-03-21,Sony,RED/GREEN/BLUE,used,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",g,unisex,Sporting Goods > Athletics > Figure Skating & Hockey > Ice Skates,"10614141000415,90311017",ftp://example.com/link,fAlSE,aaa111,Cotton/Leather,1.144.000 SEK,MGCH3LL/A,strips,1,disc:memory:500 GB,computer_accessories,super promo,11.50 SEK,2016-02-24/2016-02-26,"SE:Skåne:Express:25.00 SEK:1:2:1:3,SE:Skåne:POST:5.00 SEK:1:5:1:3,SE:Skåne:Express:45.00 SEK:1:8:3:10",15.2 in,dhl/free,15.2 in,11 lb,15.2 in,XS,eu
44
```

docs/feeds/offer/formats/_xml_full.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<item>
99
<g:id><![CDATA[a b./)(]]></g:id>
1010
<g:title><![CDATA[Samsung Galaxy S8 Black 128G]]></g:title>
11-
<g:price>1.144.000 SEK</g:price>
11+
<g:price>3200000 SEK</g:price>
1212
<g:link>http://example.com/link-%E2%84%A2-mu-20%C2%B5m</g:link>
1313
<g:additional_image_link>https://example.com/image1.jpg</g:additional_image_link>
1414
<g:additional_image_link>https://example.com/image2.jpg</g:additional_image_link>

static/examples/offer/full.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
id,title,price,link,additional_image_link,adult,affiliate_link,age_group,availability,availability_date,brand,color,condition,description,energy_efficiency_class,gender,google_product_category,gtin,image_link,is_bundle,item_group_id,material,member_price,mpn,pattern,prisjakt_id,product_detail(section_name:attribute_name:attribute_value),product_type,promotion_id,sale_price,sale_price_effective_date,shipping(country:region:service:price:min_handling_time:max_handling_time:min_transit_time:max_transit_time),shipping_height,shipping_label,shipping_length,shipping_weight,shipping_width,size,size_system
2-
a b./)(,Samsung Galaxy S8 Black 128G,1.144.000 SEK,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,"https://example.com/image1.jpg,https://example.com/image2.jpg",fAlSE,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,toddler,preorder,2021-03-21,Sony,RED/GREEN/BLUE,used,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",g,unisex,Sporting Goods > Athletics > Figure Skating & Hockey > Ice Skates,"10614141000415,90311017",ftp://example.com/link,fAlSE,aaa111,Cotton/Leather,1.144.000 SEK,MGCH3LL/A,strips,1,disc:memory:500 GB,computer_accessories,super promo,11.50 SEK,2016-02-24/2016-02-26,"SE:Skåne:Express:25.00 SEK:1:2:1:3,SE:Skåne:POST:5.00 SEK:1:5:1:3,SE:Skåne:Express:45.00 SEK:1:8:3:10",15.2 in,dhl/free,15.2 in,11 lb,15.2 in,XS,eu
2+
a b./)(,Samsung Galaxy S8 Black 128G,3200000 SEK,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,"https://example.com/image1.jpg,https://example.com/image2.jpg",fAlSE,http://example.com/link-%E2%84%A2-mu-20%C2%B5m,toddler,preorder,2021-03-21,Sony,RED/GREEN/BLUE,used,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",g,unisex,Sporting Goods > Athletics > Figure Skating & Hockey > Ice Skates,"10614141000415,90311017",ftp://example.com/link,fAlSE,aaa111,Cotton/Leather,1.144.000 SEK,MGCH3LL/A,strips,1,disc:memory:500 GB,computer_accessories,super promo,11.50 SEK,2016-02-24/2016-02-26,"SE:Skåne:Express:25.00 SEK:1:2:1:3,SE:Skåne:POST:5.00 SEK:1:5:1:3,SE:Skåne:Express:45.00 SEK:1:8:3:10",15.2 in,dhl/free,15.2 in,11 lb,15.2 in,XS,eu

static/examples/offer/full.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<item>
88
<g:id><![CDATA[a b./)(]]></g:id>
99
<g:title><![CDATA[Samsung Galaxy S8 Black 128G]]></g:title>
10-
<g:price>1.144.000 SEK</g:price>
10+
<g:price>3200000 SEK</g:price>
1111
<g:link>http://example.com/link-%E2%84%A2-mu-20%C2%B5m</g:link>
1212
<g:additional_image_link>https://example.com/image1.jpg</g:additional_image_link>
1313
<g:additional_image_link>https://example.com/image2.jpg</g:additional_image_link>

0 commit comments

Comments
 (0)