Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Recommended Posts

Как отправить эту область в noindex? когда заключаю в <noindex></noindex> то отзыв полностью попадает в него, а мне нужна только часть с именем звездами и датот, не касаясь самого отзыва. Не могу понять, что, да как, им PHP блок а я в нем не селен:

<?php

$reviews = $this->model_catalog_review->getReviewsByProductId($product_id);

if ($reviews) {

foreach ($reviews as $review) {

echo '<div class="content"><p><strong>'.$review['author'].'</strong> – ';

$date = strtotime($review['date_added']);

echo date('d.m.Y',$date); ?><br />

<img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] ?>.png" alt="<?php echo $review['rating'] ?> из 5 звёзд!" /><br />

<?php echo $review['text'].'</p></div>';

}

} else { ?>

З.Ы. отзывы у меня открыты для ингдексации

З.Ы.Ы. шаблон гдефолтный

2 скрин лишний

Link to comment
Share on other sites


<?php
$reviews = $this->model_catalog_review->getReviewsByProductId($product_id);
if ($reviews) {
foreach ($reviews as $review) {
echo '<div class="content"><noindex><p><strong>'.$review['author'].'</strong> – ';
$date = strtotime($review['date_added']);
echo date('d.m.Y',$date); ?><br />
<img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] ?>.png" alt="<?php echo $review['rating'] ?> из 5 звёзд!" /></noindex><br />
<?php echo $review['text'].'</p></div>';
}
} else { ?>

пробуйте ик

Link to comment
Share on other sites


<?php
$reviews = $this->model_catalog_review->getReviewsByProductId($product_id);
if ($reviews) {
foreach ($reviews as $review) {
echo '<div class="content"><noindex><p><strong>'.$review['author'].'</strong> – ';
$date = strtotime($review['date_added']);
echo date('d.m.Y',$date); ?><br />
<img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] ?>.png" alt="<?php echo $review['rating'] ?> из 5 звёзд!" /></noindex><br />
<?php echo $review['text'].'</p></div>';
}
} else { ?>

пробуйте ик

Пропотому чтовал текст отзыва тоже попадает в noindex(

Link to comment
Share on other sites


да, ошибся... нужно было после <p>

Пробуйте ик

<?php
$reviews = $this->model_catalog_review->getReviewsByProductId($product_id);
if ($reviews) {
foreach ($reviews as $review) {
echo '<div class="content"><p><noindex><strong>'.$review['author'].'</strong> – ';
$date = strtotime($review['date_added']);
echo date('d.m.Y',$date); ?><br />
<img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] ?>.png" alt="<?php echo $review['rating'] ?> из 5 звёзд!" /></noindex><br />
<?php echo $review['text'].'</p></div>';
}
} else { ?>

просто обязано рилиить )

Link to comment
Share on other sites


да, ошибся... нужно было после <p>

Пробуйте ик

<?php
$reviews = $this->model_catalog_review->getReviewsByProductId($product_id);
if ($reviews) {
foreach ($reviews as $review) {
echo '<div class="content"><p><noindex><strong>'.$review['author'].'</strong> – ';
$date = strtotime($review['date_added']);
echo date('d.m.Y',$date); ?><br />
<img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] ?>.png" alt="<?php echo $review['rating'] ?> из 5 звёзд!" /></noindex><br />
<?php echo $review['text'].'</p></div>';
}
} else { ?>

просто обязано рилиить )

Текст отзыва тоже попадает в noindex.

<div class="content"><p><strong><noindex>'.$review['author'].'</strong>

сгделал ик в noindex попало только имя, а нужно запихнуть еещё дату и звездочки)

Link to comment
Share on other sites


<noindex><img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] ?>.png" alt="<?php echo $review['rating'] ?> из 5 звёзд!" /><br /></noindex> звездочки в noindex

помогите с датот

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

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.