Merge origin/master into dev_87 with incoming changes

dev_87
mrkapa 2 months ago
commit 0c8ab333bd
  1. BIN
      .tmb/l1_d3AtY29udGVudC90aGVtZXMvY29zbW9wZXQtdGltYmVyL3NjcmVlbnNob3QucG5n1744272629.png
  2. 0
      .user.ini
  3. 1
      .well-known/apple-developer-merchantid-domain-association
  4. 91
      robots.txt
  5. 18
      wp-content/.cdekdelivery.php
  6. 2
      wp-content/themes/cosmopet/functions.php
  7. 79
      wp-content/themes/cosmopet/global-functions/multilang-functions.php
  8. 250
      wp-content/themes/cosmopet/global-functions/multisite-functions.php
  9. 1
      wp-content/themes/cosmopet/modules/footer/assets/js/footer.js
  10. 137
      wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php
  11. 2
      wp-content/themes/cosmopet/modules/shop/components/checkout/assets/js/script.js
  12. 65
      wp-content/themes/cosmopet/static/assets/css/thankyou.css
  13. 55
      wp-content/themes/cosmopet/static/assets/js/telegram-auth.js
  14. 273
      wp-content/themes/cosmopet/static/front-page/css/style.css
  15. 2
      wp-content/themes/cosmopet/static/front-page/img/discount-line-w.svg
  16. 4
      wp-content/themes/cosmopet/static/front-page/js/main.js
  17. BIN
      wp-content/themes/cosmopet/static/img/pet/mini-cat.png
  18. 13
      wp-content/themes/cosmopet/templates/forms/discount.twig
  19. 4
      wp-content/themes/cosmopet/templates/front-page/front-page.twig
  20. 8
      wp-content/themes/cosmopet/templates/header.twig
  21. 92
      wp-content/themes/cosmopet/templates/layout.twig
  22. 1
      wp-content/themes/cosmopet/templates/profile/profile.twig
  23. 626
      wp-content/themes/cosmopet/templates/where_to_buy/template_wtb.php
  24. 365
      wp-content/themes/cosmopet/templates/where_to_buy/wtb.twig

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1,91 @@
User-agent: *
Disallow: /cgi-bin
Disallow: /?
Disallow: /wp-
Disallow: /wp/
Disallow: *?s=
Disallow: *&s=
Disallow: /search/
Disallow: /author/
Disallow: /users/
Disallow: */trackback
Disallow: */feed
Disallow: */rss
Disallow: */embed
Disallow: */wlwmanifest.xml
Disallow: /xmlrpc.php
Allow: */uploads
<<<<<<< HEAD
Sitemap: https://cosmopet.ru/sitemap_index.xml
=======
Sitemap: https://cosmopet.ae/sitemap_index.xml
>>>>>>> 2323f31 (Fix | bug fix)
User-agent: GoogleBot
Disallow: /cgi-bin
Disallow: /?
Disallow: /wp-
Disallow: /wp/
Disallow: *?s=
Disallow: *&s=
Disallow: /search/
Disallow: /author/
Disallow: /users/
Disallow: */trackback
Disallow: */feed
Disallow: */rss
Disallow: */embed
Disallow: */wlwmanifest.xml
Disallow: /xmlrpc.php
Disallow: *utm*=
Disallow: *etext*=
Disallow: *?add-to-cart*
Disallow: *?per_page*
Disallow: *?per_row*
Disallow: *openstat=
Allow: */uploads
Allow: /*/*.js
Allow: /*/*.css
Allow: /wp-*.png
Allow: /wp-*.jpg
Allow: /wp-*.jpeg
Allow: /wp-*.gif
Allow: /wp-admin/admin-ajax.php
<<<<<<< HEAD
Sitemap: https://cosmopet.ru/sitemap_index.xml
=======
Sitemap: https://cosmopet.ae/sitemap_index.xml
>>>>>>> 2323f31 (Fix | bug fix)
User-agent: Yandex
Disallow: /cgi-bin
Disallow: /?
Disallow: /wp-
Disallow: /wp/
Disallow: *?s=
Disallow: *&s=
Disallow: /search/
Disallow: /author/
Disallow: /users/
Disallow: */trackback
Disallow: */feed
Disallow: */rss
Disallow: */embed
Disallow: */wlwmanifest.xml
Disallow: /xmlrpc.php
Allow: */uploads
Allow: /*/*.js
Allow: /*/*.css
Allow: /wp-*.png
Allow: /wp-*.jpg
Allow: /wp-*.jpeg
Allow: /wp-*.gif
Allow: /wp-admin/admin-ajax.php
<<<<<<< HEAD
Sitemap: https://cosmopet.ru/sitemap_index.xml
=======
Sitemap: https://cosmopet.ae/sitemap_index.xml
>>>>>>> 2323f31 (Fix | bug fix)
Clean-Param: utm_source&utm_medium&utm_campaign&etext&add-to-cart&per_page&per_row&from&attribute_pa_weight&attribute_pa_ves-upakovki
Clean-Param: openstat

@ -0,0 +1,18 @@
<?php defined("ABSPATH") or exit; return array (
'tokens' =>
array (
'wordpress' => 'v4.local.nalowbOW6cLbDpvTkpTnMOVG_1PGHdZKveVTUIbgUv2hUvQGr5zQ-B97k1oykPdIiLx0D0EZ0xlOdhwqgV_DcPsmh3eOrZ9mLJOlmxL0Ciq1Lkhewhj3h1H4FQuiSmfg1oylejDCLtbzfWil8GNxrzGOiBoiiY2XALTxBT0ZDcCZNAGmKQTElV9Lzw5TxDYEm9ELTLCaFj3rTN3Vq8bMQy8aHK-Mgq2QvaD3YYEJiTxcgTl97df6rJQnGtYiG9dvhVFhShNdUj1sWh9vIzoXiUbZbByLwe5ZUwaDzE3G7xosGlTyQJ3WIle3ywsfnjgNxRQwOz--XcEYGUJ_nhR3oJscW7SJXdi-ziE5dnDi6k2XpaIbTbppIUvdeyzRDpC2VajiSvb3jg5kcxHL_3bFo-7D4Rjmtr2ZEr8uS4-xwt8uhLiSBLcRsLSGSCq0yMlNmgsxxUdySDu2Q5P5pDX3_5hBdg-4DuBH.eyJlbmRwb2ludCI6Imh0dHBzOlwvXC9hcGkuY2Rlay5ydVwvY21zIn0',
'@cdek-it/order' => 'v4.local.-h0jllL5iFSEWHkSBGY1TfzpFIQGYeCif9pGrZorJtWeZ1mUew3VjChFhXL60cVcN5LCXw9d_ui-XG1kIzjrx-UzDfK4fS-l4OznAhLWp7ZT1M3-X-uQiVJk5lzCJ2rNGQ-TJudeOlqL4kDKcqaPLgDzq5MQEqvloGAvviatPL-Y9ifTI183xVxcL6O7J700dFcQEhhSIcYfVnQVG2L1d93gxaUUH-OIMk1hxF1LCdnNIy6F6Zjt9yswXDEfEGWfE8OJysQQJhTj1IIOcf4_AZ-gGrSaXMMcG-J6GfDIjoU-uFrXhpI10grwgmY5Xka3-SPj2fyVV_e5WVuOew5HK0oDyHWqnlE37dWbQTBNPMqUNL50fQxviTzDYHplbM_CUq8YlNx2O_7FMt7b2w2sZMHLZBaWtH4zmOj8T2v-rY_MLeVwPuAfZPKnHqZMoGBL312Zh-tCyqVIp8gZ2jXJvKXnzMgumJv_uxA6Sdgk.eyJlbmRwb2ludCI6Imh0dHBzOlwvXC9hcGkuY2Rlay5ydVwvY21zIn0',
'@cdek-it/settings' => 'v4.local.Dbb69cuN8PIE7d1_5w3bD5OZI0Z5_K9w_UbnCJGJlM5jLLWkdkKf4d_svhJySz-NMm8xVJsEMEnCOSRVZZZIlcRaOlNqi7bsIDYXmpcnVCKL5v8cUWn9nKRSNvKUuiSqU_1aJl2pi7ZvxpII6STV4xxkcMXdtfYF9AZAOD0b6gtd7v8OdXjBzeKwbsilj7bToUv4mrmAlgMhd_MG3rKRP5-INo0B-rkwK78Ul88YjCgf0ooPyRICdQzLAgD7x42FJ3vYI9UA8g3wffx5kJxbRWrKUEfwZ1zJp-NQKAcyK5KGLIu9OUoFcQN4U_KdnnZqdqwwkovB0JIbqz-HKQcdi1Xrq5wKk5lIF-HdJteYn2t8Refd9soVGmN67O_V2K1b09Jw4v973C4rOxvw4WZNXHTm9a0mTI0pTk3Y5Dv1tJuN23zH73G_kNN_TSLUenE1iTGPdSnGXxIcfBG-sBoS1Au62QbzUY7lhftD6Bq6T6-6.eyJlbmRwb2ludCI6Imh0dHBzOlwvXC9hcGkuY2Rlay5ydVwvY21zIn0',
),
'endpoints' =>
array (
'wordpress' => 'https://api.cdek.ru/cms',
'@cdek-it/order' => 'https://api.cdek.ru/cms',
'@cdek-it/settings' => 'https://api.cdek.ru/cms',
),
'keyring' =>
array (
'k4.pid.jwGFnADDct9ZphWj1tZslqzRDXQIgEjvyVx8LI6MJR7d' => 'TDOjk4smnqY5AYE-aGdmFJIescdcJb26nThfAK3AVPU',
),
);

@ -1196,7 +1196,6 @@ function remove_woocommerce_styles_on_checkout() {
}
// Добавляем hreflang теги для cosmopet.shop
add_action('wp_head', 'custom_hreflang_shop', 6);
function custom_hreflang_shop() {
@ -1341,4 +1340,3 @@ function custom_handle_activation_request() {
}
}

@ -48,6 +48,15 @@ add_action('init', function () {
],
'group' => 'General',
],
[
'name' => 'Заголовок (скрытый) H1 на главной',
'string' => 'КОРМ БУДУЩЕГО ДЛЯ ВАШЕГО ПИТОМЦА',
'translations' => [
'ru' => 'КОРМ БУДУЩЕГО ДЛЯ ВАШЕГО ПИТОМЦА',
'en' => 'FOOD OF THE FUTURE FOR YOUR PET',
],
'group' => 'General',
],
[
'name' => 'НАПИШИТЕ НАМ',
'string' => 'НАПИШИТЕ НАМ',
@ -1489,39 +1498,39 @@ add_action('init', function () {
}
pll_register_string('Подписка от', 'Подписка от', 'Theme');
pll_register_string('Сумма:', 'Сумма:', 'Theme');
pll_register_string('Следующий платеж:', 'Следующий платеж:', 'Theme');
pll_register_string('Нет', 'Нет', 'Theme');
pll_register_string('Детали подписки', 'Детали подписки', 'Theme');
pll_register_string('Детали недоступны', 'Детали недоступны', 'Theme');
pll_register_string('У вас нет активных подписок.', 'У вас нет активных подписок.', 'Theme');
pll_register_string('Перейти в профиль', 'Перейти в профиль', 'Theme');
pll_register_string('Заказы', 'Заказы', 'Theme');
pll_register_string('Подписки', 'Подписки', 'Theme');
pll_register_string('Подписка №', 'Подписка №', 'Theme');
pll_register_string('Статус', 'Статус', 'Theme');
pll_register_string('Дата подписки', 'Дата подписки', 'Theme');
pll_register_string('Дата последнего заказа', 'Дата последнего заказа', 'Theme');
pll_register_string('Следующий платеж', 'Следующий платеж', 'Theme');
pll_register_string('Способ оплаты', 'Способ оплаты', 'Theme');
pll_register_string('Товары:', 'Товары:', 'Theme');
pll_register_string('Сумма', 'Сумма', 'Theme');
pll_register_string('месяц', 'месяц', 'Theme');
pll_register_string('Доставка', 'Доставка', 'Theme');
pll_register_string('Бесплатно', 'Бесплатно', 'Theme');
pll_register_string('Итого', 'Итого', 'Theme');
pll_register_string('Доставка:', 'Доставка:', 'Theme');
pll_register_string('Адрес доставки', 'дрес доставки', 'Theme');
pll_register_string('Начните вводить адрес', 'ачните вводить адрес', 'Theme');
pll_register_string('Адрес введен неверно', 'Адрес введен неверно', 'Theme');
pll_register_string('Комментарий для доставки', 'Комментарий для доставки', 'Theme');
pll_register_string('Для службы доставки', 'Для службы доставки', 'Theme');
pll_register_string('Комментарий введен неверно', 'Комментарий введен неверно', 'Theme');
pll_register_string('Отменить подписку', 'Отменить подписку', 'Theme');
pll_register_string('Подписка не найдена.', 'Подписка не найдена.', 'Theme');
pll_register_string('Перейти в профиль', 'Перейти в профиль', 'Theme');
pll_register_string('Заказы', 'Заказы', 'Theme');
pll_register_string('Подписки', 'Подписки', 'Theme');
pll_register_string('Не указан', 'Не указан', 'Theme');
pll_register_string('месяц', 'месяц', 'Theme');
pll_register_string('Сумма:', 'Сумма:', 'Theme');
pll_register_string('Следующий платеж:', 'Следующий платеж:', 'Theme');
pll_register_string('Нет', 'Нет', 'Theme');
pll_register_string('Детали подписки', 'Детали подписки', 'Theme');
pll_register_string('Детали недоступны', 'Детали недоступны', 'Theme');
pll_register_string('У вас нет активных подписок.', 'У вас нет активных подписок.', 'Theme');
pll_register_string('Перейти в профиль', 'Перейти в профиль', 'Theme');
pll_register_string('Заказы', 'Заказы', 'Theme');
pll_register_string('Подписки', 'Подписки', 'Theme');
pll_register_string('Подписка №', 'Подписка №', 'Theme');
pll_register_string('Статус', 'Статус', 'Theme');
pll_register_string('Дата подписки', 'Дата подписки', 'Theme');
pll_register_string('Дата последнего заказа', 'Дата последнего заказа', 'Theme');
pll_register_string('Следующий платеж', 'Следующий платеж', 'Theme');
pll_register_string('Способ оплаты', 'Способ оплаты', 'Theme');
pll_register_string('Товары:', 'Товары:', 'Theme');
pll_register_string('Сумма', 'Сумма', 'Theme');
pll_register_string('месяц', 'месяц', 'Theme');
pll_register_string('Доставка', 'Доставка', 'Theme');
pll_register_string('Бесплатно', 'Бесплатно', 'Theme');
pll_register_string('Итого', 'Итого', 'Theme');
pll_register_string('Доставка:', 'Доставка:', 'Theme');
pll_register_string('Адрес доставки', 'дрес доставки', 'Theme');
pll_register_string('Начните вводить адрес', 'ачните вводить адрес', 'Theme');
pll_register_string('Адрес введен неверно', 'Адрес введен неверно', 'Theme');
pll_register_string('Комментарий для доставки', 'Комментарий для доставки', 'Theme');
pll_register_string('Для службы доставки', 'Для службы доставки', 'Theme');
pll_register_string('Комментарий введен неверно', 'Комментарий введен неверно', 'Theme');
pll_register_string('Отменить подписку', 'Отменить подписку', 'Theme');
pll_register_string('Подписка не найдена.', 'Подписка не найдена.', 'Theme');
pll_register_string('Перейти в профиль', 'Перейти в профиль', 'Theme');
pll_register_string('Заказы', 'Заказы', 'Theme');
pll_register_string('Подписки', 'Подписки', 'Theme');
pll_register_string('Не указан', 'Не указан', 'Theme');
pll_register_string('месяц', 'месяц', 'Theme');
});

@ -121,6 +121,250 @@ function send_purchase_to_metrika($order_id) {
});
</script>
<?php
add_action('wp_footer', 'add_facebook_pixel_events');
function add_facebook_pixel_events() {
// 1. Событие AddToCart (Добавление в корзину)
if (is_product() || is_shop() || is_cart()) {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($) {
$(document.body).on('added_to_cart', function(event, fragments, cart_hash, $button) {
var productId = $button.data('product_id') || '';
var quantity = $button.data('quantity') || 1;
var productName = $button.data('product_sku') ||
$button.closest('.product').find('.woocommerce-loop-product__title').text().trim() || 'Unknown';
var priceElement = $button.closest('.product').find('.price .amount').text().replace(/[^0-9.]/g, '') || '0.00';
var currency = '<?php echo get_woocommerce_currency(); ?>'; // Динамическая валюта
// Событие для Facebook Pixel
fbq('track', 'AddToCart', {
content_ids: [productId],
content_type: 'product',
value: parseFloat(priceElement) * quantity,
currency: currency
});
// Событие для Google Analytics
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': currency,
'value': parseFloat(priceElement) * quantity,
'items': [{
'item_id': productId,
'item_name': productName,
'price': parseFloat(priceElement),
'quantity': quantity
}]
}
});
});
});
});
</script>
<?php
}
// 2. Событие Purchase (Покупка)
if (is_wc_endpoint_url('order-received')) {
$order_id = absint(get_query_var('order-received'));
if (!$order_id) return;
$order = wc_get_order($order_id);
if (!$order || ($order->get_status() !== 'processing' && $order->get_status() !== 'completed')) return;
$items = [];
foreach ($order->get_items() as $item) {
$product = $item->get_product();
$items[] = [
'item_id' => $product->get_id(),
'item_name' => $product->get_name(),
'price' => $product->get_price(),
'quantity' => $item->get_quantity()
];
}
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'Purchase', {
value: <?php echo $order->get_total(); ?>,
currency: '<?php echo $order->get_currency(); ?>',
content_ids: [<?php echo implode(',', array_column($items, 'item_id')); ?>],
content_type: 'product'
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'purchase',
'ecommerce': {
'currency': '<?php echo $order->get_currency(); ?>',
'value': <?php echo $order->get_total(); ?>,
'items': <?php echo json_encode($items); ?>
}
});
});
</script>
<?php
}
// 3. Событие AddPaymentInfo
if (is_checkout() && !is_wc_endpoint_url('order-received')) {
$currency = get_woocommerce_currency();
$cart_total = WC()->cart ? WC()->cart->get_total('edit') : 0;
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'AddPaymentInfo', {
value: <?php echo $cart_total; ?>,
currency: '<?php echo $currency; ?>'
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_payment_info',
'ecommerce': {
'currency': '<?php echo $currency; ?>',
'value': <?php echo $cart_total; ?>
}
});
});
</script>
<?php
}
}
// Ваш код для custom_enqueue_ajax_add_to_cart остается без изменений
add_action('wp_enqueue_scripts', 'custom_enqueue_ajax_add_to_cart');
function custom_enqueue_ajax_add_to_cart() {
// Подключаем скрипт только на странице товара
if (is_product()) {
// Убедимся, что jQuery подключен
wp_enqueue_script('jquery');
// Inline JavaScript с поддержкой jQuery.noConflict
$ajax_script = "
jQuery(document).ready(function($) {
console.log('AJAX Add to Cart script loaded'); // Отладка: проверяем загрузку скрипта
// Перехват клика по кнопке
$('.single_add_to_cart_button').on('click', function(e) {
e.preventDefault();
e.stopPropagation(); // Предотвращаем всплытие события
console.log('Add to cart button clicked'); // Отладка: клик по кнопке
var \$button = $(this);
var \$form = \$button.closest('form.cart');
var product_id = \$button.val(); // Извлекаем product_id из value кнопки
var quantity = \$form.find('input[name=\"quantity\"]').val() || 1;
// Проверка на корректность product_id
if (!product_id || isNaN(product_id)) {
console.log('Invalid product_id:', product_id); // Отладка
console.log('Error: Неверный ID товара');
\$button.removeClass('loading').prop('disabled', false); // Разблокируем кнопку
return;
}
// Блокируем кнопку
\$button.addClass('loading').prop('disabled', true);
console.log('Sending AJAX request for product_id: ' + product_id + ', quantity: ' + quantity); // Отладка
// Подготовка данных
var data = {
action: 'woocommerce_ajax_add_to_cart',
product_id: product_id,
quantity: quantity
};
// Добавляем поле url, если есть
var urlField = \$form.find('input[name=\"url\"]');
if (urlField.length) {
data.url = urlField.val();
}
$.ajax({
type: 'POST',
url: ajax_object.ajax_url,
data: data,
dataType: 'json',
success: function(response) {
console.log('AJAX response:', response); // Отладка
if (response.success) {
console.log('Товар добавлен в корзину'); // Уведомление в консоли
// Обновляем фрагменты корзины
if (response.data.fragments) {
$.each(response.data.fragments, function(key, value) {
console.log('Updating fragment:', key); // Отладка
$(key).replaceWith(value);
});
}
$(document.body).trigger('wc_fragment_refresh');
$(document.body).trigger('added_to_cart', [response.data.fragments, response.data.cart_hash]);
// Сбрасываем форму
\$form[0].reset();
console.log('Form reset after successful add to cart'); // Отладка
} else {
console.log('Error: ' + (response.data.message || 'Ошибка при добавлении товара в корзину')); // Уведомление в консоли
}
},
error: function(xhr, status, error) {
console.error('AJAX error:', status, error); // Отладка
console.log('Error: Произошла ошибка при добавлении товара: ' + error);
},
complete: function() {
console.log('AJAX request completed'); // Отладка
\$button.removeClass('loading').prop('disabled', false); // Разблокируем кнопку
}
});
});
// Перехват отправки формы
$('form.cart').on('submit', function(e) {
e.preventDefault();
e.stopPropagation(); // Предотвращаем всплытие
console.log('Form submit prevented'); // Отладка
});
});
";
wp_add_inline_script('jquery', $ajax_script);
// Передаем AJAX URL
wp_localize_script('jquery', 'ajax_object', array(
'ajax_url' => admin_url('admin-ajax.php')
));
// Inline CSS
wp_enqueue_style('woocommerce-custom-styles', get_template_directory_uri() . '/style.css', array(), '1.0');
$custom_css = "
.single_add_to_cart_button.loading {
opacity: 0.5;
cursor: not-allowed;
position: relative;
}
.single_add_to_cart_button.loading:after {
content: '';
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid #fff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s linear infinite;
position: absolute;
right: 10px;
}
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
";
wp_add_inline_style('woocommerce-custom-styles', $custom_css);
}
}
// Отключаем кэширование для страниц товаров
@ -182,4 +426,8 @@ function woocommerce_ajax_add_to_cart() {
}
wp_die();
}
}
}

@ -955,3 +955,4 @@ if (document.querySelector('.header').classList.contains('white')) {

@ -1,3 +1,4 @@
<<<<<<< HEAD
<?php
// include_module('profile');
@ -132,3 +133,139 @@ function ajax_edit_pet() {
add_action('wp_ajax_edit_pet', 'ajax_edit_pet');
add_action('wp_ajax_nopriv_edit_pet', 'ajax_edit_pet');
=======
<?php
// include_module('profile');
// Сохранить значения полей
add_action('wp_ajax_edit_user', 'save_custom_user_profile_fields');
add_action('wp_ajax_nopriv_edit_user', 'save_custom_user_profile_fields'); //
function save_custom_user_profile_fields() {
// Проверка прав пользователя
wp_update_user( array(
'ID' => get_current_user_id(),
'first_name' => $_POST['name'],
'last_name' => $_POST['l_name'],
) );
$phone = update_user_meta( get_current_user_id(), 'billing_phone', $_POST['phone'] );
}
function ajax_add_pet() {
$current_user = wp_get_current_user();
// Подготовка данных
$pet_name = $_POST['name'];
$old_type = $_POST['old_type'];
if ($old_type == 'ex'){
$old= $_POST['old'];
}
$weight= $_POST['weight'];
$activity = $_POST['activity'];
$pet = $_POST['pet'];
$breed = $_POST['breed'];
$sex = $_POST['sex'];
$user = $current_user->ID;
$post_data = array(
'post_title' => $pet_name,
'post_type' => 'pets',
'post_status' => 'publish',
);
$post_id = wp_insert_post($post_data);
var_dump($post_id);
if ($post_id) {
// Добавление мета-полей
if ($old_type == 'ex'){
update_field( 'old', $old, $post_id );
}
else{
update_field( 'day', $_POST['day'], $post_id );
update_field( 'month', $_POST['month'], $post_id );
update_field( 'year', $_POST['year'], $post_id );
}
update_field( 'weight', $weight, $post_id );
update_field( 'breed', $breed, $post_id );
update_field( 'sex', $sex, $post_id );
update_field( 'type', $pet, $post_id );
update_field( 'user', $user, $post_id );
update_field( 'activity', $activity, $post_id );
if($_POST['sterilized']=='1' && $pet=='cat'){
update_field( 'sterilized', true );
}
else{
update_field( 'sterilized', false );
}
wp_send_json_success('Питомец успешно добавлен!');
} else {
wp_send_json_error('Ошибка при добавлении питомца.');
}
wp_die(); // Завершение работы
}
add_action('wp_ajax_add_pet', 'ajax_add_pet');
add_action('wp_ajax_nopriv_add_pet', 'ajax_add_pet'); // Если нужно разрешить для незалогиненных пользователей
function ajax_edit_pet() {
$current_user = wp_get_current_user();
// Подготовка данных
$pet_name = $_POST['name'];
$old_type = $_POST['old_type'];
if ($old_type == 'ex'){
$old= $_POST['old'];
}
else{
$old_acc = $_POST['day'] . ' ' . $_POST['month'] . ' ' . $_POST['year'];
}
$weight= $_POST['weight'];
$activity = $_POST['activity'];
$pet = $_POST['pet'];
$breed = $_POST['breed'];
$sex = $_POST['sex'];
$user = $current_user->ID;
$post_id = intval($_POST['pet_id']);
if (get_field('user', $post_id) == $user) {
// Добавление мета-полей
if ($old_type == 'ex'){
update_field( 'old', $old, $post_id );
}
else{
update_field( 'old', '', $post_id );
update_field( 'day', $_POST['day'], $post_id );
update_field( 'month', $_POST['month'], $post_id );
update_field( 'year', $_POST['year'], $post_id );
}
update_field( 'weight', $weight, $post_id );
update_field( 'breed', $breed, $post_id );
update_field( 'sex', $sex, $post_id );
update_field( 'type', $pet, $post_id );
update_field( 'activity', $activity, $post_id );
if($_POST['sterilized']=='1' && $pet=='cat'){
update_field( 'sterilized', true );
}
else{
update_field( 'sterilized', false );
}
wp_send_json_success('Питомец успешно отредактирован!');
} else {
wp_send_json_error('Ошибка при редактировании питомца.');
}
wp_die(); // Завершение работы
}
add_action('wp_ajax_edit_pet', 'ajax_edit_pet');
add_action('wp_ajax_nopriv_edit_pet', 'ajax_edit_pet');
>>>>>>> e7e74da0bdd7c9b1db3979f0d5db0d07fafdd903

@ -211,7 +211,7 @@ jQuery(document).ready(function($) {
$filterList.append($filterTag);
});
});
W2 else {
} else {
$filterContainer.hide();
$clearButton.hide();
}

@ -0,0 +1,65 @@
/* Основные стили страницы */
.woocommerce-order {
max-width: 800px;
margin: 2rem auto;
padding: 2rem;
background: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
border-radius: 8px;
}
/* Заголовок */
.woocommerce-order h2.woocommerce-order-details__title,
.woocommerce-order h2.woocommerce-column__title {
color: #333;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
}
/* Детали заказа */
.woocommerce-order-overview {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 2rem;
}
.woocommerce-order-overview li {
flex: 1;
min-width: 200px;
background: #f9f9f9;
padding: 1rem;
border-radius: 4px;
}
/* Кнопка "Вернуться в магазин" */
.woocommerce-button.button.wc-backward {
background: #4CAF50;
color: white;
padding: 10px 20px;
border-radius: 4px;
text-decoration: none;
display: inline-block;
margin-top: 20px;
}
.woocommerce-button.button.wc-backward:hover {
background: #3e8e41;
}
@media (max-width: 768px) {
.woocommerce-order {
padding: 1rem;
margin: 1rem;
}
.woocommerce-order-overview li {
min-width: 100%;
}
.woocommerce-order-details,
.woocommerce-customer-details {
margin-top: 1rem;
}
}

@ -0,0 +1,55 @@
jQuery(document).ready(function($) {
window.onTelegramAuth = function(user) {
$.ajax({
type: 'POST',
url: telegram_auth_params.ajax_url,
data: {
action: 'ontelegramauth',
userid: user.id,
username: user.username || '',
fname: user.first_name || '',
lname: user.last_name || '',
photo_url: user.photo_url || '',
auth_date: user.auth_date,
hash: user.hash
},
success: function(response) {
if (response.success) {
window.location.href = telegram_auth_params.my_account_url;
} else {
alert(telegram_auth_params.i18n_error + ': ' + (response.data.message || 'Unknown error'));
}
},
error: function() {
alert(telegram_auth_params.i18n_error);
}
});
};
window.linkTelegram = function(user) {
$.ajax({
type: 'POST',
url: telegram_auth_params.ajax_url,
data: {
action: 'linktelegram',
userid: user.id,
username: user.username || '',
fname: user.first_name || '',
lname: user.last_name || '',
photo_url: user.photo_url || '',
auth_date: user.auth_date,
hash: user.hash
},
success: function(response) {
if (response.success) {
$('.cabinet-accounts').html('<svg width="40px" height="40px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path><path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path><path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path><path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path></g></svg>');
} else {
alert(telegram_auth_params.i18n_error_link + ': ' + (response.data.message || 'Unknown error'));
}
},
error: function() {
alert(telegram_auth_params.i18n_error_link);
}
});
};
});

@ -1076,6 +1076,10 @@ border-bottom: 2px solid var(--interface-main_black, rgba(18, 18, 18, 1))
max-width: 778px;
margin-bottom: 27px;
}
<<<<<<< HEAD
=======
>>>>>>> e7e74da0bdd7c9b1db3979f0d5db0d07fafdd903
.discount_block .discount_text{
font-size: 20px;
line-height: 24px;
@ -4280,4 +4284,273 @@ color: #f4f1f0;
.invisible {
visibility: hidden;
<<<<<<< HEAD
=======
}
/* Discount start */
.discount{
padding-top: 50px;
padding-bottom: 50px;
}
.discount .discount_block{
display: flex;
flex-direction: column;
}
.discount .discount_top{
position: relative;
margin-bottom: 50px;
}
.discount_top .discount_title{
font-size: 82px;
font-weight: 700;
line-height: 98.4px;
color: var(--creme-white, #F4F1F0);
text-transform: uppercase;
}
.discount_top .discount_top-imgs{
position: absolute;
top: 55px;
right: -80px;
}
.discount_block .discount_form{
position: relative;
z-index: 1;
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 6px;
}
.discount_form .discount_form-btn {
background: inherit;
min-height: unset;
}
.discount_form .discount_form-btn:hover{
background: var(--btn-color);
border-color: var(--btn-color);
color: #3ab18f;
}
.discount_form .discount_form-inp{
width: 280px;
height: 50px;
border: 2px solid var(--creme-white, #F4F1F0);
padding: 10px 18px;
font-size: 24px;
font-weight: 500;
line-height: 28.8px;
color: var(--creme-white, #F4F1F0);
border-radius: 28px;
opacity: .6;
}
.discount_form .discount_form-inp::placeholder{
font-size: 24px;
font-weight: 500;
line-height: 28.8px;
color: var(--creme-white, #F4F1F0);
}
.discount_form .discount_form-btn {
text-transform: lowercase;
}
.discount_block .discount_form-text{
font-size: 14px;
line-height: 16.8px;
color: var(--creme-white, #F4F1F0);
opacity: .6;
max-width: 778px;
margin-bottom: 27px;
}
.discount_block .discount_text{
font-size: 20px;
line-height: 24px;
color: var(--creme-white, #F4F1F0);
}
.discount_block .discount_cosmodog{
position: relative;
width: 100%;
height: 626px;
border-radius: 60px;
border: 2px solid var(--creme-white, #F4F1F0);
display: flex;
align-items: end;
justify-content: center;
overflow: hidden;
cursor: pointer;
}
.discount_cosmodog .discount_cosmodog-img{
width: 100%;
height: 100%;
object-fit: cover;
}
.discount_cosmodog__slider{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.discount_cosmodog .discount_cosmodog-img.active{
opacity: 1;
}
.discount_cosmodog:hover .discount_cosmodog-img:nth-child(2) {
opacity: 1;
}
.discount_cosmodog .discount_cosmodog_info{
position: relative;
z-index: 1;
padding: 33px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: end;
background: linear-gradient(0deg, #F4F1F0 56%, rgba(244, 241, 240, 0) 100%);
width: 100%;
height: 219px;
}
.discount_cosmodog .discount_cosmodog-title{
font-size: 40px;
font-weight: 700;
line-height: 48px;
text-align: center;
color: var(--grey-black, #121212);
text-transform: uppercase;
}
.discount_cosmodog .discount_cosmodog-text{
font-size: 24px;
font-weight: 500;
line-height: 28.8px;
text-align: center;
}
/* Discount end */
@media only screen and (max-width: 1170px) {
.discount_top .discount_title {
font-size: 60px;
max-width: 550px;
line-height: 65px;
}
.discount_top .discount_top-imgs {
position: absolute;
top: 20px;
right: -50px;
}
.discount_top .discount_top-imgs .dicount_dog-img {
width: 400px;
}
}
@media (max-width: 576px){
/* Узнайте о нас больше и получите скидку! */
.discount {
padding: 0px 0 43px;
}
.discount_top .discount_title,
.blog_block .blog_title,
.truth_block .truth_block-title,
.about_us .about_us-title,
.sellers_top .sellers_title {
font-size: 30px;
line-height: 36px;
}
.discount_block .discount_text {
max-width: 260px;
}
.discount_top .discount_top-imgs {
right: -136px;
top: 87px;
}
.discount_top .discount_top-imgs .dicount_dog-img {
width: 314px;
width: 110vw;
}
.discount_form .discount_form-inp {
height: 29px;
padding: 6px 13px;
font-size: 12px;
line-height: 14.4px;
}
.discount_form .discount_form-inp::placeholder {
font-size: 12px;
line-height: 14.4px;
}
.discount_block .discount_text {
font-size: 12px;
line-height: 14.2px;
}
.discount_block .discount_form .discount_form-inp{
width: 100%;
}
.discount_form .discount_form-btn {
justify-content: start;
padding: 5px 15px;
background: var(--creme-white, #F4F1F0);
color: #62c57e;
opacity: 0.6;
}
.discount_form img{
display: none;
}
.discount_form span{
width: 100%;
}
.discount_block .discount_cosmodog {
border-radius: 25px;
height: 415px;
}
.discount_cosmodog .discount_cosmodog_info {
height: 245px;
gap: 14px;
padding: 10px 19px;
}
.discount_cosmodog .discount_cosmodog-title {
text-align: start;
font-size: 26px;
line-height: 31.2px;
max-width: 202px;
margin-right: auto;
}
.discount_cosmodog .discount_cosmodog-text {
font-size: 12px;
line-height: 14.4px;
max-width: 231px;
text-align: start;
margin-right: auto;
}
.discount_top .discount_top-imgs {
right: -20%;
top: 0;
transform: scale(1.8);
z-index: 0;
margin-bottom: -91%;
margin-top: 20%;
position: relative;
}
.discount_block .wpcf7 {
order: 3;
}
/* Узнайте о нас больше и получите скидку! - конец */
}
.discount_block{
padding-bottom: 80px;
>>>>>>> e7e74da0bdd7c9b1db3979f0d5db0d07fafdd903
}

@ -1,3 +1,3 @@
<svg width="236" height="23" viewBox="0 0 236 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M224.291 1L234.5 11.5M234.5 11.5L224.291 22M234.5 11.5L1 11.5" stroke="#121212" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M224.291 1L234.5 11.5M234.5 11.5L224.291 22M234.5 11.5L1 11.5" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 257 B

@ -447,6 +447,10 @@ document.addEventListener('DOMContentLoaded', function () {
slidesPerView: 1,
spaceBetween: 0,
loop: true,
effect: 'fade',
fadeEffect: {
crossFade: true // enables slides to cross fade into each other
},
autoplay: {
delay: 3000, // Интервал переключения слайдов (3 секунды)
disableOnInteraction: false,

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -1,15 +1,24 @@
<section class="discount__sale sec-bf">
<section class="{% if class %} {{ class }}{% else %}discount__sale{% endif %} sec-bf">
<div class="container">
<div class="discount_top">
<h3 class="discount_title">{{sub_title}}</span>
</h3>
<div class="discount_top-imgs">
{% if class %}
<img class="dicount_dog-img img--desktop"
src="{{ theme.link }}/static/front-page/img/labrador%20with%20stars.png"
alt="">
<img class="dicount_dog-img img--mobile"
src="{{ theme.link }}/static/front-page/img/labrador%20with%20stars%20--%20mobile.png"
alt="">
{% else %}
<img class="dicount_dog-img img--desktop"
src="{{ theme.link }}/static/front-page/img/dicsount-sale.png"
alt="">
<img class="dicount_dog-img img--mobile"
src="{{ theme.link }}/static/front-page/img/dicsount-sale-mob.png"
alt="">
{% endif %}
</div>
</div>
<div class="dicsount__body">
@ -20,7 +29,7 @@
<div class="discount_form ">
<span class="" data-name="subscriber"><input size="40" class="discount_form-inp" aria-required="true" aria-invalid="false" placeholder="{{ function('pll_e', 'Эл.почта') }}" value="" type="email" name="subscriber"></span>
<img src="/wp-content/themes/cosmopet/static/front-page/img/discount-line-w.svg" data-src="https://cosmopet.shop/wp-content/themes/woodmart/images/svg/discount-line-w.svg" decoding="async" class=" lazyloaded"><noscript><img src="https://cosmopet.shop/wp-content/themes/woodmart/images/svg/discount-line-w.svg" data-eio="l"></noscript>
<img src="/wp-content/themes/cosmopet/static/front-page/img/discount-line{% if class %}-w{% endif %}.svg">
<input type="hidden" name="from_url" value="{{ current_url }}">
<input type="hidden" name="form_name" value="Subscribtion form">

@ -6,7 +6,8 @@
{% block content %}
<section class="home">
<h1 class="home__title invisible">КОРМ БУДУЩЕГО ДЛЯ ВАШЕГО ПИТОМЦА</h1>
<h1 class="home__title invisible">{{ function('pll_e', 'Заголовок (скрытый) H1 на главной') }}</h1>
<div class="container">
<div class="home__swiper">
<div class="swiper-wrapper">
@ -689,6 +690,7 @@
{% endif %}
{% if show_promo %}
{% set class = 'discount_block' %}
{% include 'forms/discount.twig' %}
{% endif %}

@ -188,6 +188,14 @@
</a>
</li>
{% if CONSTANTS.DOMAIN != 'AE' %}
<li class="main-menu__item">
<a href=" {% if current_lang == 'ru' %}{{production_url}}{% elseif current_lang == 'en' %}{{production_url_en}}{% endif %}"
class="main-menu__link">
{% if current_lang == 'ru' %}ГДЕ КУПИТЬ{% elseif current_lang == 'en' %}WHERE TO BUY{% endif %}
</a>
</li>
{% if CONSTANTS.DOMAIN != 'AE' %}
<li class="main-menu__item">
<a href="{{blog_url}}"
class="main-menu__link">{% if current_lang == 'ru' %}БЛОГ{% elseif current_lang == 'en' %}BLOG{% endif %}</a>

@ -2,7 +2,9 @@
<!DOCTYPE html>
<html lang="ru">
<head>
{{ function('wp_head') }}
{{ function('wp_head') }}
<title>{{ function('wp_title') }} </title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -23,47 +25,91 @@
<noscript><div><img src="https://top-fwz1.mail.ru/counter?id=3569464;js=na" style="position:absolute;left:-9999px;" alt="Top.Mail.Ru" /></div></noscript>
<!-- /Top.Mail.Ru counter -->
<meta name="yandex-verification" content="2da3f924c37aec09" />
<meta name="yandex-verification" content="2109bb636b61b248" />
<meta name="facebook-domain-verification" content="0t1n3h5uw4gdcpc1smgnnceaya7ek9" />
<meta name="google-site-verification" content="rHrHfWw6KM9echj8buJwfSPdVJLPECX0uhRTtyRX5F4" />
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WTY3GTXP5J"></script>
<script async>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WTY3GTXP5J');
</script>
<!-- /Google tag (gtag.js) -->
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
{# RU - счетчик #}
<script async type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(96481053, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true,
ecommerce:"dataLayer"
});
window.dataLayer = window.dataLayer || [];
</script>
ym(96481053, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true,
ecommerce:"dataLayer"
});
window.dataLayer = window.dataLayer || [];
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/96481053" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<meta name="yandex-verification" content="2109bb636b61b248" />
{# AE - счетчик #}
<script>
(function(w,d,u){
var s=d.createElement('script');s.async=true;s.src=u+'?'+(Date.now()/60000|0);
var h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);
})(window,document,'https://cdn-ru.bitrix24.ru/b33297602/crm/tag/call.tracker.js');
ym(100896819, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/100896819" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<!-- Meta Pixel Code -->
<script async>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1791804684725971');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1791804684725971&ev=PageView&noscript=1"
/>
</noscript>
<!-- /Meta Pixel Code -->
</head>
<body class="{{bodyClass}}">
{% include 'header.twig' %}
<main class="{{ mainClass }}">
{% block content %}
{% endblock %}
{% include 'modal.twig' %}
</main>
{% include 'footer.twig' %}
</div>
{{ function('wp_footer') }}

@ -1,502 +1,136 @@
<?php
/*
Template Name: Where to byu
Template Name: Where to Buy
Template Post Type: page
*/
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?v=1.122' );
get_header('gp_eng');
// wp_head();
add_filter('wpcf7_autop_or_not', '__return_false');
// Инициализация 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);
?>
<div class="body-wrap">
<main class="wrapper" style="padding-top: 0;">
<!-- Where home -->
<section class="where-home">
<div class="container">
<h1>Where to Buy</h1>
<p>Looking for Cosmopet products in stores? You can find our premium pet treats in select pet shops and retail stores across the UAE.</p>
</div>
</section>
<!-- Where home end -->
<div class="container">
<?php
// Get marker data from ACF
$locations = get_field('location_markers');
?>
<div class="locations-map-container">
<div id="map" style="width: 100%; height: 600px; border-radius: 20px; overflow: hidden;"></div>
</div>
<script>
// Array of locations with predefined coordinates
const locationData = [
{
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: ''
}
];
// Get data from ACF with added latitude and longitude fields
const acfLocations = <?php
if ($locations && !empty($locations)) {
echo json_encode(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));
} else {
echo 'null';
}
?>;
// Map initialization function
function initMap() {
console.log("Map is initializing");
// Map center - approximately Dubai center
const dubai = { lat: 25.2048, lng: 55.2708 };
// Create map
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 11,
center: dubai,
styles: [
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#93d5eb"
}
]
},
{
"featureType": "landscape",
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
}
]
});
// Info window for markers
const infoWindow = new google.maps.InfoWindow();
// If ACF data exists, use it for markers
if (acfLocations && acfLocations.length > 0) {
console.log("Using ACF data:", acfLocations.length, "locations");
const geocoder = new google.maps.Geocoder();
// Create and place markers
acfLocations.forEach((location, i) => {
// Check if we have manual coordinates
if (location.latitude && location.longitude) {
console.log(`Using manual coordinates for: ${location.title}`);
const position = { lat: location.latitude, lng: location.longitude };
createMarker(location, position, map, infoWindow);
} else {
// No coordinates provided, try geocoding
console.log(`Geocoding address: ${location.address}`);
geocoder.geocode({ address: location.address }, (results, status) => {
if (status === "OK") {
console.log(`Geocoding successful for: ${location.title}`);
createMarker(location, results[0].geometry.location, map, infoWindow);
} else {
console.error(`Geocode failed for address: ${location.address}. Reason: ${status}`);
// If geocoding fails, try to find matching location in predefined data
const predefinedLocation = locationData.find(item =>
item.title.toLowerCase() === location.title.toLowerCase() ||
item.address.toLowerCase().includes(location.address.toLowerCase())
);
if (predefinedLocation) {
console.log(`Using predefined coordinates for: ${location.title}`);
createMarker(location, predefinedLocation.position, map, infoWindow);
}
}
});
}
});
} else {
// Use predefined data
console.log("Using predefined data:", locationData.length, "locations");
locationData.forEach((location) => {
createMarker(location, location.position, map, infoWindow);
});
}
// Marker creation function
function createMarker(location, position, map, infoWindow) {
// Create marker
const marker = new google.maps.Marker({
map: map,
position: position,
animation: google.maps.Animation.DROP,
icon: {
url: 'https://maps.google.com/mapfiles/ms/icons/blue-dot.png'
}
});
// Add click event handler for marker
marker.addListener("click", () => {
let content = `<div><h3>${location.title}</h3><p>${location.address}</p>`;
if (location.url) {
content += `<p><a href="${location.url}" target="_blank">Visit website</a></p>`;
}
content += `</div>`;
infoWindow.setContent(content);
infoWindow.open(map, marker);
});
// Add slight delay for animation
setTimeout(() => {
marker.setAnimation(null);
}, 750);
}
}
// Check if Google Maps API is loaded
window.addEventListener('load', function() {
if (typeof google === 'undefined' || typeof google.maps === 'undefined') {
console.error('Google Maps API failed to load');
document.getElementById('map').innerHTML = '<div style="padding: 20px; text-align: center;">Map loading error. Please check your internet connection and refresh the page.</div>';
} else {
console.log('Google Maps API loaded successfully');
}
});
</script>
<!-- Google Maps API connection with your key -->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDQVXQyGsqWmUdJ84UgKOPymFlISaKoiuw&callback=initMap&libraries=places">
</script>
</div>
<br><br>
<!-- Find us -->
<section class="find-us">
<div class="container">
<h2>📍 Find us at:</h2>
<ul>
<?php
$items = get_field('location_markers');
foreach($items as $item):
?>
<li>
<h3>
<?php if($item['website']): ?>
<a href="<?php echo $item['website'];?>"><?php echo $item['title'];?></a>
<?php endif; ?>
<?php if(!$item['website']): ?>
<?php echo $item['title'];?>
<?php endif; ?>
</h3>
<p><?php echo $item['address'];?></p>
</li>
<?php endforeach; ?>
</ul>
</div>
</section>
<!-- Find us end -->
<style>
.sell-form-form:not(.submited) + .thx-text{
display:none;
}
.sell-form-form.submited{
display:none;
}
</style>
<!-- Sell form -->
<div class="container">
<?php
// Получаем изображения из галереи ACF
$images = get_field('partners_logos');
if ($images): ?>
<!-- Бегущая строка (слайдер) -->
<div class="partners-slider-section">
<h3 style="font-size:36px;">Our partners</h3>
<div class="partners-swiper swiper">
<div class="swiper-wrapper">
<?php
// Повторяем логотипы больше раз для создания эффекта бесконечности
for ($i = 0; $i < 5; $i++) {
foreach($images as $image): ?>
<div class="swiper-slide">
<a href="<?php echo esc_url($image['title']); ?>" target="_blank">
<img src="<?php echo esc_url($image['sizes']['medium']); ?>" alt="<?php echo esc_attr($image['alt']); ?>">
</a>
</div>
<?php endforeach;
} ?>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const swiper = new Swiper('.partners-swiper', {
slidesPerView: 'auto',
spaceBetween: 30,
loop: true,
loopedSlides: 999,
loopAdditionalSlides: 999,
centeredSlides: false,
autoplay: {
delay: 1, // Почти нулевая задержка
disableOnInteraction: false, // Автоплей не отключается при взаимодействии
},
speed: 8000, // Медленная скорость для плавности
allowTouchMove: false, // Отключаем свайп вручную
freeMode: false, // Свободный скроллинг
cssMode: false,
watchSlidesProgress: true,
simulateTouch: false,
observer: true,
observeParents: true,
resistanceRatio: 0,
breakpoints: {
320: {
slidesPerView: 2,
},
768: {
slidesPerView: 4,
},
1024: {
slidesPerView: 5,
}
}
});
// Принудительно перезапускаем автоплей после касания
swiper.el.addEventListener('touchend', function() {
if (!swiper.autoplay.running) {
swiper.autoplay.start(); // Перезапускаем автоплей, если он остановлен
}
});
});
</script>
<style>
/* Стили для слайдера */
.partners-slider-section,
.partners-grid-section {
margin: 50px 0;
}
.partners-slider-section {
overflow: hidden; /* Скрываем переполнение */
}
.partners-swiper {
width: 100%;
padding: 20px 0;
}
.swiper-slide {
text-align: center;
height: auto;
width: auto !important; /* Позволяем слайдам быть разной ширины */
}
.swiper-slide img {
max-height: 60px;
width: auto;
filter: grayscale(100%);
transition: filter 0.3s;
object-fit: contain;
}
.swiper-slide img:hover {
filter: grayscale(0%);
}
/* Убираем анимацию трансформации для устранения рывков */
.swiper-wrapper {
position: relative;
width: 100%;
height: 100px;
z-index: 1;
display: flex;
box-sizing: content-box;
transition-timing-function: linear !important;
}
/* Стили для плиток */
.partners-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.grid-item {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
/* border: 1px solid #eee; */
border-radius: 24px;
transition: 0.3s;
}
.grid-item:hover {
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.grid-item img {
max-height: 60px;
max-width: 100%;
filter: grayscale(100%);
transition: filter 0.3s;
}
.grid-item img:hover {
filter: grayscale(0%);
}
h3 {
font-size: 26px;
color: #fff;
text-transform: uppercase;
font-weight: bold;
}
@media (max-width: 768px) {
.partners-grid {
grid-template-columns: repeat(2, 1fr);
}
.grid-item {
width: 80%;
margin: 0 auto;
}
}
@media (max-width: 480px) {
.partners-grid {
grid-template-columns: 1fr;
}
}
</style>
<?php endif; ?>
</div>
<section class="sell-form">
<div class="container sell-form__container">
<h2>Want to sell Cosmopet in your store?</h2>
<p>Join our growing network of retailers! Fill out the contact form below, and we’ll get in touch to discuss the details.</p>
<form action="" class="form--contact sell-form-form">
<input type="hidden" name="action" value="message" >
<input type="text" placeholder="Your Name" name="name" class="form-inp">
<input type="tel" placeholder="Your Phone" name="phone" class="form-inp" id="">
<input type="email" placeholder="E-mail" name="email" class="form-inp" id="">
<textarea placeholder="Message" class="form-textarea" name="msg" id=""></textarea>
<button type="submit">SUBMIT</button>
</form>
<div class="thx-text">
<h2>Thanks for request!</h2>
<p>We will answer your message as soon as possible</p>
</div>
</div>
</section>
<!-- Sell form end -->
</main>
</div>
<?php get_footer('gp_eng'); ?>

@ -0,0 +1,365 @@
{% set bodyClass = 'main-np' %}
{% extends 'layout.twig' %}
{% block content %}
<div class="body-wrap">
<main class="wrapper" style="padding-top: 0;">
<!-- Where home -->
<section class="where-home">
<div class="container">
<h1>Where to Buy</h1>
<p>Looking for Cosmopet products in stores? You can find our premium pet treats in select pet shops and retail stores across the UAE.</p>
</div>
</section>
<!-- Where home end -->
<div class="container">
<div class="locations-map-container">
<div id="map" style="width: 100%; height: 600px; border-radius: 20px; overflow: hidden;"></div>
</div>
<script>
// Данные локаций из PHP (через Timber)
const locationData = {{ predefined_locations|json_encode|raw }};
// Данные из ACF
const acfLocations = {{ acf_locations|json_encode|raw }};
// Функция инициализации карты
function initMap() {
console.log("Map is initializing");
// Центр карты - Дубай
const dubai = { lat: 25.2048, lng: 55.2708 };
// Создание карты
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 11,
center: dubai,
styles: [
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#93d5eb"
}
]
},
{
"featureType": "landscape",
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
}
]
});
// Окно с информацией для маркеров
const infoWindow = new google.maps.InfoWindow();
// Если есть данные ACF, используем их для маркеров
if (acfLocations && acfLocations.length > 0) {
console.log("Using ACF data:", acfLocations.length, "locations");
const geocoder = new google.maps.Geocoder();
// Создание и размещение маркеров
acfLocations.forEach((location, i) => {
// Проверка наличия координат
if (location.latitude && location.longitude) {
console.log(`Using manual coordinates for: ${location.title}`);
const position = { lat: location.latitude, lng: location.longitude };
createMarker(location, position, map, infoWindow);
} else {
// Координаты отсутствуют, пробуем геокодирование
console.log(`Geocoding address: ${location.address}`);
geocoder.geocode({ address: location.address }, (results, status) => {
if (status === "OK") {
console.log(`Geocoding successful for: ${location.title}`);
createMarker(location, results[0].geometry.location, map, infoWindow);
} else {
console.error(`Geocode failed for address: ${location.address}. Reason: ${status}`);
// Если геокодирование не удалось, ищем совпадение в предопределенных данных
const predefinedLocation = locationData.find(item =>
item.title.toLowerCase() === location.title.toLowerCase() ||
item.address.toLowerCase().includes(location.address.toLowerCase())
);
if (predefinedLocation) {
console.log(`Using predefined coordinates for: ${location.title}`);
createMarker(location, predefinedLocation.position, map, infoWindow);
}
}
});
}
});
} else {
// Используем предопределенные данные
console.log("Using predefined data:", locationData.length, "locations");
locationData.forEach((location) => {
createMarker(location, location.position, map, infoWindow);
});
}
// Функция создания маркера
function createMarker(location, position, map, infoWindow) {
// Создание маркера
const marker = new google.maps.Marker({
map: map,
position: position,
animation: google.maps.Animation.DROP,
icon: {
url: 'https://maps.google.com/mapfiles/ms/icons/blue-dot.png'
}
});
// Обработчик клика по маркеру
marker.addListener("click", () => {
let content = `<div><h3>${location.title}</h3><p>${location.address}</p>`;
if (location.url) {
content += `<p><a href="${location.url}" target="_blank">Visit website</a></p>`;
}
content += `</div>`;
infoWindow.setContent(content);
infoWindow.open(map, marker);
});
// Отключение анимации после небольшой задержки
setTimeout(() => {
marker.setAnimation(null);
}, 750);
}
}
// Проверка загрузки Google Maps API
window.addEventListener('load', function() {
if (typeof google === 'undefined' || typeof google.maps === 'undefined') {
console.error('Google Maps API failed to load');
document.getElementById('map').innerHTML = '<div style="padding: 20px; text-align: center;">Map loading error. Please check your internet connection and refresh the page.</div>';
} else {
console.log('Google Maps API loaded successfully');
}
});
</script>
<!-- Подключение Google Maps API -->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDQVXQyGsqWmUdJ84UgKOPymFlISaKoiuw&callback=initMap&libraries=places">
</script>
</div>
<br><br>
<!-- Find us -->
<section class="find-us">
<div class="container">
<h2>📍 Find us at:</h2>
<ul>
{% for item in acf_locations %}
<li>
<h3>
{% if item.url %}
<a href="{{ item.url }}">{{ item.title }}</a>
{% else %}
{{ item.title }}
{% endif %}
</h3>
<p>{{ item.address }}</p>
</li>
{% endfor %}
</ul>
</div>
</section>
<!-- Find us end -->
<style>
.sell-form-form:not(.submited) + .thx-text {
display: none;
}
.sell-form-form.submited {
display: none;
}
</style>
<div class="container">
{% if partners_logos %}
<!-- Бегущая строка (слайдер) -->
<div class="partners-slider-section">
<h3 style="font-size: 36px;">Our partners</h3>
<div class="partners-swiper swiper">
<div class="swiper-wrapper">
{% for i in 1..5 %}
{% for image in partners_logos %}
<div class="swiper-slide">
<a href="{{ image.url }}" target="_blank">
<img src="{{ image.src }}" alt="{{ image.alt }}">
</a>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const swiper = new Swiper('.partners-swiper', {
slidesPerView: 'auto',
spaceBetween: 30,
loop: true,
loopedSlides: 999,
loopAdditionalSlides: 999,
centeredSlides: false,
autoplay: {
delay: 1,
disableOnInteraction: false,
},
speed: 8000,
allowTouchMove: false,
freeMode: false,
cssMode: false,
watchSlidesProgress: true,
simulateTouch: false,
observer: true,
observeParents: true,
resistanceRatio: 0,
breakpoints: {
320: {
slidesPerView: 2,
},
768: {
slidesPerView: 4,
},
1024: {
slidesPerView: 5,
}
}
});
swiper.el.addEventListener('touchend', function() {
if (!swiper.autoplay.running) {
swiper.autoplay.start();
}
});
});
</script>
<style>
/* Стили для слайдера */
.partners-slider-section,
.partners-grid-section {
margin: 50px 0;
}
.partners-slider-section {
overflow: hidden;
}
.partners-swiper {
width: 100%;
padding: 20px 0;
}
.swiper-slide {
text-align: center;
height: auto;
width: auto !important;
}
.swiper-slide img {
max-height: 60px;
width: auto;
filter: grayscale(100%);
transition: filter 0.3s;
object-fit: contain;
}
.swiper-slide img:hover {
filter: grayscale(0%);
}
.swiper-wrapper {
position: relative;
width: 100%;
height: 100px;
z-index: 1;
display: flex;
box-sizing: content-box;
transition-timing-function: linear !important;
}
.partners-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.grid-item {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
border-radius: 24px;
transition: 0.3s;
}
.grid-item:hover {
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.grid-item img {
max-height: 60px;
max-width: 100%;
filter: grayscale(100%);
transition: filter 0.3s;
}
.grid-item img:hover {
filter: grayscale(0%);
}
h3 {
font-size: 26px;
color: #fff;
text-transform: uppercase;
font-weight: bold;
}
@media (max-width: 768px) {
.partners-grid {
grid-template-columns: repeat(2, 1fr);
}
.grid-item {
width: 80%;
margin: 0 auto;
}
}
@media (max-width: 480px) {
.partners-grid {
grid-template-columns: 1fr;
}
}
</style>
{% endif %}
</div>
<!-- Sell form -->
<section class="sell-form">
<div class="container sell-form__container">
<h2>Want to sell Cosmopet in your store?</h2>
<p>Join our growing network of retailers! Fill out the contact form below, and we’ll get in touch to discuss the details.</p>
<form action="" class="form--contact sell-form-form">
<input type="hidden" name="action" value="message">
<input type="text" placeholder="Your Name" name="name" class="form-inp">
<input type="tel" placeholder="Your Phone" name="phone" class="form-inp">
<input type="email" placeholder="E-mail" name="email" class="form-inp">
<textarea placeholder="Message" class="form-textarea" name="msg"></textarea>
<button type="submit">SUBMIT</button>
</form>
<div class="thx-text">
<h2>Thanks for request!</h2>
<p>We will answer your message as soon as possible</p>
</div>
</div>
</section>
<!-- Sell form end -->
</main>
</div>
{% endblock %}
Loading…
Cancel
Save