aa
This commit is contained in:
@@ -5,6 +5,7 @@ use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Clientegm;
|
||||
use App\Mylog;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
@@ -1717,3 +1718,15 @@ function updateArticoloFromGM($idarticolo)
|
||||
return "Errore updateArticoloFromGM: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
function getClienteByIdInternet($idInternet) {
|
||||
echo 'IdInternet=' . $idInternet;
|
||||
$clienteinGM = Clientegm::where('IdInternet', $idInternet)->first();
|
||||
if ($clienteinGM)
|
||||
echo 'clienteinGM=' . json_decode($clienteinGM);
|
||||
else {
|
||||
echo 'Cliente non trovato... clienteinGM=' . $clienteinGM;
|
||||
}
|
||||
|
||||
return $clienteinGM;
|
||||
}
|
||||
|
||||
@@ -2171,7 +2171,7 @@ Route::post('/updatecreate', function (Request $request) {
|
||||
$myidInternet = (int) $request->id;
|
||||
|
||||
if ($myidInternet > 0) {
|
||||
$clienteinGM = Clientegm::where('IdInternet', $myidInternet)->first();
|
||||
$clienteinGM = getClienteByIdInternet($myidInternet);
|
||||
if ($clienteinGM) {
|
||||
$productLogger->addLog('', 'clienteinGM: ' . json_encode($clienteinGM));
|
||||
$cliente = $clienteinGM;
|
||||
@@ -5892,7 +5892,7 @@ Route::get('/testclientegm/{id}', function ($id) {
|
||||
echo 'myidInternet:' . $myidInternet;
|
||||
|
||||
if ($myidInternet > 0) {
|
||||
$clienteinGM = Clientegm::where('IdInternet', $myidInternet)->first();
|
||||
$clienteinGM = getClienteByIdInternet($myidInternet);
|
||||
// write in the console the array "$clients"
|
||||
|
||||
if ($clienteinGM) {
|
||||
|
||||
Reference in New Issue
Block a user