Sunnysideup\Ecommerce\Pages\CheckoutPage
CheckoutPage is a CMS page-type that shows the order details to the customer for their current shopping cart on the site. It also lets the customer review the items in their cart, and manipulate them (add more, deduct or remove items completely). The most important thing is that the {@link CheckoutPage_Controller} handles the {@link OrderForm} form instance, allowing the customer to fill out their shipping details, confirming their order and making a payment.
Synopsis
class CheckoutPage
extends CartPage
{
- // members
- private static bool $hide_ancestor = CartPage::class;
- private static string $icon = 'sunnysideup/ecommerce: client/images/icons/CheckoutPage-file.gif';
- private static string $table_name = 'CheckoutPage';
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- private static string $singular_name = 'Checkout Page';
- private static string $plural_name = 'Checkout Pages';
- private static string $description = 'A page where the customer can view the current order (cart) and finalise (submit) the order. Every e-commerce site needs an Order Confirmation Page.';
- // methods
- public void i18n_singular_name()
- public void i18n_plural_name()
- public static null|Page find_terms_and_conditions_page()
- public static string find_link()
- public static string find_last_step_link()
- public static string find_next_step_link()
- public static string get_checkout_order_link()
- public bool canCreate()
- public bool canEdit()
- public bool canDelete()
- public bool canPublish()
- public FieldList getCMSFields()
- public void requireDefaultRecords()
- protected GridField getOrderModifierDescriptionField()
- protected GridField getCheckoutStepDescriptionField()
- // Inherited methods from CartPage
- public void i18n_singular_name()
- public void i18n_plural_name()
- public bool canCreate()
- public bool canEdit()
- public bool canDelete()
- public bool canPublish()
- public FieldList getCMSFields()
- public static string find_link()
- public static string new_order_link()
- public static string copy_order_link()
- public static int|string get_order_link()
- public string getOrderLink()
- public bool IsEcommercePage()
- public string EcommerceMenuTitle()
- public string OriginalMenuTitle()
- public string LinkingMode()
- public string LinkOrSection()
- public string LinkOrCurrent()
- // Inherited methods from OrderCached
- public void setOrderCached()
- public Order|null; getOrderCached()
Hierarchy
Tasks
Line | Task |
---|---|
56+ | get rid of all the messages... |
Members
private
- $db
- $defaults
—
array
standard SS variable. - $description
—
string
Standard SS variable. - $has_one
—
array
standard SS variable. - $hide_ancestor
—
Sunnysideup\Ecommerce\Pages\bool
standard SS variable. - $icon
—
string
standard SS variable. - $plural_name
—
string
standard SS variable. - $singular_name
—
string
standard SS variable. - $table_name
—
array
standard SS variable.
protected
- $orderCached — Sunnysideup\Ecommerce\Model\Order
- $orderCachedStatusID — int
Methods
protected
public
- canCreate() — Standard SS function, we only allow for one checkout page to exist but we do allow for extensions to exist at the same time.
- canDelete() — Standard SS method.
- canEdit() — Shop Admins can edit.
- canPublish() — Standard SS method.
- find_last_step_link() — Returns the link or the Link to the Checkout page on this site for the last step.
- find_link() — Returns the link or the Link to the Checkout page on this site.
- find_next_step_link() — Returns the link to the next step.
- find_terms_and_conditions_page() — Returns the Terms and Conditions Page (if there is one).
- getCMSFields() — Standard SS function.
- get_checkout_order_link() — Returns the link to the checkout page on this site, using a specific Order ID that already exists in the database.
- i18n_plural_name()
- i18n_singular_name()
- requireDefaultRecords()
Inherited from Sunnysideup\Ecommerce\Pages\CartPage
public
- EcommerceMenuTitle()
- IsEcommercePage() — tells us if the current page is part of e-commerce.
- LinkOrCurrent() — standard SS method for use in templates.
- LinkOrSection() — standard SS method for use in templates.
- LinkingMode() — standard SS method for use in templates.
- OriginalMenuTitle() — The original menu title of the page.
- canCreate() — Standard SS function, we only allow for one CartPage page to exist but we do allow for extensions to exist at the same time.
- canDelete() — Standard SS method.
- canEdit() — Shop Admins can edit.
- canPublish() — Standard SS method.
- copy_order_link() — Returns the "copy order" link.
- find_link() — Returns the Link to the CartPage on this site.
- getCMSFields()
- getOrderLink() — Return a link to view the order on this page.
- get_order_link() — Return a link to view the order on this page.
- i18n_plural_name()
- i18n_singular_name()
- new_order_link() — Returns the "new order" link.