Integrations DI refactor, remove Sellasist/Baselinker, fix product-edit encoding (0.263)

- 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>
This commit is contained in:
2026-02-13 21:59:26 +01:00
parent b4559a5e74
commit 1303b17de4
51 changed files with 1166 additions and 2663 deletions

View File

@@ -1,21 +0,0 @@
<?
namespace front\factory;
class Shop
{
static public function baselinker_settings( $admin = false )
{
global $mdb;
if ( !$settings = \Cache::fetch( 'baselinker_settings' ) or $admin )
{
$results = $mdb -> select( 'pp_shop_baselinker_settings', '*' );
if ( is_array( $results ) ) foreach ( $results as $row )
$settings[ $row['name'] ] = $row['value'];
if ( !$admin)
\Cache::store( 'baselinker_settings', $settings );
}
return $settings;
}
}

View File

@@ -136,9 +136,7 @@ class ShopOrder
'summary' => \S::normalize_decimal( $basket_summary + $transport_cost ),
'coupon_id' => $coupon ? $coupon -> id : null,
'message' => $basket_message ? $basket_message : null,
'baselinker_order_status_date' => date( 'Y-m-d H:i:s' ),
'apilo_order_status_date' => date( 'Y-m-d H:i:s' ),
'sellasist_order_status_date' => date( 'Y-m-d H:i:s' ),
] );
$order_id = $mdb -> id();

View File

@@ -3,12 +3,6 @@ namespace front\factory;
class ShopPaymentMethod
{
// get_sellasist_payment_method_id
static public function get_sellasist_payment_method_id( $payment_method_id ) {
global $mdb;
return $mdb -> get( 'pp_shop_payment_methods', 'sellasist_payment_type_id', [ 'id' => $payment_method_id ] );
}
// get_apilo_payment_method_id
static public function get_apilo_payment_method_id( $payment_method_id ) {
global $mdb;

View File

@@ -3,17 +3,6 @@ namespace front\factory;
class ShopProduct
{
// get_sellasist_product_id
static public function get_sellasist_product_id( $product_id ) {
global $mdb;
if ( !$sellasist_product_id = $mdb -> get( 'pp_shop_products', 'sellasist_product_id', [ 'id' => $product_id ] ) ) {
$sellasist_product_id = $mdb -> get( 'pp_shop_products', 'sellasist_product_id', [ 'id' =>
$mdb -> get( 'pp_shop_products', 'parent_id', [ 'id' => $product_id ] )
] );
}
return $sellasist_product_id;
}
// get_product_sku
static public function get_product_sku( $product_id, $parent = false )
{

View File

@@ -3,32 +3,17 @@ namespace front\factory;
class ShopStatuses {
// get_baselinker_order_status_id
static public function get_baselinker_order_status_id( $status_id ) {
global $mdb;
return $mdb -> get( 'pp_shop_statuses', 'baselinker_status_id', [ 'id' => $status_id ] );
}
// get_apilo_status_id
static public function get_apilo_status_id( $status_id ) {
global $mdb;
return $mdb -> get( 'pp_shop_statuses', 'apilo_status_id', [ 'id' => $status_id ] );
}
// get sellasist status id
static public function get_sellasist_status_id( $status_id ) {
global $mdb;
return $mdb -> get( 'pp_shop_statuses', 'sellasist_status_id', [ 'id' => $status_id ] );
}
// get_shop_status_by_integration_status_id
static public function get_shop_status_by_integration_status_id( $integration, $integration_status_id )
{
global $mdb;
if ( $integration == 'sellasist' )
return $mdb -> get( 'pp_shop_statuses', 'id', [ 'sellasist_status_id' => $integration_status_id ] );
if ( $integration == 'apilo' )
return $mdb -> get( 'pp_shop_statuses', 'id', [ 'apilo_status_id' => $integration_status_id ] );
}

View File

@@ -2,12 +2,6 @@
namespace front\factory;
class ShopTransport
{
// get_sellasist_transport_id
static public function get_sellasist_transport_id( $transport_method_id ) {
global $mdb;
return $mdb -> get( 'pp_shop_transports', 'sellasist_shipment_method_id', [ 'id' => $transport_method_id ] );
}
// get_apilo_carrier_account_id
static public function get_apilo_carrier_account_id( $transport_method_id )
{