Product Compliance Certificates Display Setup in 1C-Bitrix
For certain product categories — household appliances, electronics, food products, building materials — customers request compliance certificates directly on site. Task: attach certificate files to products in catalog and display them on product card.
Where to Store Certificates
Certificates stored as infoblock properties. Best option — property type "File" (F) or "Infoblock Link" (E), if certificates need reuse between products (one declaration covers entire product line).
Option A — "File" property (simpler, when each product has own file):
In admin: Content → Infoblocks → [your catalog] → Properties → Add property:
- Type: File
- Code:
CERTIFICATE - Multiple: Yes (product can have multiple certificates)
- Allowed extensions: pdf, jpg, png
Option B — separate "Certificates" infoblock (better with many documents):
Create CERTIFICATES infoblock with properties: FILE (file), CERT_NUMBER (string), VALID_TO (date), PRODUCT_IDS (infoblock link, multiple). Select all certificates tied to product in product card.
Output in Product Card Template
In catalog.element component template (path: /local/templates/[template]/components/bitrix/catalog.element/[name]/template.php) add certificate section.
For Option A (file property):
if (!empty($arResult['PROPERTIES']['CERTIFICATE']['VALUE'])) {
$certs = $arResult['PROPERTIES']['CERTIFICATE'];
// For multiple property VALUE — array of file IDs
$fileIds = is_array($certs['VALUE']) ? $certs['VALUE'] : [$certs['VALUE']];
foreach ($fileIds as $fileId) {
$fileInfo = \CFile::GetFileArray($fileId);
if ($fileInfo) {
echo '<a href="' . $fileInfo['SRC'] . '" target="_blank">';
echo 'Certificate: ' . htmlspecialchars($fileInfo['ORIGINAL_NAME']);
echo '</a>';
}
}
}
For Option B (separate infoblock):
$certRes = \CIBlockElement::GetList(
['SORT' => 'ASC'],
[
'IBLOCK_ID' => CERT_IBLOCK_ID,
'PROPERTY_PRODUCT_IDS' => $arResult['ID'],
],
false,
false,
['ID', 'NAME', 'PROPERTY_FILE', 'PROPERTY_CERT_NUMBER', 'PROPERTY_VALID_TO']
);
while ($cert = $certRes->GetNext()) {
// output
}
Block Formatting on Page
Typical formatting — "Certificates" tab next to "Description" and "Characteristics," or separate section at bottom of product card. If using component with detail page via template, simplest is add via $APPLICATION->AddViewContent() and output at needed template location.
File Type Icons and Previews
For PDF certificate — show PDF icon and download link. For image (scan) — can show thumbnail via \CFile::ResizeImageGet() with params ['width' => 80, 'height' => 110].
| Stage | Time |
|---|---|
| Create property / infoblock | 1–2 h |
| Fill certificates for products | depends on quantity |
| Rework product card template | 2–4 h |
| Test display | 1 h |

