Initial import: Carteasy Shop (Dev-Stand)

This commit is contained in:
Thomas Bartelt
2026-04-20 01:03:43 +02:00
commit d504f8a05d
3845 changed files with 761050 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
class ShippingAreaHelper {
public static function get_shipping_area_by_country_id($country_id,$customer_group_id = false) {
$db = Registry::get('base')->db;
$sql = "SELECT shipping_area_id
FROM countries
WHERE id=".$db->real_escape_string($country_id);
$result = $db->query($sql);
$shipping_area_id = false;
if ($result->num_rows > 0) {
$shipping_area_id = $result->fetch_object()->shipping_area_id;
}
if ($customer_group_id) {
$sql = "SELECT * FROM country_customergroup_shippingarea
WHERE country_id = $country_id AND customer_group_id = $customer_group_id";
$result = $db->query($sql);
if ($result->num_rows > 0) {
$shipping_area_id = $result->fetch_object()->shipping_area_id;
}
}
return $shipping_area_id;
}
}