Trenne Shop sichtbar und Checkout offen und kaufe nur noch ueber die Kasse
- Zwei Schalter: Shop::visible (SHOP_PUBLIC) und Shop::checkoutOpen; ist der Shop nur sichtbar, fuehren Warenkorb, Kasse und Jetzt kaufen auf eine Hinweisseite (noindex), ohne Warenkorb und Bestellung - Einzelkauf (Checkout::place, Route member.offers.buy) entfernt; Bestellung nur aus dem Warenkorb - Jetzt kaufen an der Produktseite oeffnet die Bestellübersicht, Bereits erworben auf der Produktseite - Menuepunkte in den Shop nur bei sichtbarem Shop, /angebote leitet auf /shop, Seeder fuehrt Shop - Mitgliederseite Angebote zeigt nur kostenlose Angebote zum Uebernehmen - Middleware EnsureCheckoutOpen laeuft vor der Anmeldepruefung - Plan und ADR-53, DEPLOYMENT.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
28e3342b1f
commit
3d76062097
36 files changed
+756
-150
No files matched your search
@@ -8,7 +8,9 @@
|
||||
use App\Domain\Cms\PageTemplates;
|
||||
use App\Domain\Cms\Sections\SectionRenderer;
|
||||
use App\Domain\Cms\Widgets\RenderContext;
|
||||
use App\Domain\Commerce\Shop;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
@@ -24,6 +26,15 @@ public function show(string $path): View
|
||||
return $this->render(Page::query()->where('path', '/'.$path)->firstOrFail(), preview: false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Die frühere Angebotsseite der Website ist der Shop. Solange er nicht sichtbar ist, bleibt eine noch vorhandene
|
||||
* CMS-Seite unter dieser Adresse erreichbar (sonst 404).
|
||||
*/
|
||||
public function offers(): View|RedirectResponse
|
||||
{
|
||||
return Shop::visible() ? redirect()->route('shop') : $this->show('angebote');
|
||||
}
|
||||
|
||||
public function preview(PageRevision $revision): View
|
||||
{
|
||||
$page = $revision->page;
|
||||
|
||||
Reference in new issue
Block a user