Jump to content
LLlPAM888

Нет адаптации для мобильных

Recommended Posts

Не срабатывает адаптация масштабирования для мобильных устройств. Вроде как на секунду срабатывает, но потом всё равно сбрасывает до пк полноэкранной версии. через viewport resizer на пк все работает в огнях, подскажите, пожалуйста, в чем моя проблема?
flob.com.ua

изображение_viber_2020-11-04_22-24-01.jpg

Share this post


Link to post
Share on other sites

Вот в чем ваша проблема

 

image.thumb.png.1cfd047914063065601cc316df7c2d90.png

 

Замените данную строчку на

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">

 

  • +1 1

Share this post


Link to post
Share on other sites
Спойлер
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<?php $page_direction == 'rtl' ? $direction = 'rtl' : ''; ?>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="<?php echo $responsive ? 'mobile-responsive-off' : ''; ?>">
<!--<![endif]-->
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title><?php echo $title; ?></title>
	<base href="<?php echo $base; ?>" />
	<?php if ($description) { ?>
	<meta name="description" content="<?php echo $description; ?>" />
	<?php } ?>
	<?php if ($keywords) { ?>
	<meta name="keywords" content= "<?php echo $keywords; ?>" />
	<?php } ?>
	<?php foreach ($add_this_meta as $meta) { ?>
	<meta property="og:<?php echo $meta['property'] ?>" content="<?php echo $meta['content'] ?>" /> 
	<?php } ?>
	<!-- Fonts -->
	<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet">
	<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
	<!-- END Fonts -->
	<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />

	<?php if ($direction == 'rtl') { ?>
	<link href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/bootstrap-rtl.css" rel="stylesheet">
	<?php } ?>

	<link href="catalog/view/theme/<?php echo $theme_path; ?>/js/owl.carousel/assets/owl.carousel.css" rel="stylesheet">
	<link href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/material-design.css" rel="stylesheet">
	<link href="catalog/view/theme/<?php echo $theme_path; ?>/js/fancybox/jquery.fancybox.css" rel="stylesheet">
	<link href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/photoswipe.css" rel="stylesheet">
	<link href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/stylesheet.css" rel="stylesheet">

	<?php if ($direction == 'rtl') { ?>
	<link href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/rtl.css" rel="stylesheet">
	<?php } ?>

	<?php if (isset($_COOKIE['tm_color_switcher_scheme']) && !$tm_color_switcher_permission) { ?>
	<link id="color_scheme" href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/color_schemes/<?php echo $_COOKIE['tm_color_switcher_scheme'] . '.css'; ?>" rel="stylesheet">
	<?php } elseif ($tm_color_switcher_scheme) { ?>
	<link id="color_scheme" href="catalog/view/theme/<?php echo $theme_path; ?>/stylesheet/color_schemes/<?php echo $tm_color_switcher_scheme . '.css'; ?>" rel="stylesheet">
	<?php } ?>

	<?php foreach ($styles as $style) { ?>
	<link href="<?php echo $style['href']; ?>" type="text/css" rel="<?php echo $style['rel']; ?>" media="<?php echo $style['media']; ?>" />
	<?php } ?>
	<?php foreach ($links as $link) { ?>
	<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
	<?php } ?>

	<script src="catalog/view/javascript/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
	<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="catalog/view/theme/<?php echo $theme_path; ?>/js/jquery.matchHeight-min.js" type="text/javascript"></script>
	<?php foreach ($scripts as $script) { ?>
	<script src="<?php echo $script; ?>" type="text/javascript"></script>
	<?php } ?>
	<?php foreach ($analytics as $analytic) { ?>
	<?php echo $analytic; ?>
	<?php } ?>
</head>
<body class="<?php echo $class; ?>">
	<p id="gl_path" class="hidden"><?php echo $theme_path; ?></p>
	<div id="page">
		<div id="page-preloader" class="visible"><span class="preloader"></span></div>
		<div class="ie-warning">
			<a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie">
				<img src="catalog/view/theme/<?php echo $theme_path; ?>/image/warning_bar_0000_us.jpg" border="0" height="75" width="1170" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today."/>
			</a>
		</div>
		<div class="header_top_bg">
			<div class="container header_top_modules clearfix">
				<div class="header_left">
					<a href="<?php echo $account; ?>" class="header_register" title="<?php echo $text_account; ?>"><?php echo $text_account; ?>
						<?php if ($logged) { ?>								
						<a href="<?php echo $logout; ?>" class="account_logout"><?php echo $text_logout; ?></a>	
						<?php } ?>
					</a>
					<a href="<?php echo $register; ?>" class="header_login"><?php echo $text_register; ?></a>
				</div>

				<?php if ($header_top) { ?>
				<div class="header_modules"><?php echo $header_top; ?></div>
				<?php } ?>
				<?php echo $currency; ?>
				<?php echo $language; ?>			
			</div>
		</div>
		<header>
			<div class="container" style="position: relative;">
				<h1 id="logo" class="logo">
					<?php if ($logo) { ?>
					<a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive"></a>
					<?php } else { ?>
					<a href="<?php echo $home; ?>"><?php echo $name; ?></a>
					<?php } ?>
				</h1>
				<?php if ($navigation) { ?>
				<div class="header_modules"><?php echo $navigation; ?></div>
				<?php } ?>				
				<div class="shopping-cart">
					<?php echo $cart; ?>
				</div>
				<?php echo $search; ?>
			</div>
		</header>

 

вот мой код header

Edited by LLlPAM888
не помогло

Share this post


Link to post
Share on other sites

помогло удаление 

'mobile-responsive-off'

это все или нужно как то переписать? Зачем шаблонщики офнули респонсив?

Edited by LLlPAM888

Share this post


Link to post
Share on other sites
4 минуты назад, LLlPAM888 сказал:

помогло удаление 

'mobile-responsive-off'

это все или нужно как то переписать?

 

Удалили или в настройках шаблона изменили? Судя по 

class="<?php echo $responsive ? 'mobile-responsive-off' : ''; ?>"

нужно в настройках изменить

  • +1 1

Share this post


Link to post
Share on other sites

Тоесть это костыль, потом сломается опять?
я просто вытер 

'mobile-responsive-off'

в header.tpl

Edited by LLlPAM888

Share this post


Link to post
Share on other sites

РЕШЕНО

Система-настройки-шаблон-опции-RESPONSIVE-выключить
@ DariyGRAY Большое спасибо за наводку
 

Без имени-1.jpg

Share this post


Link to post
Share on other sites
6 минут назад, LLlPAM888 сказал:

Без имени-1.jpg

 

Нехорошо, что они аж туда подобные настройки вынесли. Ну да ладно. Главное, что вопрос решили

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.