Sunnysideup\Ecommerce\Pages\OrderConfirmationPageController
Synopsis
class OrderConfirmationPageController
extends CartPageController
{
- // members
- private static array $allowed_actions = ;
- private static bool $include_as_checkout_step = true;
- // Inherited members from CartPageController
- protected ArrayList $actionLinks;
- protected bool $workedOutMessagesAndActions;
- protected Order $currentOrder;
- protected bool $overrideCanView;
- protected bool $showCreateAccountForm;
- // methods
- public array showorder()
- public array retrieveorder()
- public array copyorder()
- public void CheckoutSteps()
- public int PercentageDone()
- public null|string PaymentHeader()
- public null|string PaymentMessage()
- public null|string PaymentMessageType()
- public null|bool OrderIsCancelled()
- public null|bool IsPaid()
- public null|bool PaymentIsPending()
- public null|array|OrderFormCancel CancelForm()
- public null|array|OrderFormFeedback FeedbackForm()
- public null|array|OrderFormPayment PaymentForm()
- public null|array|Form CustomerOrderStepForm()
- public string sendemail()
- protected void init()
- protected void onlyShowSubmittedOrders()
- protected void onlyShowUnsubmittedOrders()
- // Inherited methods from CartPageController
- public static void set_message()
- public void showorder()
- public array share()
- public array loadorder()
- public array saveorder()
- public array deleteorder()
- public array startneworder()
- public null|ArrayList ActionLinks()
- public string Message()
- public DataObject Order()
- public bool CanEditOrder()
- public bool CurrentOrderIsInCart()
- public bool ShowCreateAccountForm()
- public ShopAccountForm CreateAccountForm()
- protected void init()
- protected void setRetrievalOrderID()
- protected void clearRetrievalOrderID()
- protected void workOutMessagesAndActions()
- protected void isCartPage()
- protected bool isCheckoutPage()
- protected bool isOrderConfirmationPage()
- protected bool onlyShowSubmittedOrders()
- protected bool onlyShowUnsubmittedOrders()
Hierarchy
Tasks
Line | Task |
---|---|
129+ | : do we still need loadorder controller method???? |
Members
private
- $allowed_actions
- $include_as_checkout_step — Sunnysideup\Ecommerce\Pages\bool
protected
- $actionLinks
—
SilverStripe\ORM\ArrayList
This ArraList holds DataObjects with a Link and Title each.... - $currentOrder
—
Sunnysideup\Ecommerce\Model\Order
order currently being shown on this page. - $overrideCanView
—
Sunnysideup\Ecommerce\Pages\bool
show the order even if canView returns false. - $showCreateAccountForm — Sunnysideup\Ecommerce\Pages\bool
- $workedOutMessagesAndActions
—
Sunnysideup\Ecommerce\Pages\bool
to ensure messages and actions links are only worked out once...
Methods
protected
- init() — standard controller function.
- onlyShowSubmittedOrders() — Can this page only show Submitted Orders (e.g. OrderConfirmationPage) ?
- onlyShowUnsubmittedOrders() — Can this page only show Unsubmitted Orders (e.g. CartPage) ?
public
- CancelForm() — Returns the form to cancel the current order, checking to see if they can cancel their order first of all.
- CheckoutSteps() — Returns a dataobject set of the checkout steps if the OrderConfirmationPage is shown as part of the checkout process We repeat these here so that you can show the user that (s)he has reached the last step.
- CustomerOrderStepForm()
- FeedbackForm() — Returns the form for providing feedback about current order, checking to see if IsFeedbackEnabled is true first of all.
- IsPaid() — Is the Order paid? This can be useful for choosing what header to show.
- OrderIsCancelled()
- PaymentForm() — show the payment form.
- PaymentHeader()
- PaymentIsPending() — Are there any order Payments Pending This can be useful for choosing what header to show.
- PaymentMessage()
- PaymentMessageType()
- PercentageDone() — returns the percentage of checkout steps done (0 - 100).
- copyorder() — copies either the current order into the shopping cart.
- retrieveorder() — This is an additional way to look at an order.
- sendemail() — sends an order email, which can be specified in the URL and displays a sample email typically this link is opened in a new window.
- showorder() — This method exists just so that template sets CurrentOrder variable.
Inherited from Sunnysideup\Ecommerce\Pages\CartPageController
protected
- clearRetrievalOrderID() — we clear the retrieval Order ID.
- init()
- isCartPage()
- isCheckoutPage() — Is this a CheckoutPage or is it another type (CartPage / OrderConfirmationPage)?
- isOrderConfirmationPage() — Is this a OrderConfirmationPage or is it another type (CartPage / CheckoutPage)?
- onlyShowSubmittedOrders() — Can this page only show Submitted Orders (e.g. OrderConfirmationPage) ?
- onlyShowUnsubmittedOrders() — Can this page only show Unsubmitted Orders (e.g. CartPage) ?
- setRetrievalOrderID() — We set sesssion ID for retrieval of order in non cart setting.
- workOutMessagesAndActions() — work out the options for the user.
public
- ActionLinks() — This returns a ArraList, each dataobject has two vars: Title and Link.
- CanEditOrder()
- CreateAccountForm() — Returns the CreateAccountForm.
- CurrentOrderIsInCart() — Tells you if the order you are viewing at the moment is also in the cart.
- Message()
- Order()
- ShowCreateAccountForm() — Do we need to show the Create Account Form?
- deleteorder() — Delete the currently viewed order.
- loadorder() — Loads either the "current order""into the shopping cart.
- saveorder() — save the order to a member. If no member exists then create the member first using the ShopAccountForm.
- set_message()
- showorder()
- startneworder() — Start a new order.