+{% endblock %}
diff --git a/wp-content/themes/cosmopet/templates/where_to_buy/template_wtb.php b/wp-content/themes/cosmopet/templates/where_to_buy/template_wtb.php
index f341475..2fe3ee0 100644
--- a/wp-content/themes/cosmopet/templates/where_to_buy/template_wtb.php
+++ b/wp-content/themes/cosmopet/templates/where_to_buy/template_wtb.php
@@ -1,502 +1,136 @@
-
-
-
-
-
-
-
-
-
Where to Buy
-
Looking for Cosmopet products in stores? You can find our premium pet treats in select pet shops and retail stores across the UAE.
-
-
-
-
-
-
-
-
-
📍 Find us at:
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+// Инициализация Timber
+$context = Timber::context();
+
+// Подключение стилей
+wp_enqueue_style('gp-wtb-style', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-core.css?v=1.14');
+wp_enqueue_style('gp-wtb-style-dt', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-desktop.css?v=1.22');
+wp_enqueue_style('gp-wtb-style-tb', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-tablet.css?v=1.22');
+wp_enqueue_style('gp-wtb-style-mb', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-mobile.css?v=1.122');
+
+// Получение данных маркеров из ACF
+$locations = get_field('location_markers') ?: [];
+$acf_locations = array_map(function($location) {
+ return [
+ 'title' => $location['title'],
+ 'address' => $location['address'],
+ 'url' => $location['website'],
+ 'latitude' => isset($location['latitude']) ? (float)$location['latitude'] : null,
+ 'longitude' => isset($location['longitude']) ? (float)$location['longitude'] : null
+ ];
+}, $locations);
+
+// Предопределенные данные локаций
+$predefined_locations = [
+ [
+ 'title' => 'Roots Supermarket',
+ 'address' => 'Waves Grande, Retail unit 1-2 Shobha Hartland, Dubai DU United Arab Emirates',
+ 'position' => ['lat' => 25.1896, 'lng' => 55.3662],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Pawdy Neighbors',
+ 'address' => 'Souk Al Manzil - Old Town Downtown, Dubai, United Arab Emirates',
+ 'position' => ['lat' => 25.1915, 'lng' => 55.2758],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'The Pet Co',
+ 'address' => 'Tower A, Shop 01, Prime Business Centre, JVC, Dubai, UAE',
+ 'position' => ['lat' => 25.0580, 'lng' => 55.2282],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Ivy Secret Garden',
+ 'address' => 'Al Wasl Warehouse Complex, Unit 14 - 26th St - Al Quoz Industrial Area 4 - Dubai',
+ 'position' => ['lat' => 25.1416, 'lng' => 55.2358],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Petzone',
+ 'address' => 'Petzone Sheikh Zayed Road - Petzone Umm Suqeim',
+ 'position' => ['lat' => 25.1530, 'lng' => 55.2145],
+ 'url' => 'https://petzone.com/uae/en/'
+ ],
+ [
+ 'title' => 'Pet Corner',
+ 'address' => 'Pet Corner Sheikh Zayed Road, Al Fardan Building 1, Sheikh Zayed Road, Next to Deals on Wheels & Business Bay Metro Station',
+ 'position' => ['lat' => 25.1868, 'lng' => 55.2527],
+ 'url' => 'https://petcornerdubai.com/'
+ ],
+ [
+ 'title' => 'Pet Corner Motor City - Dubai',
+ 'address' => 'Unit R7, Fox Hill 8, Motor City, Opposite Arabian Ranches',
+ 'position' => ['lat' => 25.0499, 'lng' => 55.2350],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Pet Corner Jumeirah Golf Estates - Dubai',
+ 'address' => 'Shop No. 7, The Fairway Mall Jumeirah Golf Estates Dubai',
+ 'position' => ['lat' => 25.0394, 'lng' => 55.2269],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Pet Corner Khalifa City - Abu Dhabi',
+ 'address' => 'Shop No 5, Al Raha Gardens, Khalifa City Abu Dhabi',
+ 'position' => ['lat' => 24.4243, 'lng' => 54.5754],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Pet Corner- Sharjah Al Mamsha',
+ 'address' => 'Al Sharjah, University Road',
+ 'position' => ['lat' => 25.3126, 'lng' => 55.4783],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Pet Corner Fujairah- Lulu Mall',
+ 'address' => 'Al - Korthabah Road - Fujairah City Center - Fujairah',
+ 'position' => ['lat' => 25.1221, 'lng' => 56.3244],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Tail Waggin Al Quoz',
+ 'address' => 'Warehouse 7, Street 8, Al Khail Road, Al Quoz 1, Dubai, United Arab Emirates',
+ 'position' => ['lat' => 25.1368, 'lng' => 55.2364],
+ 'url' => ''
+ ],
+ [
+ 'title' => "Tail Waggin' Pet Spa Dubai Hills",
+ 'address' => 'SWAY Residences, Retail 2 - near Kings College Hospital Dubai Hills Estate - Dubai - United Arab Emirates',
+ 'position' => ['lat' => 25.1276, 'lng' => 55.2714],
+ 'url' => ''
+ ],
+ [
+ 'title' => 'Goofy Groom',
+ 'address' => 'Dubai, UAE Midtown Central Majan, Shop G-17',
+ 'position' => ['lat' => 25.0834, 'lng' => 55.1743],
+ 'url' => ''
+ ]
+];
+
+// Получение изображений из галереи ACF
+$partners_logos = get_field('partners_logos') ?: [];
+$partners_logos_formatted = array_map(function($image) {
+ return [
+ 'url' => esc_url($image['title']),
+ 'src' => esc_url($image['sizes']['medium']),
+ 'alt' => esc_attr($image['alt'])
+ ];
+}, $partners_logos);
+
+// Добавление данных в контекст
+$context['acf_locations'] = $acf_locations;
+$context['predefined_locations'] = $predefined_locations;
+$context['partners_logos'] = $partners_logos_formatted;
+
+// Отключение автопараграфов для Contact Form 7
+add_filter('wpcf7_autop_or_not', '__return_false');
+
+// Рендеринг шаблона
+Timber::render('templates/where_to_buy/wtb.twig', $context);
+?>
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/templates/where_to_buy/wtb.twig b/wp-content/themes/cosmopet/templates/where_to_buy/wtb.twig
index e69de29..06119f0 100644
--- a/wp-content/themes/cosmopet/templates/where_to_buy/wtb.twig
+++ b/wp-content/themes/cosmopet/templates/where_to_buy/wtb.twig
@@ -0,0 +1,365 @@
+{% set bodyClass = 'main-np' %}
+
+{% extends 'layout.twig' %}
+
+{% block content %}
+
+
+
+
+
+
Where to Buy
+
Looking for Cosmopet products in stores? You can find our premium pet treats in select pet shops and retail stores across the UAE.
+
+
+
+
+
+
+
+
+
+
+
📍 Find us at:
+
+ {% for item in acf_locations %}
+ -
+
+ {% if item.url %}
+ {{ item.title }}
+ {% else %}
+ {{ item.title }}
+ {% endif %}
+
+ {{ item.address }}
+
+ {% endfor %}
+
+
+
+
+
+
+
+
+ {% if partners_logos %}
+
+
+
Our partners
+
+
+ {% for i in 1..5 %}
+ {% for image in partners_logos %}
+
+ {% endfor %}
+ {% endfor %}
+
+
+
+
+
+
+
+ {% endif %}
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file