- New: Domain\Integrations\IntegrationsRepository + admin\Controllers\IntegrationsController (DI) - Cleanup: removed all Sellasist and Baselinker integrations from entire project - Fix: product-edit.php Polish characters (UTF-8/CP1250 double-encoding) - Update: factory\Integrations as facade (Apilo + ShopPRO only) - Tests: 212 tests, 577 assertions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?
|
|
namespace admin\controls;
|
|
|
|
class ShopStatuses {
|
|
|
|
// status_save
|
|
public static function status_save()
|
|
{
|
|
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania statusu wystąpił błąd. Proszę spróbować ponownie.' ];
|
|
$values = json_decode( \S::get( 'values' ), true );
|
|
|
|
if ( $id = \admin\factory\ShopStatuses::status_save( $values['id'], $values['color'], $values['apilo_status_id'] ) )
|
|
$response = [ 'status' => 'ok', 'msg' => 'Status został zapisany.', 'id' => $id ];
|
|
|
|
echo json_encode( $response );
|
|
exit;
|
|
}
|
|
|
|
// status_edit
|
|
public static function status_edit()
|
|
{
|
|
return \Tpl::view( 'shop-statuses/status-edit', [
|
|
'status' => \admin\factory\ShopStatuses::get_status( \S::get( 'id' ) ),
|
|
'apilo_order_status_list' => unserialize( \admin\factory\Integrations::apilo_settings( 'status-types-list' ) ),
|
|
] );
|
|
}
|
|
|
|
static public function view_list()
|
|
{
|
|
return \Tpl::view( 'shop-statuses/view-list', [
|
|
'apilo_order_status_list' => unserialize( \admin\factory\Integrations::apilo_settings( 'status-types-list' ) ),
|
|
] );
|
|
}
|
|
} |