diff --git a/config.php b/config.php index c684fdd..51aae41 100644 --- a/config.php +++ b/config.php @@ -15,4 +15,7 @@ $config['redis']['port'] = 20470; $config['redis']['password'] = 'Gi7FzWtkry19hZ1BqT1LKEWfwokQpigh'; $config['debug']['apilo'] = false; + +$config['trustmate']['enabled'] = true; +$config['trustmate']['uid'] = '34eb36ba-c715-4cdc-8707-22376c9f14c7'; ?> diff --git a/cron-turstmate.php b/cron-turstmate.php new file mode 100644 index 0000000..3f8476e --- /dev/null +++ b/cron-turstmate.php @@ -0,0 +1,94 @@ + 'mysql', + 'database_name' => $database[ 'name' ], + 'server' => $database[ 'host' ], + 'username' => $database[ 'user' ], + 'password' => $database[ 'password' ], + 'charset' => 'utf8' + ] ); + +if ( !$config['trustmate']['enabled'] ) +{ + echo 'TrustMate is not enabled.'; + exit; +} + +$settings = \front\factory\Settings::settings_details(); + +$order_id = $mdb -> get( 'pp_shop_orders', '*', [ 'AND' => [ 'status' => 6, 'trustmate_send' => 0 ] ] ); +if ( is_array( $order_id ) and $order_id['id'] ) +{ + $order = \front\factory\ShopOrder::order_details( $order_id['id'] ); + ?> + + + + TrustMate Cron + + + + + +

TrustMate Cron

+

Wysłano zaproszenie do TrustMate dla zamówienia nr .

+ update( 'pp_shop_orders', [ 'trustmate_send' => 1 ], [ 'id' => $order['id'] ] ); + ?> + + + ver. 0.228
+- NEW - cron do wysyłania zamówień do trustmate.io +
ver. 0.227
- NEW - historia kodów rabatowych
diff --git a/updates/versions.php b/updates/versions.php index 0ebb188..f875611 100644 --- a/updates/versions.php +++ b/updates/versions.php @@ -1,5 +1,5 @@