diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index 9ff99fae..63ddf9ca 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -131,6 +131,7 @@ function setPreOrder($sku, $aggiornapreordine, $debug) } $idprodotto = $product['parent_id']; + if ($aggiornapreordine === '1') { $data = []; @@ -189,8 +190,8 @@ function setPreOrder($sku, $aggiornapreordine, $debug) echo "Aggiornato Preorder: [ParentId=" . $idprodotto . '] ProdId= ' . $product['id'] . ' ' . $variation['name'] . "
"; } } - } else if ($aggiornapreordine === '1') { - + } else if ($aggiornapreordine === '-1') { + if ($idprodotto > 0) { $variations = Variation::all($product['parent_id']);