aa
This commit is contained in:
@@ -75,8 +75,11 @@ function setPreOrder($sku, $aggiornapreordine, $debug)
|
||||
|
||||
// showarray($article);
|
||||
|
||||
if ($debug)
|
||||
if ($debug) {
|
||||
echo "Product: " . $sku;
|
||||
showarray($product);
|
||||
}
|
||||
|
||||
|
||||
$campoPreOrder = '_wpro_variable_is_preorder';
|
||||
|
||||
@@ -157,7 +160,7 @@ function setPreOrder($sku, $aggiornapreordine, $debug)
|
||||
}
|
||||
|
||||
$variation = Variation::update($idprodotto, $product['id'], $data);
|
||||
// Product::update($idprodotto, $data);
|
||||
|
||||
if ($variation) {
|
||||
if ($debug)
|
||||
echo "Aggiornato Preorder: [ParentId=" . $idprodotto . '] ProdId= ' . $product['id'] . ' ' . $variation['name'] . "<br>";
|
||||
@@ -173,11 +176,11 @@ function setPreOrder($sku, $aggiornapreordine, $debug)
|
||||
}
|
||||
}
|
||||
|
||||
function isArticleInPrevendita($idarticolo) {
|
||||
function isArticleInPrevendita($sku) {
|
||||
|
||||
$product = Product::where('sku', $idarticolo)->first();
|
||||
$product = Product::where('sku', $sku)->first();
|
||||
|
||||
$article = Article::where('IdArticolo', $idarticolo)->first();
|
||||
$article = Article::where('IdArticolo', $sku)->first();
|
||||
|
||||
$qtaneg = $article->QtaDisponibile < 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user