- 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>
65 lines
3.0 KiB
PHP
65 lines
3.0 KiB
PHP
<?php
|
|
global $gdb;
|
|
foreach ( $this -> apilo_payment_types_list as $payment_type )
|
|
{
|
|
if ( isset( $payment_type['name'] ) && isset( $payment_type['id'] ) )
|
|
$payment_types[ $payment_type['id'] ] = $payment_type['name'];
|
|
}
|
|
|
|
$grid = new \grid( 'pp_shop_payment_methods' );
|
|
$grid -> gdb_opt = $gdb;
|
|
$grid -> debug = true;
|
|
$grid -> order = [ 'column' => 'id', 'type' => 'ASC' ];
|
|
$grid -> search = [
|
|
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ],
|
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
|
];
|
|
$grid -> columns_view = [
|
|
[
|
|
'name' => 'Lp.',
|
|
'th' => [ 'class' => 'g-lp' ],
|
|
'td' => [ 'class' => 'g-center' ],
|
|
'autoincrement' => true
|
|
], [
|
|
'name' => 'Nazwa',
|
|
'db' => 'name'
|
|
], [
|
|
'name' => 'Aktywny',
|
|
'db' => 'status',
|
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
|
'td' => [ 'class' => 'g-center' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ]
|
|
], [
|
|
'name' => 'Typ płatności Apilo',
|
|
'db' => 'apilo_payment_type_id',
|
|
'replace' => [ 'array' => $payment_types ],
|
|
'td' => [ 'class' => 'g-center' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ]
|
|
]
|
|
];
|
|
|
|
$grid -> columns_edit = [
|
|
[
|
|
'name' => 'Nazwa',
|
|
'db' => 'name',
|
|
'type' => 'text',
|
|
'readonly-edit' => true
|
|
], [
|
|
'name' => 'Opis',
|
|
'db' => 'description',
|
|
'type' => 'textarea'
|
|
], [
|
|
'db' => 'apilo_payment_type_id',
|
|
'type' => 'select',
|
|
'name' => 'Typ płatności Apilo',
|
|
'replace' => [ 'array' => $payment_types ],
|
|
], [
|
|
'name' => 'Aktywny',
|
|
'db' => 'status',
|
|
'type' => 'select',
|
|
'default_value' => 1,
|
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ]
|
|
]
|
|
];
|
|
$grid -> actions = [ 'edit' => true ];
|
|
echo $grid -> draw(); |