public function requireDefaultRecords() { parent::requireDefaultRecords(); $checkoutPage = CheckoutPage::get()->first(); if (!$checkoutPage) { $checkoutPage = CheckoutPage::create(); $checkoutPage->Title = "Checkout"; $checkoutPage->MenuTitle = "Checkout"; $checkoutPage->URLSegment = "checkout"; $checkoutPage->writeToStage("Stage"); $checkoutPage->publish("Stage", "Live"); } }
public function requireDefaultRecords() { parent::requireDefaultRecords(); $checkoutPage = CheckoutPage::get()->first(); if ($checkoutPage) { $orderConfirmationPage = OrderConfirmationPage::get()->first(); if (!$orderConfirmationPage) { $orderConfirmationPage = OrderConfirmationPage::create(); $orderConfirmationPage->Title = "Order Confirmation"; $orderConfirmationPage->MenuTitle = "Order Confirmation"; $orderConfirmationPage->URLSegment = "order-confirmation"; $orderConfirmationPage->writeToStage("Stage"); $orderConfirmationPage->publish("Stage", "Live"); } } }