default product type id on categories table

This commit is contained in:
2025-07-05 23:18:54 -07:00
parent 59a38758e9
commit 9d777f12b2
7 changed files with 68 additions and 8 deletions

View File

@@ -17,6 +17,7 @@
<th><?= $this->Paginator->sort('product_id') ?></th>
<th><?= $this->Paginator->sort('attribute_type_id') ?></th>
<th><?= $this->Paginator->sort('enabled') ?></th>
<th><?= 'Options' ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
@@ -29,6 +30,15 @@
<td><?= $productCategoryVariant->hasValue('product') ? $this->Html->link($productCategoryVariant->product->name, ['controller' => 'Products', 'action' => 'view', $productCategoryVariant->product->id]) : '' ?></td>
<td><?= $this->Number->format($productCategoryVariant->attribute_type_id) ?></td>
<td><?= h($productCategoryVariant->enabled) ?></td>
<td>
<small>
<?php
$cnt = isset($productCategoryVariant->product_category_variant_options) && $productCategoryVariant->product_category_variant_options ? count($productCategoryVariant->product_category_variant_options) : 0;
foreach ($productCategoryVariant->product_category_variant_options as $index => $productCategoryVariantOption) : ?>
<?= h($productCategoryVariantOption->variant_value); ?><?= $index < ($cnt -1) ? ', ' : ''; ?>
<?php endforeach; ?>
</small>
</td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $productCategoryVariant->id]) ?>
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $productCategoryVariant->id]) ?>