diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index c81efbd7..b3a52676 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -64,6 +64,7 @@ "lmtime": 0, "modified": false }, + "firmeslink": {}, ".gitignore": { "type": "-", "size": 32, @@ -203,8 +204,8 @@ "hook": { "hookDisplayCustomAttributesListTable.tpl": { "type": "-", - "size": 4863, - "lmtime": 1749506820503, + "size": 6475, + "lmtime": 1749585230096, "modified": false }, "hookDisplayProductTabContentGrid.tpl": { diff --git a/ajax.php b/ajax.php new file mode 100644 index 00000000..9a254d73 --- /dev/null +++ b/ajax.php @@ -0,0 +1,36 @@ + 'mysql', + 'database_name' => 'host439372_b2b', + 'server' => 'localhost', + 'username' => 'host439372_b2b', + 'password' => 'BNbuvNMs22Dq48drp6Ee', + 'charset' => 'utf8' +] ); + +if ( $_POST['a'] == 'get-email' ) +{ + echo 'zam@redline.com.pl'; + exit; +} + +if ( $_POST['a'] == 'get-phone' ) +{ + echo '+48 14 68 33 333'; + exit; +} + +if ( $_POST['a'] == 'load-customer-b2b-data' ) +{ + $order_id = $mdb -> get( 'ps_orders', 'id_order', [ 'id_customer' => $_POST['customer_id'], 'ORDER' => [ 'id_order' => 'DESC' ] ] ); + $row['fvat'] = $mdb -> get( 'ps_custom_field_userdata', 'field_value', [ 'AND' => [ 'id_order' => $order_id, 'id_custom_field' => 1 ], 'ORDER' => [ 'id_order' => 'DESC' ], 'LIMIT' => 1 ] ); + $row['firm'] = $mdb -> get( 'ps_custom_field_userdata', 'field_value', [ 'AND' => [ 'id_order' => $order_id, 'id_custom_field' => 2 ], 'ORDER' => [ 'id_order' => 'DESC' ], 'LIMIT' => 1 ] ); + $row['nip'] = $mdb -> get( 'ps_custom_field_userdata', 'field_value', [ 'AND' => [ 'id_order' => $order_id, 'id_custom_field' => 3 ], 'ORDER' => [ 'id_order' => 'DESC' ], 'LIMIT' => 1 ] ); + $row['street'] = $mdb -> get( 'ps_custom_field_userdata', 'field_value', [ 'AND' => [ 'id_order' => $order_id, 'id_custom_field' => 4 ], 'ORDER' => [ 'id_order' => 'DESC' ], 'LIMIT' => 1 ] ); + $row['city'] = $mdb -> get( 'ps_custom_field_userdata', 'field_value', [ 'AND' => [ 'id_order' => $order_id, 'id_custom_field' => 5 ], 'ORDER' => [ 'id_order' => 'DESC' ], 'LIMIT' => 1 ] ); + $row['postal_code'] = $mdb -> get( 'ps_custom_field_userdata', 'field_value', [ 'AND' => [ 'id_order' => $order_id, 'id_custom_field' => 6 ], 'ORDER' => [ 'id_order' => 'DESC' ], 'LIMIT' => 1 ] ); + echo json_encode( $row ); + exit; +} \ No newline at end of file diff --git a/app/config/parameters.php b/app/config/parameters.php new file mode 100644 index 00000000..bee9c6cb --- /dev/null +++ b/app/config/parameters.php @@ -0,0 +1,25 @@ + + array ( + 'database_host' => 'localhost', + 'database_port' => '', + 'database_name' => 'host439372_b2b', + 'database_user' => 'host439372_b2b', + 'database_password' => 'BNbuvNMs22Dq48drp6Ee', + 'database_prefix' => 'ps_', + 'database_engine' => 'InnoDB', + 'mailer_transport' => 'smtp', + 'mailer_host' => '127.0.0.1', + 'mailer_user' => NULL, + 'mailer_password' => NULL, + 'secret' => '0wwXj30ps87g7QZ6u249kyLHLLnZep5DErs6OoCCZ79AsmAVHHx3E2pp', + 'ps_caching' => 'Redis', + 'ps_cache_enable' => false, + 'ps_creation_date' => '2020-11-22', + 'locale' => 'pl-PL', + 'use_debug_toolbar' => true, + 'cookie_key' => 'bHxURna101iz8KgQUUhsrFUImUtSQDdg2iaBFipESDHBZSSgWLSmhdie', + 'cookie_iv' => 'J71rSPtk', + 'new_cookie_key' => 'def00000962263209b78fa63e24149af01ce07529ba50880c818133b0a4a12c41ac71d4df913a7480229e578a224d72eb84352bc654f58870cbc31c8ae4164e56c116844', + ), +);