\Checkout
Helper class for the checkout, contains tools used by all subcomponents of the checkout module.
- Author: i-lateral (http://www.i-lateral.com)
Synopsis
class Checkout
extends ViewableData
{
- // members
- private static boolean $show_tax = true;
- private static boolean $login_form = false;
- private static Boolean $simple_checkout = true;
- private static Boolean $guest_checkout = true;
- private static Boolean $click_and_collect = false;
- private static string $currency_symbol = "£";
- private static string $currency_code = "GBP";
- private static array $checkout_data = ;
- // methods
- public static PostageArea CreateFreePostageObject()
- public static string country_name_from_code()
- public Boolean GuestCheckout()
- public Boolean ClickAndCollect()
- public static Int getRandomNumber()
Hierarchy
Extends
- ViewableData
Tasks
Line | Task |
---|---|
127+ | This is a little hacky, ideally we need to find a cleaner way of dealing with postage options that doesn't involve unsaved database objects. |
Members
private
- $checkout_data
—
array
An array of data that can be populated and sent to payment providers. - $click_and_collect
—
Boolean
Allow users skip the - $currency_code
—
string
International 3 character currency code to use - $currency_symbol
—
string
Currency symbol used by default - $guest_checkout
—
Boolean
Allow users to checkout as a "guest" meaning they do not have to register/login - $login_form
—
boolean
Show login form in checkout process (useful if you have a user account module installed). - $show_tax
—
boolean
Seperate tax out in totals on the cart and summary. - $simple_checkout
—
Boolean
Set the checkout into "simple" mode, meaning that billing/ delivery forms and postage forms are disabled (EG users are sent direct to payment pages).
Methods
public
- ClickAndCollect() — Return guest click and collect status in a way that can be seen by templates
- CreateFreePostageObject() — Generate a free postage object we can use in our code.
- GuestCheckout() — Return guest checkout status in a way that can be seen by templates
- country_name_from_code() — Get the full translated country name from a 2 digit country code EG: GB
- getRandomNumber() — Generate a random number based on the current time, a random int and a third int that can be passed as a param.