update slack msg

This commit is contained in:
Marko 2024-03-01 16:30:03 +01:00
parent 5c62edb0d8
commit 3a8b62c75a
No known key found for this signature in database

View File

@ -68,13 +68,10 @@ class SlackNotifySubscriber implements EventSubscriberInterface
'allow_markdown' => true,
]);
dd($item);
$msg = "Bestellung {$order->getOrderId()}: \n";
$msg .= $item['marke'] . '-';
$msg .= $item['name'];
$msg .= '-' . $item['han'];
$msg .= ' - *' . $item['menge'] . "* \n";
$msg .= ' ' . $item['sku'];
$msg .= ' Menge: ' . $item['menge'] . "\n";
if ($order->getStatus() == 1) {
$slack->from('CDS-Notify')->send($msg);
@ -89,6 +86,10 @@ class SlackNotifySubscriber implements EventSubscriberInterface
*/
private function getWarehouseByGtin(string $gtin)
{
if ($gtin == null) {
return false;
}
$product = $this->productRepository->findOneBy(['gtin' => $gtin]);
if ($product) {