v0.0.15 - catalags & apis many to many wip
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user