Skip to content

Commit

Permalink
Fix link to actions in emails + Fix cli invalid types
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Aug 24, 2024
1 parent 4b78afe commit 9ec6596
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Console/Command/EraseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int

try {
foreach ($entityIds as $entityId) {
$this->eraseEntityManagement->process($this->fetchEntity($entityType, $entityId));
$this->eraseEntityManagement->process($this->fetchEntity((int)$entityId, $entityType));
$progressBar->advance();
}
$progressBar->finish();
$output->writeln('');
$output->writeln('<info>Entities has been erased.</info>');
} catch (LocalizedException $e) {
$output->writeln('');
$output->writeln('<error>' . $e->getMessage() . '</error>');
$returnCode = Cli::RETURN_FAILURE;
}
Expand Down
4 changes: 3 additions & 1 deletion Console/Command/ExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int

try {
foreach ($entityIds as $entityId) {
$exportEntity = $this->fetchEntity($entityId, $entityType);
$exportEntity = $this->fetchEntity((int)$entityId, $entityType);
$this->exportEntityManagement->export($exportEntity);
$files[] = $exportEntity->getFilePath();
$progressBar->advance();
}
$progressBar->finish();
$output->writeln('');
$output->writeln('<info>Entities data have been exported to:</info>');
foreach ($files as $file) {
$output->writeln($file);
}
} catch (Exception $e) {
$output->writeln('');
$output->writeln('<error>' . $e->getMessage() . '</error>');
$resultCode = Cli::RETURN_FAILURE;
}
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/email/erase_pending.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to erase the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans 'You can cancel the erase within %delay hours by <a href="%account_url">logging into your account</a>.' delay=$delay account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}</p>
<p>{{trans 'You can cancel the erase within %delay hours by <a href="%account_url">logging into your account</a>.' delay=$delay account_url=$this.getUrl($store,'customer/privacy/settings',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/email/erase_pending_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to erase the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans 'You can cancel the erase within %delay hours by <a href="%account_url">logging into your account</a>.' delay=$delay account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}</p>
<p>{{trans 'You can cancel the erase within %delay hours by <a href="%account_url">logging into your account</a>.' delay=$delay account_url=$this.getUrl($store,'sales/guest/form',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/email/export_pending.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "We will notify you when the export will be ready. The action will be available in your account."}}</p>
<p>{{trans "We will notify you when the export will be ready. The action will be available by <a href="%account_url">logging into your account</a>." account_url=$this.getUrl($store,'customer/privacy/settings',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/email/export_pending_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "We will notify you when the export will be ready. The action will be available in your account."}}</p>
<p>{{trans "We will notify you when the export will be ready. The action will be available by <a href="%account_url">logging into your account</a>." account_url=$this.getUrl($store,'sales/guest/form',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/email/export_ready.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "The export of you personal data is ready. The action is now available in your account."}}</p>
<p>{{trans "The export of you personal data is ready. The action is now available by <a href="%account_url">logging into your account</a>." account_url=$this.getUrl($store,'customer/privacy/settings',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/email/export_ready_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "The export of you personal data is ready. The action is now available in your account."}}</p>
<p>{{trans "The export of you personal data is ready. The action is now available by <a href="%account_url">logging into your account</a>." account_url=$this.getUrl($store,'sales/guest/form',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
Expand Down

0 comments on commit 9ec6596

Please sign in to comment.