Sunnysideup\Ecommerce\Pages\AccountPage
The Account Page allows the user to update their details.
Synopsis
class AccountPage
extends Page
{
- // members
- protected integer $calculatedTotal = 0;
- protected integer $calculatedPaid = 0;
- protected integer $calculatedOutstanding = 0;
- protected DataList $pastOrders;
- private static string $table_name = 'AccountPage';
- private static array $casting = ;
- private static string $icon = 'sunnysideup/ecommerce: client/images/icons/AccountPage-file.gif';
- private static string $singular_name = 'Account Page';
- private static string $plural_name = 'Account Pages';
- private static string $description = 'A page where the customer can view all their orders and update their details.';
- // methods
- public bool canCreate()
- public bool canEdit()
- public bool canDelete()
- public bool canPublish()
- public void i18n_singular_name()
- public void i18n_plural_name()
- public static string find_link()
- public DataList PastOrders()
- public float getRunningTotal()
- public void RunningTotal()
- public float getRunningPaid()
- public void RunningPaid()
- public float getRunningOutstanding()
- public void RunningOutstanding()
- public bool IsEcommercePage()
- protected void calculatePastOrders()
- protected DataList pastOrdersSelection()
Hierarchy
Extends
- Page
Members
private
- $casting
—
array
standard SS variable. - $description
—
string
Standard SS variable. - $icon
—
string
Standard SS variable. - $plural_name
—
string
standard SS variable. - $singular_name
—
string
standard SS variable. - $table_name
protected
- $calculatedOutstanding — float
- $calculatedPaid — float
- $calculatedTotal — float
- $pastOrders — SilverStripe\ORM\DataList
Methods
protected
- calculatePastOrders() — retrieves previous orders and adds totals to it...
- pastOrdersSelection()
public
- IsEcommercePage() — tells us if the current page is part of e-commerce.
- PastOrders() — Returns a list of all previous orders for the member / account.
- RunningOutstanding()
- RunningPaid()
- RunningTotal()
- canCreate() — Standard SS function, we only allow for one AccountPage 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_link() — Returns the link to the AccountPage on this site.
- getRunningOutstanding() — casted variable.
- getRunningPaid() — casted variable.
- getRunningTotal() — casted variable.
- i18n_plural_name()
- i18n_singular_name()