SilverShop\Shipping\Model\TableShippingRate
Adds extra metric ranges to restrict with, rather than just region.
Synopsis
class TableShippingRate
extends RegionRestriction
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $summary_fields = ;
- private static string $default_sort = "\"Country\" ASC, \"State\" ASC, \"City\" ASC, \"PostalCode\" ASC, \"Rate\" ASC";
- private static string $table_name = 'SilverShop_TableShippingRate';
- // methods
- public void getCMSFields()
- // Inherited methods from RegionRestriction
- public static array parse_uk_postcode()
- public static void filteredByAddress()
- public static array getAddressFilters()
- public static void get_table_field_types()
- public static void wildcard_sort()
- public void onBeforeWrite()
Hierarchy
Tasks
Line | Task |
---|---|
164 | prevent non-heirarichal entries, eg country = '*', then state = 'blah' |
Members
private
- $db
- $default_sort
- $has_one
- $summary_fields
- $table_name
Methods
public
Inherited from SilverShop\Shipping\Model\RegionRestriction
public
- filteredByAddress() — Produce a SQL filter to get matching RegionRestrictions to a given address
- getAddressFilters()
- get_table_field_types()
- onBeforeWrite()
- parse_uk_postcode() — Parses a UK postcode to give you the different sections TODO: Very specific functionality. Consider moving this to a separate module
- wildcard_sort() — Produces a sort check to make wildcards come last.