tt
This commit is contained in:
@@ -6056,23 +6056,29 @@ Route::get('/provapao', [TestPaoController::class, 'provapao']);
|
||||
|
||||
|
||||
Route::get('/aggiornapreorder/{idarticolo}/{postid}', function ($idarticolo, $postid) {
|
||||
$product = Product::where('sku', $idarticolo)->first();
|
||||
try {
|
||||
// Aggiorna Preorder
|
||||
$product = Product::where('sku', $idarticolo)->first();
|
||||
|
||||
if ($product) {
|
||||
dd($product);
|
||||
if ($product) {
|
||||
dd($product);
|
||||
|
||||
$metadata = WpPostMeta::where('post_id', postid)->get();
|
||||
$metadata = WpPostMeta::where('post_id', $postid)->get();
|
||||
|
||||
if ($metadata) {
|
||||
dd($metadata);
|
||||
if ($metadata) {
|
||||
dd($metadata);
|
||||
}
|
||||
|
||||
|
||||
$aggiorna = false;
|
||||
|
||||
if ($aggiorna) {
|
||||
Product::update($product->id, $data);
|
||||
}
|
||||
} else {
|
||||
echo "Il prodotto non esiste";
|
||||
}
|
||||
|
||||
$aggiorna = false;
|
||||
|
||||
if ($aggiorna) {
|
||||
Product::update($product->id, $data);
|
||||
}
|
||||
} else {
|
||||
echo "Il prodotto non esiste";
|
||||
} catch (Exception $e) {
|
||||
echo "Errore: " . $e->getMessage();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user