Where is controler?
in meta.post.tpl exist if …
But where config set to dispaly index or not index in page like product filters extended or other ???
[quote name=‘naujasdizainas.lt’]Where is controler?
in meta.post.tpl exist if …
But where config set to dispaly index or not index in page like product filters extended or other ???[/QUOTE]
Here u go
[QUOTE]In order to prevent the “product filter” pages from indexing, you will need (after applying the mentioned fix) to replace this part of the code:[/QUOTE]
$indexed_dispatches = array (
'index.index' => array(),
'products.view' => array('index' => array('product_id')),
'categories.view' => array('index' => array('category_id'),
'noindex' => array() // replace array() with array('features_hash') for the system not to index the feature filters' pages on a category page
),
'pages.view' => array('index' => array('page_id')),
'sitemap.view' => array()
);
with
$indexed_dispatches = array (
'index.index' => array(),
'products.view' => array('index' => array('product_id')),
'categories.view' => array('index' => array('category_id'),
'noindex' => array('features_hash') // replace array() with array('features_hash') for the system not to index the feature filters' pages on a category page
),
'pages.view' => array('index' => array('page_id')),
'sitemap.view' => array()
);
[QUOTE]in the “func.php” file located in the “addons/seo” directory of your CS-Cart. After applying the fix the “Product features” page (the compare list) will not be indexed as well. [/QUOTE]
Principas toks, jai nesiskiria kodas tarp skirtingu versiju
This fix provides the ability to define whether a requested page should be indexed or not and excludes HTTPS pages from indexing by search engines.
In order to apply the fix you should do the following:
- Add this part of the code:
```php
/**
- Define whether current page should be indexed
-
- $indexed_dispatches’s element structure:
- ‘dipatch’ => array( ‘index’ => array(‘param1’,‘param2’),
-
'noindex' => array('param3'),
-
)
- the page can be indexed only if the current dispatch is in keys of the $indexed_dispatches array.
- If so, the page is indexed only if param1 and param2 are the keys of the $_REQUEST array and param3 is not.
-
@param array $request
-
@return bool $index_page indicate whether indexed or not
*/
function fn_seo_is_indexed_page($request)
{
if (defined(‘HTTPS’)) {
return false;
}
$indexed_dispatches = array (
‘index.index’ => array(),
‘products.view’ => array(‘index’ => array(‘product_id’)),
‘categories.view’ => array(‘index’ => array(‘category_id’),
‘noindex’ => array() // replace array() with array(‘features_hash’) for the system not to index the feature filters’ pages on a category page
),
‘pages.view’ => array(‘index’ => array(‘page_id’)),
‘sitemap.view’ => array()
);
fn_set_hook(‘seo_is_indexed_page’, $indexed_dispatches);
$index_page = false;
if (isset($indexed_dispatches[CONTROLLER . ‘.’ . MODE]) && is_array($indexed_dispatches[CONTROLLER . ‘.’ . MODE])) {
$_dispatch = $indexed_dispatches[CONTROLLER . ‘.’ . MODE];
if (empty($_dispatch[‘index’]) && empty($_dispatch[‘noindex’])){
$index_page = true;
}else{
$index_cond = true;
if (!empty($_dispatch[‘index’]) && is_array($_dispatch[‘index’])) {
$index_cond = false;
if (sizeof(array_intersect($_dispatch[‘index’], array_keys($request))) == sizeof($_dispatch[‘index’])) {
$index_cond = true;
}
}
$noindex_cond = true;
if (!empty($_dispatch[‘noindex’]) && is_array($_dispatch[‘noindex’])){
$noindex_cond = false;
if(sizeof(array_intersect($_dispatch[‘noindex’], array_keys($request))) == 0){
$noindex_cond = true;
}
}
$index_page = $index_cond && $noindex_cond;
}
}
return $index_page;
}
```
above this line of the code:
?>
in the “func.php” file located in the “addons/seo” directory of your CS-Cart.
- Add this part of the code:
function fn_news_and_emails_seo_is_indexed_page($indexed_dispatches)
{
$indexed_dispatches['news.view'] = array('index' => array('news_id'));
$indexed_dispatches['news.list'] = array();
}
above this line of the code:
?>
in the “func.php” file located in the “addons/news_and_emails” directory of your CS-Cart.
- Replace this part of the code:
'sitemap_item',
'sitemap_link_object'
with this one:
'sitemap_item',
'sitemap_link_object',
'seo_is_indexed_page'
in the “init.php” [COLOR=“Red”](if does not exist check one post below)[/COLOR] file located in the “addons/news_and_emails” directory of your CS-Cart.
- Add this part of the code:
function fn_tags_seo_is_indexed_page($indexed_dispatches)
{
$indexed_dispatches['tags.view'] = array('index' => array('tag'));
}
above this line of the code:
?>
in the “func.php” file located in the “addons/tags” directory of your CS-Cart.
- Replace this part of the code:
'get_products',
'get_users'
with this one:
'get_products',
'get_users',
'seo_is_indexed_page'
in the “init.php” file located in the “addons/tags” directory of your CS-Cart.
- Add this part of the code:
{if !$smarty.request|fn_seo_is_indexed_page}
{/if}
above this line of the code:
```php
```
in the "meta.post.tpl" file located in the "skins/[CUSTOMER_ACTIVE_SKIN]/customer/addons/seo/hooks/index" directory of your CS-Cart, where [CUSTOMER_ACTIVE_SKIN] is an active skin of your storefront.
- Remove this line of the code:
```php
```
from the "meta.tpl" file located in the "skins/[CUSTOMER_ACTIVE_SKIN]/customer" directory of your CS-Cart, where [CUSTOMER_ACTIVE_SKIN] is an active skin of your storefront.
[/quote]
thnaks, test it
Above mentioned solution needs this correction (manajai versijai buvo netikslumu tai pasiule init.php faile tai pasiule sita)…
Please replace this part of the code:
fn_register_hooks(
'is_accessible_discussion',
with this one:
fn_register_hooks(
'is_accessible_discussion',
'seo_is_indexed_page',
in the mentioned file.
[/quote]
in /addons/news_and_emails/init.php
[quote name=‘naujasdizainas.lt’]thnaks, test it[/QUOTE]
cheerz
(padariau paprasciau …)
In meta.post.tpl place
```php
{if !$smarty.request|fn_seo_is_indexed_page}
{else}
{/if}
```
and in seo func.php add what need for me ex.
```php
‘product_features.view’ => array()
```
(veikia, dar neziurejau kas is to bus bet is primo zvilgsnio atrodo gerai)