\CountryPrice
Holds prices for individual countries for Buyables.
Synopsis
class CountryPrice
extends DataObject
{
- // members
- private static array $db = ;
- private static array $field_labels = ;
- private static array $summary_fields = ;
- private static array $casting = ;
- private static array $indexes = ;
- private static array $searchable_fields = ;
- private EcommerceCountry $_myBuyable = NULL;
- private EcommerceCountry $_myCountryObject = NULL;
- private static $cms_object = NULL;
- private static String $location_param = 'Location';
- private static String $location_country;
- // methods
- public void Buyable()
- public void CountryObject()
- public void CurrencyObject()
- public String getBuyableName()
- public String getTitle()
- public String getCountryName()
- public String getFullPrice()
- public void getCMSFields()
- public static void set_cms_object()
- public void canEdit()
- protected ValidationResult validate()
- public Boolean isObsolete()
- public static string get_location_country()
Hierarchy
Extends
- DataObject
Members
private
- $_myBuyable
—
EcommerceCountry
caching only variable - $_myCountryObject
—
EcommerceCountry
caching only variable - $casting
- $cms_object
- $db
- $field_labels
- $indexes
- $location_country
—
String
country for user - $location_param
—
String
name of session variable used to set Country - $searchable_fields
- $summary_fields
Methods
protected
- validate() — We use validate as an onBeforeWrite as well because in this case it makes sense as in the validation process we add stuff...
public
- Buyable() — the buyable we relate to return DataObject | null
- CountryObject() — return EcommerceCountry | null
- CurrencyObject() — return EcommerceCountry | null
- canEdit()
- getBuyableName() — casted variable
- getCMSFields()
- getCountryName() — casted variable
- getFullPrice() — casted variable returns nicely formatted price..
- getTitle() — casted variable
- get_location_country() — returns Country code
- isObsolete() — Returns if the currency is an old currency not used anymore.
- set_cms_object()