- Posts: 146
- Thank you received: 2
Best way to Selectively No Index Some Products
11 years 1 month ago #215972
by sison2466
Replied by sison2466 on topic Best way to Selectively No Index Some Products
Yup, that is actually the way I have it.
Please Log in or Create an account to join the conversation.
11 years 1 month ago #215975
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Best way to Selectively No Index Some Products
Hi,
Can you please try with that code ?
So we will avoid any kind of problem between "show" and "listing" views 
Regards,
Can you please try with that code ?
Code:
if(isset($this->element))
$noindex = strtolower(trim($this->element->meta_noindex));
else
$noindex = strtolower(trim(@$this->row->meta_noindex));
if($noindex == 'true') {
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 3 months ago #247199
by Yumul
Replied by Yumul on topic Best way to Selectively No Index Some Products
Hi,
Does it work?
Regards,
Does it work?
Regards,
Please Log in or Create an account to join the conversation.
4 years 3 months ago #343619
by levelup
Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.
Replied by levelup on topic Best way to Selectively No Index Some Products
Hi nicolas
It seems that this solution cannot be implemented in version 4.6.1. I can't find the link to add the no-index rel to it.
It seems that this solution cannot be implemented in version 4.6.1. I can't find the link to add the no-index rel to it.
Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.
Please Log in or Create an account to join the conversation.
4 years 3 months ago - 4 years 3 months ago #343633
by Philip
Replied by Philip on topic Best way to Selectively No Index Some Products
Hello,
Sorry for this return but can you precise your idea, where didn't you find the "$link", in which view please.
We have to check is the url link and therefore the modification should always be possible, or else we are not talking about the same thing, hence my request for clarification.
Regards
Sorry for this return but can you precise your idea, where didn't you find the "$link", in which view please.
We have to check is the url link and therefore the modification should always be possible, or else we are not talking about the same thing, hence my request for clarification.
Regards
Last edit: 4 years 3 months ago by Philip.
The following user(s) said Thank You: levelup
Please Log in or Create an account to join the conversation.
4 years 3 months ago - 4 years 3 months ago #343701
by levelup
Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.
Replied by levelup on topic Best way to Selectively No Index Some Products
Hi Philip
In Hikashop version 4.4.4 in the listing_img_title layout,, I created a custom field of the product type called indexnoindex, which will add the rel="nofollow to the end of the product link when it is set to yes on the product management page.
I can't find the product link in version 4.6.1
In Hikashop version 4.4.4 in the listing_img_title layout,, I created a custom field of the product type called indexnoindex, which will add the rel="nofollow to the end of the product link when it is set to yes on the product management page.
Code:
<?php
/**
*------ Add this and add 'rel="nofollow"' at the end of product link in line 40 and 80
*/
$index_noindex = '';
if($this->row->indexnoindex == '0' || $this->row->indexnoindex == '' ){
$index_noindex = '';
}else{
$index_noindex = 'rel="nofollow"';
}
?>
<?php if($haveLink) { ?>
<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>" <?php echo $index_noindex;?> >
<?php } ?>
Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.
Last edit: 4 years 3 months ago by levelup.
Please Log in or Create an account to join the conversation.
4 years 3 months ago - 4 years 3 months ago #343706
by Philip
Replied by Philip on topic Best way to Selectively No Index Some Products
Last edit: 4 years 3 months ago by Philip.
The following user(s) said Thank You: levelup
Please Log in or Create an account to join the conversation.
Time to create page: 0.081 seconds