aa
This commit is contained in:
@@ -2285,6 +2285,8 @@ Route::get('/test9/{name}', function ($name) {
|
|||||||
|
|
||||||
Route::post('/updatecreate', function (Request $request) {
|
Route::post('/updatecreate', function (Request $request) {
|
||||||
|
|
||||||
|
// WEBHOOK DA GESTPAY A WOOCOMMERCE
|
||||||
|
|
||||||
//dd($webhook);
|
//dd($webhook);
|
||||||
|
|
||||||
|
|
||||||
@@ -6125,10 +6127,14 @@ Route::get('/aggiornapreorder/{idarticolo}/{aggiornapreordine}', function ($idar
|
|||||||
if ($variation->id == $product['id']) {
|
if ($variation->id == $product['id']) {
|
||||||
// convert object into array
|
// convert object into array
|
||||||
$data = json_decode(json_encode($variation), true);
|
$data = json_decode(json_encode($variation), true);
|
||||||
|
$variation->save();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$old = false;
|
||||||
|
|
||||||
|
if ($old) {
|
||||||
echo "Data:";
|
echo "Data:";
|
||||||
showarray($data);
|
showarray($data);
|
||||||
|
|
||||||
@@ -6151,6 +6157,7 @@ Route::get('/aggiornapreorder/{idarticolo}/{aggiornapreordine}', function ($idar
|
|||||||
showarray($data);
|
showarray($data);
|
||||||
|
|
||||||
$variation = Variation::update($idprodotto, $product['id'], $data);
|
$variation = Variation::update($idprodotto, $product['id'], $data);
|
||||||
|
}
|
||||||
// Product::update($idprodotto, $data);
|
// Product::update($idprodotto, $data);
|
||||||
if ($variation) {
|
if ($variation) {
|
||||||
echo "Aggiornato Preorder: [ParentId=" . $idprodotto . '] ProdId= ' . $product['id'] . ' ' . $variation['name'] . "<br>";
|
echo "Aggiornato Preorder: [ParentId=" . $idprodotto . '] ProdId= ' . $product['id'] . ' ' . $variation['name'] . "<br>";
|
||||||
|
|||||||
Reference in New Issue
Block a user