\CartPage
A cart page for the frontend to display contents of a cart to a visitor.
Automatically created on install of the shop module, cannot be deleted by admin user
in the CMS. A required page for the shop module.
- Author: Frank Mullenger <frankmullenger@gmail.com>
- Copyright: Copyright (c) 2011, Frank Mullenger
Synopsis
class CartPage
extends Page
{
- // methods
- public void requireDefaultRecords()
- public Boolean canCreate()
- public Boolean canDelete()
- public void delete()
- public Boolean canDeleteFromLive()
- public FieldList getCMSActions()
- public FieldList getCMSFields()
Hierarchy
Extends
- Page
Methods
public
- canCreate() — Prevent CMS users from creating another cart page.
- canDelete() — Prevent CMS users from deleting the cart page.
- canDeleteFromLive() — Prevent CMS users from unpublishing the cart page.
- delete()
- getCMSActions() — To remove the unpublish button from the CMS, as this page must always be published
- getCMSFields() — Remove page type dropdown to prevent users from changing page type.
- requireDefaultRecords() — Automatically create a CheckoutPage if one is not found on the site at the time the database is built (dev/build).