Нужна ваша помощь
Есть сайт на ос 2.1 на русском. Шаблон дефолт. Добавил украинский. Установил "OCDEV.pro - SEO мультиязык для сайта". Перевел "Массовый автоматический перевод текстов, товаров, категорий, статей с Google translate API" .
Сейчас две проблемы:
1. Открываю товар site/nasadka-dlja-chistki-jazyka-dlja-irrigatora-b-well-wi-911-v-komplekte-2-nasadki. Переключаю язык ссылка становится /index.php?route=product/product&product_id=3065&path=0. Возвращаю назад на первый язык урл остается /index.php?route=product/product&product_id=3065&path=0
2. На главной часть контента выводится сразу на двух языках.
Пробовал разные варианты, не уходит задвоенный контент
Код в home.tpl:
<?php echo $header; ?>
<div class="container">
<div class="row"><?php echo $column_left; ?>
<?php if ($column_left && $column_right) { ?>
<?php $class = 'col-sm-6'; ?>
<?php } elseif ($column_left || $column_right) { ?>
<?php $class = 'col-sm-9'; ?>
<?php } else { ?>
<?php $class = 'col-sm-12'; ?>
<?php } ?>
<div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
<div class="container cat-prev">
<div class="row">
<!-- even article -->
<div class="col-md-10 col-md-push-1 col-sm-12 col-xs-12 cat-prev-block cat-prev-1">
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=1 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
</div>
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<?php } ?>
<a href="/tovaryi-dlya-diabetikov">Смотреть все</a>
</div>
</div>
<!-- =========== -->
<!-- odd article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-2">
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=15 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-right inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<a href="/nebulayzeryi-ingalyatoryi">Смотреть все</a>
</div>
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
<?php } ?>
</div>
</div>
<!-- =========== -->
<!-- even article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=22 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
</div>
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<?php } ?>
<a href="/tonometryi">Смотреть все</a>
</div>
</div>
<!-- =========== -->
<!-- odd article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-2">
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=29 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-right inner-img"/>
<?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?>
<a href="/bandaji">Смотреть все</a>
</div>
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
<?php } ?>
</div>
</div>
<!-- =========== -->
<!-- even article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=49 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
</div>
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<?php } ?>
<a href="/tovaryi-dlya-reabilitatsii" class="pull-right">Смотреть все</a>
</div>
</div>
<!-- =========== -->
<!-- Last two articles -->
<div class="col-md-5 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-12 col-sm-12 col-xs-12 desc-cat-prev text-left">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=132 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-right inner-img" style="display: block; height=200px; padding-left: 10px;"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 250)); echo $string."..."; ?></p>
<?php } ?>
<a href="/meditsinskaya-odejda">Смотреть все</a>
</div>
</div>
<div class="col-md-5 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-12 col-sm-12 col-xs-12 desc-cat-prev text-right">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=113 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img" style="display: block" width="200"/>
<p class="text-right"><?php $string = html_entity_decode(mb_substr($row['description'], 0, 250)); echo $string."..."; ?></p>
<?php } ?>
<a href="/meditsinskoe-oborudovanie" class="pull-right">Смотреть все</a>
</div>
</div>
<!-- =============== -->
</div>
</div>
<?php echo str_replace("Отзывы наших клинтов","Отзывы наших клиентов",$content_bottom); ?></div>
<?php echo $column_right; ?></div>
</div>
<!-- custom articles-->
<!-- -->
<?php echo $footer; ?>
Есть сайт на ос 2.1 на русском. Шаблон дефолт. Добавил украинский. Установил "OCDEV.pro - SEO мультиязык для сайта". Перевел "Массовый автоматический перевод текстов, товаров, категорий, статей с Google translate API" .
Сейчас две проблемы:
1. Открываю товар site/nasadka-dlja-chistki-jazyka-dlja-irrigatora-b-well-wi-911-v-komplekte-2-nasadki. Переключаю язык ссылка становится /index.php?route=product/product&product_id=3065&path=0. Возвращаю назад на первый язык урл остается /index.php?route=product/product&product_id=3065&path=0
2. На главной часть контента выводится сразу на двух языках.
Пробовал разные варианты, не уходит задвоенный контент
Код в home.tpl:
<?php echo $header; ?>
<div class="container">
<div class="row"><?php echo $column_left; ?>
<?php if ($column_left && $column_right) { ?>
<?php $class = 'col-sm-6'; ?>
<?php } elseif ($column_left || $column_right) { ?>
<?php $class = 'col-sm-9'; ?>
<?php } else { ?>
<?php $class = 'col-sm-12'; ?>
<?php } ?>
<div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
<div class="container cat-prev">
<div class="row">
<!-- even article -->
<div class="col-md-10 col-md-push-1 col-sm-12 col-xs-12 cat-prev-block cat-prev-1">
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=1 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
</div>
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<?php } ?>
<a href="/tovaryi-dlya-diabetikov">Смотреть все</a>
</div>
</div>
<!-- =========== -->
<!-- odd article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-2">
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=15 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-right inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<a href="/nebulayzeryi-ingalyatoryi">Смотреть все</a>
</div>
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
<?php } ?>
</div>
</div>
<!-- =========== -->
<!-- even article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=22 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
</div>
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<?php } ?>
<a href="/tonometryi">Смотреть все</a>
</div>
</div>
<!-- =========== -->
<!-- odd article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-2">
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=29 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-right inner-img"/>
<?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?>
<a href="/bandaji">Смотреть все</a>
</div>
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
<?php } ?>
</div>
</div>
<!-- =========== -->
<!-- even article -->
<div class="col-md-10 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-4 col-sm-4 col-xs-6 pic-cat-prev text-center">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=49 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>"/>
</div>
<div class="col-md-8 col-sm-8 col-xs-12 desc-cat-prev text-left">
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 200)); echo $string."..."; ?></p>
<?php } ?>
<a href="/tovaryi-dlya-reabilitatsii" class="pull-right">Смотреть все</a>
</div>
</div>
<!-- =========== -->
<!-- Last two articles -->
<div class="col-md-5 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-12 col-sm-12 col-xs-12 desc-cat-prev text-left">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=132 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-right inner-img" style="display: block; height=200px; padding-left: 10px;"/>
<p><?php $string = html_entity_decode(mb_substr($row['description'], 0, 250)); echo $string."..."; ?></p>
<?php } ?>
<a href="/meditsinskaya-odejda">Смотреть все</a>
</div>
</div>
<div class="col-md-5 col-md-push-1 col-sm-12 cat-prev-block cat-prev-3">
<div class="col-md-12 col-sm-12 col-xs-12 desc-cat-prev text-right">
<?php
$db2 = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
mysqli_select_db($db2,DB_DATABASE);
mysqli_query($db2,"SET NAMES utf8");;
$sql_select = "SELECT a.name, a.description, b.image FROM `" . DB_PREFIX . "category_description` as a, `" . DB_PREFIX . "category` as b WHERE a.category_id=113 and a.category_id = b.category_id";
$result = mysqli_query($db2, $sql_select);
while ($row = mysqli_fetch_array($result)){ ?>
<h3><?php echo ($row['name']); ?></h3>
<img src="/image/<?php echo $row['image']; ?>" title="<?php echo $row['name']; ?>" alt="<?php echo $row['name']; ?>" class="pull-left inner-img" style="display: block" width="200"/>
<p class="text-right"><?php $string = html_entity_decode(mb_substr($row['description'], 0, 250)); echo $string."..."; ?></p>
<?php } ?>
<a href="/meditsinskoe-oborudovanie" class="pull-right">Смотреть все</a>
</div>
</div>
<!-- =============== -->
</div>
</div>
<?php echo str_replace("Отзывы наших клинтов","Отзывы наших клиентов",$content_bottom); ?></div>
<?php echo $column_right; ?></div>
</div>
<!-- custom articles-->
<!-- -->
<?php echo $footer; ?>