Back to Opencart

File catalog\model\localisation\geo_zone.php

docs/api/source-catalog.model.localisation.geo_zone.html

4.1.0.34.4 KB
Original Source

Namespaces

Classes

| 1: | <?php | | 2: | namespace Opencart\Catalog\Model\Localisation; | | 3: | /** | | 4: | * Class Geo Zone | | 5: | * | | 6: | * @package Opencart\Catalog\Model\Localisation | | 7: | */ | | 8: | class GeoZone extends \Opencart\System\Engine\Model { | | 9: | /** | | 10: | * Get Geo Zone | | 11: | * | | 12: | * @param int $geo_zone_id | | 13: | * @param int $country_id | | 14: | * @param int $zone_id | | 15: | * | | 16: | * @return array<string, mixed> | | 17: | */ | | 18: | public function getGeoZone(int $geo_zone_id, int $country_id, int $zone_id): array { | | 19: | $query = $this->db->query("SELECT * FROM " . DB\_PREFIX . "zone\_to\_geo\_zone WHERE geo\_zone\_id = '" . (int)$geo_zone_id . "' AND country_id = '" . (int)$country_id . "' AND (zone_id = '" . (int)$zone_id . "' OR zone_id = '0')"); | | 20: | | | 21: | return $query->row; | | 22: | } | | 23: | | | 24: | /** | | 25: | * Get Geo Zones | | 26: | * | | 27: | * @return array<string, mixed> | | 28: | */ | | 29: | public function getGeoZones(): array { | | 30: | $query = $this->db->query("SELECT * FROM " . DB\_PREFIX . "geo\_zone ORDER BY name"); | | 31: | | | 32: | return $query->rows; | | 33: | } | | 34: | } | | 35: | |

OpenCart API API documentation generated by ApiGen dev-master