v0.0.15 - catalags & apis many to many wip

This commit is contained in:
2025-03-31 00:48:00 -07:00
parent ce74025f6c
commit 4c65d23e2b
8 changed files with 173 additions and 69 deletions

View File

@@ -65,8 +65,15 @@ class ExternalProductCatalogsController extends AppController
{
$externalProductCatalog = $this->ExternalProductCatalogs->newEmptyEntity();
if ($this->request->is('post')) {
$externalProductCatalog = $this->ExternalProductCatalogs->patchEntity($externalProductCatalog, $this->request->getData());
if ($this->ExternalProductCatalogs->save($externalProductCatalog)) {
$saveOptions = [
'associated' => [
'ExternalProductCatalogsProductCatalogs',
],
];
$postData = $this->request->getData();
$externalProductCatalog = $this->ExternalProductCatalogs->patchEntity($externalProductCatalog, $postData, $saveOptions);
if ($this->ExternalProductCatalogs->save($externalProductCatalog, $saveOptions)) {
$this->Flash->success(__('The external product catalog has been saved.'));
return $this->redirect(['action' => 'index']);