8
0
Fork 1

fix small issues, move wrong placed menu item

Dieser Commit ist enthalten in:
Daniel Seifert 2022-07-13 15:38:53 +02:00
Ursprung b7fc00aa8f
Commit 1ed3ae40ef
Signiert von: DanielS
GPG-Schlüssel-ID: 8A7C4C6ED1915C6F
4 geänderte Dateien mit 10 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -19,6 +19,7 @@ use D3\Linkmobility4OXID\Application\Model\Exceptions\noRecipientFoundException;
use D3\Linkmobility4OXID\Application\Model\Exceptions\successfullySentException;
use D3\Linkmobility4OXID\Application\Model\OrderRecipients;
use D3\Linkmobility4OXID\Application\Model\Sms;
use D3\LinkmobilityClient\Response\ResponseInterface;
use D3\LinkmobilityClient\ValueObject\Recipient;
use Exception;
use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
@ -90,10 +91,11 @@ class AdminOrder extends AdminController
oxNew(successfullySentException::class, $sms->getResponse()->getSmsCount())
);
} else {
$errorMsg = $sms->getResponse() instanceof ResponseInterface ? $sms->getResponse()->getErrorMessage() : 'no response';
Registry::getUtilsView()->addErrorToDisplay(
sprintf(
Registry::getLang()->translateString('D3LM_EXC_MESSAGE_UNEXPECTED_ERR_SEND'),
$sms->getResponse()->getErrorMessage()
$errorMsg
)
);
}

Datei anzeigen

@ -18,6 +18,7 @@ namespace D3\Linkmobility4OXID\Application\Controller\Admin;
use D3\Linkmobility4OXID\Application\Model\Exceptions\noRecipientFoundException;
use D3\Linkmobility4OXID\Application\Model\Sms;
use D3\Linkmobility4OXID\Application\Model\UserRecipients;
use D3\LinkmobilityClient\Response\ResponseInterface;
use D3\LinkmobilityClient\ValueObject\Recipient;
use Exception;
use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
@ -93,10 +94,11 @@ class AdminUser extends AdminController
)
);
} else {
$errorMsg = $sms->getResponse() instanceof ResponseInterface ? $sms->getResponse()->getErrorMessage() : 'no response';
Registry::getUtilsView()->addErrorToDisplay(
sprintf(
Registry::getLang()->translateString('D3LM_EXC_MESSAGE_UNEXPECTED_ERR_SEND'),
$sms->getResponse()->getErrorMessage()
$errorMsg
)
);
}

Datei anzeigen

@ -40,7 +40,7 @@ class OrderRecipients
public function getSmsRecipient(): Recipient
{
foreach ($this->getSmsRecipientFields() as $phoneFieldName => $countryIdFieldName) {
$content = trim($this->order->getFieldData($phoneFieldName));
$content = trim((string) $this->order->getFieldData($phoneFieldName));
if (strlen($content)) {
$country = oxNew(Country::class);

Datei anzeigen

@ -5,7 +5,9 @@
<SUBMENU id="mxusers" cl="admin_user" list="user_list">
<TAB id="tbcluser_linkmobility" cl="d3linkmobility_user" />
</SUBMENU>
<SUBMENU id="mxorders" cl="admin_orders" list="order_list">
</MAINMENU>
<MAINMENU id="mxorders">
<SUBMENU id="mxdisplayorders" cl="admin_order" list="order_list">
<TAB id="tbclorder_linkmobility" cl="d3linkmobility_order" />
</SUBMENU>
</MAINMENU>