aa
This commit is contained in:
@@ -20,6 +20,8 @@ use Illuminate\Support\Facades\DB;
|
||||
|
||||
use App\Helpers\MyConfig;
|
||||
|
||||
MyConfig::init();
|
||||
|
||||
class ProductUpdateQta extends Command
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,8 @@ use Illuminate\Support\Facades\Request;
|
||||
|
||||
use App\Helpers\MyConfig;
|
||||
|
||||
MyConfig::init();
|
||||
|
||||
setlocale(LC_TIME, 'it_IT.UTF-8');
|
||||
|
||||
function showarray($array)
|
||||
@@ -128,11 +130,6 @@ function setPreOrder($sku, $aggiornapreordine, $debug)
|
||||
// Aggiorna Preorder
|
||||
$product = Product::where('sku', $sku)->first();
|
||||
|
||||
// get the article by product
|
||||
// $article = Article::where('IdArticolo', $idarticolo)->first();
|
||||
|
||||
// showarray($article);
|
||||
|
||||
if ($debug) {
|
||||
echo "Product: " . $sku;
|
||||
showarray($product);
|
||||
|
||||
@@ -8,11 +8,11 @@ class MyConfig
|
||||
static public $qtaMinima;
|
||||
static public $campoPreordine;
|
||||
|
||||
public function __construct()
|
||||
// Metodo statico per inizializzare i valori
|
||||
public static function init()
|
||||
{
|
||||
self::$qtaInPrevendita = config('preordini.QTA_IN_PREVENDITA');
|
||||
self::$qtaMinima = config('preordini.QTA_MINIMA_PER_PREVENDITA');
|
||||
self::$campoPreordine = config('preordini.CAMPO_PREORDINE');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user