Sunnysideup\Ecommerce\Model\Address\ShippingAddress
Synopsis
class ShippingAddress
extends OrderAddress
{
- // members
- private static array $api_access = ;
- private static bool $allow_selection_of_previous_addresses_in_checkout = false;
- private static string $table_name = 'ShippingAddress';
- private static array $db = ;
- private static array $has_one = ;
- private static array $belongs_to = ;
- private static array $default_sort = ;
- private static array $indexes = ;
- private static array $casting = ;
- private static array $searchable_fields = ;
- private static array $required_fields = ;
- private static array $summary_fields = ;
- private static string $singular_name = 'Shipping Address';
- private static string $plural_name = 'Shipping Addresses';
- private static string $description = 'The address for delivery of the order.';
- // Inherited members from OrderAddress
- protected array $readOnlyFields;
- protected null|bool $_canEdit;
- protected null|bool $_canView;
- // methods
- public void fieldLabels()
- public void i18n_singular_name()
- public void i18n_plural_name()
- public FieldList getCMSFields()
- public string ShippingFullCountryName()
- public void getShippingFullCountryName()
- public FieldList getFields()
- public array getRequiredFields()
- // Inherited methods from OrderAddress
- public void i18n_singular_name()
- public void i18n_plural_name()
- public static string get_country_field_ID()
- public static string get_region_field_ID()
- public void addReadonlyField()
- public void removeReadonlyField()
- public string CMSEditLink()
- public void canCreate()
- public bool canView()
- public bool canEdit()
- public void canDelete()
- public FieldList scaffoldSearchFields()
- public void SetRegionFields()
- public void SetCountryFields()
- public string getFullName()
- public void FullName()
- public string FullString()
- public void getFullString()
- public string comparisonString()
- public BillingAddress|OrderAddress|ShippingAddress FillWithLastAddressFromMember()
- public null|Member getMemberFromOrder()
- public void MakeObsolete()
- public string RemoveLink()
- public string getJSONData()
- public void JSONData()
- public void debug()
- protected void onAfterWrite()
- protected void onBeforeWrite()
- protected FieldList getEcommerceFields()
- protected TextField getPostalCodeField()
- protected DropdownField getRegionField()
- protected DropdownField getCountryField()
- protected FieldList makeSelectedFieldsReadOnly()
- protected void baseClassLinkingToOrder()
- protected void fieldPrefix()
- // Inherited methods from OrderCached
- public void setOrderCached()
- public Order|null; getOrderCached()
Hierarchy
Tasks
Line | Task |
---|---|
406+ | : are there times when the Shipping rather than the Billing address should be linked? Copies the last address used by the member. |
452+ | : can wre write $this->getOrderCached() instead???? |
Members
private
- $allow_selection_of_previous_addresses_in_checkout — Sunnysideup\Ecommerce\Model\Address\bool
- $api_access
—
array
what variables are accessible through http://mysite.com/api/ecommerce/v1/ShippingAddress/. -
$belongs_to
standard SS static definition. -
$casting
standard SS variable. - $db
-
$default_sort
standard SS static definition. - $description
—
string
Standard SS variable. -
$has_one
standard SS static definition. -
$indexes
standard SS variable. -
$plural_name
standard SS variable. - $required_fields
—
array
standard SS variable. -
$searchable_fields
standard SS variable. -
$singular_name
standard SS variable. -
$summary_fields
standard SS variable. -
$table_name
standard SS variable.
protected
- $_canEdit
—
Sunnysideup\Ecommerce\Model\Address\null|bool
save edit status for speed's sake. - $_canView
—
Sunnysideup\Ecommerce\Model\Address\null|bool
save view status for speed's sake. - $orderCached — Sunnysideup\Ecommerce\Model\Order
- $orderCachedStatusID — int
- $readOnlyFields
—
array
There might be times when a modifier needs to make an address field read-only.
Methods
public
- ShippingFullCountryName() — returns the full name for the shipping country code saved.
- fieldLabels()
- getCMSFields()
- getFields() — Puts together the fields for the Order Form (and other front-end purposes).
- getRequiredFields() — Return which shipping fields should be required on {@link OrderFormAddress}.
- getShippingFullCountryName()
- i18n_plural_name()
- i18n_singular_name()
Inherited from Sunnysideup\Ecommerce\Model\Address\OrderAddress
protected
- baseClassLinkingToOrder() — returns the field prefix string for shipping addresses.
- fieldPrefix() — returns the field prefix string for shipping addresses.
- getCountryField() — put together a dropdown for the country field.
- getEcommerceFields()
- getPostalCodeField() — put together a textfield for a postal code field.
- getRegionField() — put together a dropdown for the region field.
- makeSelectedFieldsReadOnly() — makes selected fields into read only using the $this->readOnlyFields array.
- onAfterWrite() — standard SS method We "hackishly" ensure that the OrderID is set to the right value.
- onBeforeWrite() — standard SS Method saves the region code.
public
- CMSEditLink() — link to edit the record.
- FillWithLastAddressFromMember()
- FullName()
- FullString() — Casted variable returns the full strng of the record.
- JSONData()
- MakeObsolete() — make an address obsolete and include all the addresses that are identical.
- RemoveLink() — returns the link that can be used to remove (make Obsolete) an address.
- SetCountryFields() — Saves country - both shipping and billing fields are saved here for convenience sake (only one actually gets saved) NOTE: do not call this method SetCountry as this has a special meaning!
- SetRegionFields() — Saves region - both shipping and billing fields are saved here for convenience sake (only one actually gets saved) NOTE: do not call this method SetCountry as this has a special meaning! *.
- addReadonlyField() — sets a field to readonly state we use this when modifiers have been set that require a field to be a certain value for example - a PostalCode field maybe set in the modifier.
- canCreate()
- canDelete()
- canEdit() — Standard SS method This is an important method.
- canView() — Standard SS method This is an important method.
- comparisonString() — returns a string that can be used to find out if two addresses are the same.
- debug()
- getFullName() — Casted variable returns the full name of the person, e.g. "John Smith".
- getFullString()
- getJSONData() — converts an address into JSON.
- getMemberFromOrder() — find the member associated with the current Order and address.
- get_country_field_ID() — returns the id of the MAIN country field for template manipulation.
- get_region_field_ID() — returns the id of the MAIN region field for template manipulation.
- i18n_plural_name()
- i18n_singular_name()
- removeReadonlyField() — removes a field from the readonly state.
- scaffoldSearchFields() — Determine which properties on the DataObject are searchable, and map them to their default {@link FormField} representations. Used for scaffolding a searchform for {@link ModelAdmin}.