Zmień limit długości wiadomości zamówienia na 900 znaków oraz popraw sposób wyświetlania błędów walidacji

This commit is contained in:
2024-11-07 12:57:17 +01:00
parent 0ec3bb9057
commit fc35061406
3 changed files with 6 additions and 3 deletions

BIN
autoload/.DS_Store vendored Normal file

Binary file not shown.

BIN
autoload/front/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -465,7 +465,8 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
$order_message .= '<hr>';
}
if ( strlen( $order_message ) > 1024 )
//TODO: ostatnio był problem kiedy wiadomość miała mniej 1024 znaki ale zawierała przeniesienie tekstu '<br>' i do tego jeszcze miała emoji. Wtedy APILO tego nie przepuszczał.
if ( strlen( $order_message ) > 900 )
$order_message = '<p><strong>Wiadomość do zamówienia była zbyt długa. Sprawdź szczegóły w panelu sklepu</strong></p>';
// add transport as product
@@ -588,8 +589,10 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
}
elseif ( $response['message'] == 'Validation error' )
{
\S::pre( $response );
\S::pre( $postData );
echo '<pre>';
echo print_r( $response, true );
echo print_r( $postData, true );
echo '</pre>';
}
else
{