Sunnysideup\Ecommerce\Pages\CheckoutPageController
Synopsis
class CheckoutPageController
extends CartPageController
{
- // members
- protected string $currentStep = '';
- protected array $steps = ;
- private static array $allowed_actions = ;
- private static array $checkout_steps = ;
- private static array $ajaxify_steps = ;
- // Inherited members from CartPageController
- protected ArrayList $actionLinks;
- protected bool $workedOutMessagesAndActions;
- protected Order $currentOrder;
- protected bool $overrideCanView;
- protected bool $showCreateAccountForm;
- // methods
- public ArrayList ModifierForms()
- public OrderForm OrderFormAddress()
- public OrderForm OrderForm()
- public bool CanCheckout()
- public void ModifierForm()
- public void CheckoutSteps()
- public string StepsContentHeading()
- public string StepsContentAbove()
- public string StepsContentBelow()
- public array checkoutstep()
- public bool HasCheckoutSteps()
- public bool CanShowStep()
- public bool ShowOnlyCurrentStep()
- public bool IsFinalStep()
- public int PercentageDone()
- protected void init()
- protected int currentStepNumber()
- protected int numberOfSteps()
- protected void applyStepRules()
- // 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
- $ajaxify_steps — array
- $allowed_actions
- $checkout_steps — array
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. - $currentStep — string
- $overrideCanView
—
Sunnysideup\Ecommerce\Pages\bool
show the order even if canView returns false. - $showCreateAccountForm — Sunnysideup\Ecommerce\Pages\bool
- $steps — array
- $workedOutMessagesAndActions
—
Sunnysideup\Ecommerce\Pages\bool
to ensure messages and actions links are only worked out once...
Methods
protected
- applyStepRules() — Here are some additional rules that can be applied to steps.
- currentStepNumber() — returns the number of the current step (e.g. step 1).
- init() — Standard SS function if set to false, user can edit order, if set to true, user can only review order.
- numberOfSteps() — returns the total number of steps (e.g. 3) we add one for the confirmation page.
public
- CanCheckout() — Can the user proceed? It must be an editable order (see @see CartPage) and is must also contain items.
- CanShowStep()
- CheckoutSteps() — returns a dataobject set of the steps.
- HasCheckoutSteps() — when you extend the CheckoutPage you can change this...
- IsFinalStep() — Is this the final step in the process?
- ModifierForm() — Catch for incompatable coding only....
- ModifierForms() — Returns a ArrayList of {@link OrderModifierForm} objects. These forms are used in the OrderInformation HTML table for the user to fill in as needed for each modifier applied on the site.
- OrderForm() — Returns a form allowing a user to enter their details to checkout their order.
- OrderFormAddress() — Returns a form allowing a user to enter their details to checkout their order.
- PercentageDone() — returns the percentage of steps done (0 - 100).
- ShowOnlyCurrentStep() — Is this the final step in the process.
- StepsContentAbove() — returns the top of the page content for the Checkout Step.
- StepsContentBelow() — returns the bottom of the page content for the Checkout Step.
- StepsContentHeading() — returns the heading for the Checkout Step.
- checkoutstep() — sets the current checkout step if it is ajax it returns the current controller as the inner for the page.
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.