bacissimi Posted September 25, 2015 Share Posted September 25, 2015 Buongiorno, sul mio shop utilizzo un template leo theme che ha integrato il modulo blog. Il problema sorge quando vado a creare la sitemaps attraverso il modulo prestashop. Tutti gli articoli del blog non vengono inseriti nella sitemaps. Come posso fare? Grazie mille Link to comment Share on other sites More sharing options...
Giorgio M. Posted September 25, 2015 Share Posted September 25, 2015 Contattare lo sviluppatore del tema Link to comment Share on other sites More sharing options...
bacissimi Posted September 25, 2015 Author Share Posted September 25, 2015 Non credo dipenda dal tema. Il modulo blog nn è previsto in prestashop nel modulo sitemaps e quindi non incluso. Vorrei sapere un modo per creare la sitemaps del blog Link to comment Share on other sites More sharing options...
@diegofrancesco Posted September 25, 2015 Share Posted September 25, 2015 Può essere un problema di configurazione del modulo, in ogni caso la sitemap la puoi creare anche da te tramite tool consigliati da Google, ad esempio: http://xml-sitemaps.com Link to comment Share on other sites More sharing options...
digitalDot Posted December 17, 2015 Share Posted December 17, 2015 (edited) Hola nosotros hemos realizado una pequeña modificación del modulo de google sitemap para prestashop para que pueda incluir los blog generados por este modulo de prestashop y podáis mejorar la indexación de la tienda online y su posicionamiento. Dentro del fichero gsitemap.php hemos cambiado la función , no es perfecta y seguro que muy mejorable pero funciona perfectamente. protected function _getCmsLink(&$link_sitemap, $lang, &$index, &$i, $id_cms = 0) { $link = new Link(); if (method_exists('ShopUrl', 'resetMainDomainCache')) ShopUrl::resetMainDomainCache(); $cmss_id = Db::getInstance()->ExecuteS( 'SELECT c.`id_cms` FROM `'._DB_PREFIX_.'cms` c INNER JOIN `'._DB_PREFIX_.'cms_lang` cl ON c.`id_cms` = cl.`id_cms` '. ($this->tableColumnExists(_DB_PREFIX_.'supplier_shop') ? 'INNER JOIN `'._DB_PREFIX_.'cms_shop` cs ON c.`id_cms` = cs.`id_cms` ' : ''). 'INNER JOIN `'._DB_PREFIX_.'cms_category` cc ON c.id_cms_category = cc.id_cms_category AND cc.active = 1 WHERE c.`active` =1 AND c.`indexation` =1 AND c.`id_cms` >= '.(int)$id_cms. ($this->tableColumnExists(_DB_PREFIX_.'supplier_shop') ? ' AND cs.id_shop = '.(int)$this->context->shop->id : ''). ' AND cl.`id_lang` = '.(int)$lang['id_lang']. ' ORDER BY c.`id_cms` ASC' ); if (is_array($cmss_id)) foreach ($cmss_id as $cms_id) { $cms = new CMS((int)$cms_id['id_cms'], $lang['id_lang']); $cms->link_rewrite = urlencode((is_array($cms->link_rewrite) ? $cms->link_rewrite[(int)$lang['id_lang']] : $cms->link_rewrite)); $url = $link->getCMSLink($cms, null, null, $lang['id_lang']); if (!$this->_addLinkToSitemap( $link_sitemap, array( 'type' => 'cms', 'page' => 'cms', 'link' => $url, 'image' => false ), $lang['iso_code'], $index, $i, $cms_id['id_cms'] )) return false; } $leo_id = Db::getInstance()->ExecuteS( 'SELECT c.`id_leoblog_blog`, link_rewrite FROM `'._DB_PREFIX_.'leoblog_blog` c INNER JOIN `'._DB_PREFIX_.'leoblog_blog_lang` cl ON c.`id_leoblog_blog` = cl.`id_leoblog_blog` '. 'WHERE c.`active` =1 AND c.`indexation` =1 AND c.`id_leoblog_blog` >= '.(int)$id_cms. ' AND cl.`id_lang` = '.(int)$lang['id_lang']. ' ORDER BY c.`id_leoblog_blog` ASC' ); if (is_array($leo_id)) foreach ($leo_id as $leoart_id) { $url = _PS_BASE_URL_.__PS_BASE_URI__.'blog/'.$leoart_id['link_rewrite'].'-b'.$leoart_id['id_leoblog_blog'].'.html'; if (!$this->_addLinkToSitemap( $link_sitemap, array( 'type' => 'cms', 'page' => 'cms', 'link' => $url, 'image' => false ), $lang['iso_code'], $index, $i, $leoart_id['id_leoblog_blog'] )) return false; } return true; } Edited February 28, 2018 by nadie (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now