sku
parent
644be10419
commit
665e2b11cf
|
|
@ -161,6 +161,9 @@ class ProductSku extends Model
|
|||
public function getSaleableStockAttribute(): int
|
||||
{
|
||||
if ($this->isOnline()) {
|
||||
if ($this->is_pre_sale || $this->spu->is_pre_sale) {
|
||||
return 99999;
|
||||
}
|
||||
return $this->attributes['stock'];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ class AddIsPreSaleToProductSpus extends Migration
|
|||
Schema::table('product_spus', function (Blueprint $table) {
|
||||
$table->dropColumn(['is_pre_sale']);
|
||||
});
|
||||
// Schema::table('product_skus', function (Blueprint $table) {
|
||||
// $table->dropColumn(['is_pre_sale']);
|
||||
// });
|
||||
Schema::table('product_skus', function (Blueprint $table) {
|
||||
$table->dropColumn(['is_pre_sale']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue