Skip to content

Commit 93655e5

Browse files
symbol attribute type - v5
1 parent 97ca3db commit 93655e5

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php declare(strict_types=1);
2+
3+
use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery;
4+
use Ibexa\Contracts\ProductCatalogSymbolAttribute\Search\Criterion\SymbolAttribute;
5+
6+
$query = new ProductQuery();
7+
$query->setFilter(new SymbolAttribute('ean', ['5023920187205']));
8+
/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */
9+
$results = $productService->findProducts($query);

docs/pim/symbol_attribute_type.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ The built-in symbol attribute formats in `ibexa/product-catalog-symbol-attribute
1919
| Generic (digits only) | Accepts any string value that contais only digits | 123456 |
2020
| Generic (alphanumeric characters only) | Accepts any string value that contains only letters or digits | 2N6405G |
2121
| Generic (hexadecimal digits only) | Accepts any string value that contains only hexadecimal digits (digits or A-F characters) | DEADBEEF |
22-
| EAN-8 | European Article Number (8 characters) | 29033706 |
22+
| EAN-8 | European Article Number (8 characters) | 96385074 |
2323
| EAN-13 | European Article Number (13 characters) | 5023920187205 |
24-
| EAN-14 | European Article Number (14 characters) | 50239201872050 |
24+
| EAN-14 | European Article Number (14 characters) | 12345678901231 |
2525
| ISBN-10 | International Standard Book Number (10 characters) | 0-19-852663-6 |
2626
| ISBN-13 | International Standard Book Number (13 characters) | 978-1-86197-876-9 |
2727

@@ -46,15 +46,14 @@ ibexa_product_catalog_symbol_attribute:
4646
- 'MSS-24827'
4747
- 'SEE-15444'
4848
```
49-
5049
This following example specifies the format for a "Manufacturer Part Number", defined with the `manufacturer_part_number` identifier.
5150

5251
The pattern is specified using a regular expression.
5352
According to the pattern option, the attribute value:
5453

5554
- must be a string
5655
- begins with three capital letters (A-Z), followed by a hyphen ("-")
57-
- ends with five numbers (0-9), with no other characters before or after
56+
- ends with five digits (0-9), with no other characters before or after
5857

5958
Certain formats, such as the International Standard Book Number (ISBN-10) and the European Article Number (EAN-13), contain checksum digits and are self-validating.
6059

docs/search/criteria_reference/symbolattribute_criterion.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,5 @@ The `SymbolAttribute` Search Criterion searches for products by [symbol attribut
1616
### PHP
1717

1818
``` php
19-
<?php
20-
21-
use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery;
22-
use Ibexa\Contracts\ProductCatalogSymbolAttribute\Search\Criterion\SymbolAttribute;
23-
24-
$query = new ProductQuery();
25-
$query->setFilter(new SymbolAttribute('ean', ['5023920187205']));
26-
/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService*/
27-
$results = $productService->findProducts($query);
19+
[[= include_file(‘code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php’) =]]
2820
```

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ nav:
360360
- Create custom name schema: pim/create_custom_name_schema_strategy.md
361361
- Use symbol attribute type: pim/symbol_attribute_type.md
362362
- Add remote PIM support: pim/add_remote_pim_support.md
363+
- Use symbol attribute type: pim/symbol_attribute_type.md
363364
- Commerce:
364365
- Commerce: commerce/commerce.md
365366
- Cart:
@@ -590,6 +591,7 @@ nav:
590591
- RangeMeasurementAttributeMaximum: search/criteria_reference/rangemeasurementattributemaximum_criterion.md
591592
- SimpleMeasurementAttribute: search/criteria_reference/simplemeasurementattribute_criterion.md
592593
- SelectionAttribute: search/criteria_reference/selectionattribute_criterion.md
594+
- SymbolAttribute: search/criteria_reference/symbolattribute_criterion.md
593595
- Order Search Criteria:
594596
- Order Search Criteria: search/criteria_reference/order_search_criteria.md
595597
- CompanyName: search/criteria_reference/order_company_name_criterion.md

0 commit comments

Comments
 (0)