feat(storefront): configure checkout summary type
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('storefront_website_types', function (Blueprint $table): void {
|
||||
$table->string('checkout_summary_type')->default('default')->after('header_type');
|
||||
});
|
||||
|
||||
DB::table('storefront_website_types')
|
||||
->where('codigo', 'onticket_multi_event')
|
||||
->update(['checkout_summary_type' => 'event']);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('storefront_website_types', function (Blueprint $table): void {
|
||||
$table->dropColumn('checkout_summary_type');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Domains\Core\Tenant\Services\AdminWebsiteTypeService;
|
||||
use App\Domains\Core\Tenant\Models\StorefrontWebsiteType;
|
||||
use App\Domains\Core\Tenant\Services\AdminWebsiteTypeService;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use RuntimeException;
|
||||
@@ -56,7 +56,11 @@ class WebsiteTypeSeeder extends Seeder
|
||||
|
||||
$shopItStorefront = StorefrontWebsiteType::query()->updateOrCreate(
|
||||
['codigo' => 'shopit'],
|
||||
['nombre' => 'ShopIt', 'header_type' => 'standard'],
|
||||
[
|
||||
'nombre' => 'ShopIt',
|
||||
'header_type' => 'standard',
|
||||
'checkout_summary_type' => StorefrontWebsiteType::CHECKOUT_SUMMARY_DEFAULT,
|
||||
],
|
||||
);
|
||||
|
||||
$shopItStorefront->extras()->updateOrCreate(
|
||||
@@ -85,12 +89,20 @@ class WebsiteTypeSeeder extends Seeder
|
||||
|
||||
$onTicketStorefront = StorefrontWebsiteType::query()->updateOrCreate(
|
||||
['codigo' => 'onticket'],
|
||||
['nombre' => 'OnTicket - evento único', 'header_type' => 'standard'],
|
||||
[
|
||||
'nombre' => 'OnTicket - evento único',
|
||||
'header_type' => 'standard',
|
||||
'checkout_summary_type' => StorefrontWebsiteType::CHECKOUT_SUMMARY_DEFAULT,
|
||||
],
|
||||
);
|
||||
|
||||
$multiEventStorefront = StorefrontWebsiteType::query()->updateOrCreate(
|
||||
['codigo' => 'onticket_multi_event'],
|
||||
['nombre' => 'OnTicket - múltiples eventos', 'header_type' => 'immersive'],
|
||||
[
|
||||
'nombre' => 'OnTicket - múltiples eventos',
|
||||
'header_type' => 'immersive',
|
||||
'checkout_summary_type' => StorefrontWebsiteType::CHECKOUT_SUMMARY_EVENT,
|
||||
],
|
||||
);
|
||||
|
||||
$multiEventStorefront->extras()->updateOrCreate(
|
||||
|
||||
Reference in New Issue
Block a user