Add initial HTML template for MojeGS1 application with Cookiebot and Google Analytics integration
This commit is contained in:
@@ -35,7 +35,20 @@
|
||||
<tr><th>ID</th><td><?= $e((string) ($item['id'] ?? '')) ?></td></tr>
|
||||
<tr><th><?= $e($t('products.fields.name')) ?></th><td><?= $e((string) ($item['name'] ?? '')) ?></td></tr>
|
||||
<tr><th>SKU</th><td><?= $e((string) ($item['sku'] ?? '')) ?></td></tr>
|
||||
<tr><th>EAN</th><td><?= $e((string) ($item['ean'] ?? '')) ?></td></tr>
|
||||
<tr>
|
||||
<th>EAN</th>
|
||||
<td>
|
||||
<?php if (trim((string) ($item['ean'] ?? '')) !== ''): ?>
|
||||
<?= $e((string) $item['ean']) ?>
|
||||
<?php else: ?>
|
||||
<span class="muted">—</span>
|
||||
<form method="post" action="/products/<?= $e((string) $productIdValue) ?>/assign-ean" style="display:inline; margin-left:8px;">
|
||||
<input type="hidden" name="_token" value="<?= $e((string) ($csrfToken ?? '')) ?>">
|
||||
<button type="submit" class="btn btn--primary btn--sm"><?= $e($t('products.gs1.assign_ean')) ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th><?= $e($t('products.fields.type')) ?></th><td><?= $e((string) ($item['type'] ?? '')) ?></td></tr>
|
||||
<tr><th><?= $e($t('products.fields.status')) ?></th><td><?= $e((string) ($item['status'] ?? '')) ?></td></tr>
|
||||
<tr><th><?= $e($t('products.fields.promoted')) ?></th><td><?= $e((string) ($item['promoted'] ?? '')) ?></td></tr>
|
||||
@@ -53,6 +66,32 @@
|
||||
<tr><th><?= $e($t('products.fields.meta_keywords')) ?></th><td><?= $e((string) ($item['meta_keywords'] ?? '')) ?></td></tr>
|
||||
<tr><th><?= $e($t('products.fields.seo_link')) ?></th><td><?= $e((string) ($item['seo_link'] ?? '')) ?></td></tr>
|
||||
<tr><th><?= $e($t('products.fields.updated_at')) ?></th><td><?= $e((string) ($item['updated_at'] ?? '')) ?></td></tr>
|
||||
<?php if (!empty($item['producer_name'])): ?>
|
||||
<tr><th>Producent</th><td><?= $e((string) $item['producer_name']) ?></td></tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['security_information'])): ?>
|
||||
<tr>
|
||||
<th>GPSR — informacje o bezpieczeństwie</th>
|
||||
<td><?= $item['security_information'] ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$customFields = [];
|
||||
if (!empty($item['custom_fields_json'])) {
|
||||
$decoded = json_decode((string) $item['custom_fields_json'], true);
|
||||
$customFields = is_array($decoded) ? $decoded : [];
|
||||
}
|
||||
?>
|
||||
<?php if ($customFields !== []): ?>
|
||||
<tr>
|
||||
<th>Dodatkowe pola</th>
|
||||
<td>
|
||||
<?php foreach ($customFields as $cf): ?>
|
||||
<div><?= $e((string) ($cf['name'] ?? '')) ?> (<?= $e((string) ($cf['type'] ?? '')) ?><?= (int) ($cf['is_required'] ?? 0) === 1 ? ', wymagane' : '' ?>)</div>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user