/**
* Duplicate document properties
*/
public function duplicatePropertiesAction() { $this->
View()->
setTemplate();
$id =
$this->
Request()->id;
// Update statement
$getDocumentTypes =
Shopware()->
Db()->
fetchAll( 'SELECT DISTINCT id FROM s_core_documents WHERE id != ?',
[$id] );
foreach ($getDocumentTypes as $targetID) { Shopware()->
Db()->
query( 'DELETE FROM s_core_documents_box WHERE documentID = ?',
[$targetID['id'
]] );
$sqlDuplicate = 'INSERT IGNORE INTO s_core_documents_box
SELECT NULL AS id, ? AS documentID , name, style, value
FROM s_core_documents_box WHERE `documentID` = ?;
';