product photos first commit - only upload base photo

This commit is contained in:
2025-08-10 02:35:25 -07:00
parent 82b3ca59ed
commit a1012b4054
15 changed files with 1021 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
<?php
/**
* @var \App\View\AppView $this
* @var \CakeProducts\Model\Entity\Product[]|\Cake\Datasource\EntityInterface[] $products
* @var \CakeProducts\Model\Entity\Product[]|\Cake\Datasource\EntityInterface[] $productSkus
* @var bool $includeFile
*/
$includeFile = $includeFile ?? false;
echo $this->Form->control('product_id', [
'options' => $products ?? [],
]);
echo $this->Form->control('product_sku_id', [
'options' => $productSkus ?? []
]);
echo $includeFile ? $this->Form->control('photo', [
'type' => 'file',
]) : '';
echo $this->Form->control('primary_photo');
echo $this->Form->control('photo_position');
echo $this->Form->control('enabled');
?>