Sunnysideup\Ecommerce\Api\EcommerceCountryVisitorCountryProvider
this is a very basic class with as its sole purpose providing the country of the customer.
By default we are using the GEOIP class
but you can switch it to your own system by changing
the classname in the ecommerce.yml config file.
Synopsis
class EcommerceCountryVisitorCountryProvider
implements
EcommerceGEOipProvider
{
- // members
- private static string $country_provider = '\\Sunnysideup\\Geoip\\Geoip';
- // methods
- public static void ip2country()
- public string getCountry()
- public void getIP()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Implements
Members
private
- $country_provider
Methods
public
- getCountry()
- getIP() — returns string of IP address.
- ip2country()