diff --git a/app/Services/Web/PreisePageData.php b/app/Services/Web/PreisePageData.php index 1cad6883..a10e687e 100644 --- a/app/Services/Web/PreisePageData.php +++ b/app/Services/Web/PreisePageData.php @@ -43,12 +43,11 @@ class PreisePageData 'boostCategory' => $staffel(config('credits.boost_category', [])), 'proofPdf' => (int) config('credits.proof_pdf'), 'creditPacks' => config('credits.packs', []), - // TODO: Lineup/Preise hängen am Bookings-/Magic-Link-Rework — final abstimmen. - 'morePaths' => [ - 'correction' => (int) config('credits.paths.correction'), - 'update' => (int) config('credits.paths.update'), - 'depublish' => (int) config('credits.depublish'), - ], + // Depublizieren wird als Direktkauf in Euro abgerechnet (Stripe- + // Checkout), nicht in Credits — gleiche Preisquelle wie der Kauf- + // Flow. Null/0 = Angebot deaktiviert, dann zeigt die Seite nichts. + // Korrektur/Update folgen erst mit dem Bookings-/Magic-Link-Rework. + 'depublicationPriceCents' => (int) config('billing.depublication_price_cents'), ]; } } diff --git a/lang/de/pricing.php b/lang/de/pricing.php index 440f0771..01e67785 100644 --- a/lang/de/pricing.php +++ b/lang/de/pricing.php @@ -95,12 +95,10 @@ return [ 'net' => 'netto', ], - // TODO: Diese Leistungen hängen am Magic-Link-/Bookings-Rework — Lineup - // und Preise final abstimmen, sobald die In-App-Seite steht. + // Korrektur/Update folgen erst mit dem Magic-Link-/Bookings-Rework — + // bis dahin ist Depublizieren die einzige weitere Leistung. 'more' => [ 'title' => 'Weitere Leistungen', - 'correction' => 'Inhaltliche Korrektur', - 'update' => 'Update / Ergänzung', 'depublish' => 'Depublizieren', ], ], diff --git a/lang/en/pricing.php b/lang/en/pricing.php index 59a70cf7..5ad0f838 100644 --- a/lang/en/pricing.php +++ b/lang/en/pricing.php @@ -92,8 +92,6 @@ return [ 'more' => [ 'title' => 'Further services', - 'correction' => 'Content correction', - 'update' => 'Update / addition', 'depublish' => 'Unpublish', ], ], diff --git a/resources/views/web/preise.blade.php b/resources/views/web/preise.blade.php index f1dc1c36..1568d12f 100644 --- a/resources/views/web/preise.blade.php +++ b/resources/views/web/preise.blade.php @@ -7,7 +7,8 @@ Datenquellen (alles aus dem System, nichts hartkodiert): - Abos: Plan::active() -> $plans - Einzel-PM: config('billing.single_pm_price_cents') -> $singlePmPriceCents - - Add-ons: config('credits.*') -> $extraPm, $boost, $proofPdf, $creditPacks, $morePaths + - Add-ons: config('credits.*') -> $extraPm, $boost, $proofPdf, $creditPacks + - Depublizieren: config('billing.depublication_price_cents') -> $depublicationPriceCents (Direktkauf in Euro) Inhalte/Texte: lang/de/pricing.php + lang/en/pricing.php (Schlüssel pricing.*). @@ -261,25 +262,20 @@ - {{-- Weitere Leistungen — TODO: hängt am Bookings-/Magic-Link-Rework, - Lineup und Preise final abstimmen, sobald die In-App-Seite steht. --}} -
{{ __('pricing.vat_note') }}
diff --git a/tests/Feature/Web/PreisePageTest.php b/tests/Feature/Web/PreisePageTest.php index 1afcaf17..07c6f085 100644 --- a/tests/Feature/Web/PreisePageTest.php +++ b/tests/Feature/Web/PreisePageTest.php @@ -30,7 +30,20 @@ test('the pricing page renders the editorial shell with real plans, single pm an ->assertSeeText('7 Tage') // boost 7d aus config ->assertSeeText('10 Credits') // Credit-Paket p10 aus config ->assertSeeText('Depublizieren') - ->assertSeeText('35 Credits'); // depublish aus config + ->assertSee('35 €', false) // billing.depublication_price_cents (Direktkauf, keine Credits) + // Korrektur/Update gibt es noch nicht (folgen mit dem Magic-Link-Rework). + ->assertDontSeeText('Inhaltliche Korrektur') + ->assertDontSeeText('Update / Ergänzung'); +}); + +test('the pricing page hides the depublication offer without a configured price', function () { + /** @var TestCase $this */ + $this->seed(PlanSeeder::class); + config()->set('billing.depublication_price_cents', null); + + $this->get('https://businessportal24.test/de/preise') + ->assertSuccessful() + ->assertDontSeeText('Depublizieren'); }); test('the pricing page serves english content on the english edition', function () {