/** * Automatically create a CheckoutPage if one is not found * on the site at the time the database is built (dev/build). */ function requireDefaultRecords() { parent::requireDefaultRecords(); if (!DataObject::get_one('CartPage')) { $page = new CartPage(); $page->Title = 'Cart'; $page->Content = ''; $page->URLSegment = 'cart'; $page->ShowInMenus = 0; $page->writeToStage('Stage'); $page->publish('Stage', 'Live'); DB::alteration_message("Cart page 'Cart' created", 'created'); } }