0
爲了解決這個事實,magento將當前日期放入站點地圖的lastmod字段中。這導致不良率爬,我修改的日期Sitemap.php(應用程序/代碼/本地/法師/地圖/型號/ Sitemap.php)是這樣的:網站地圖magento lastmod
/*
* Generate categories sitemap
**/
$changefreq = (string)Mage::getStoreConfig('sitemap/category/changefreq', $storeId);
$priority = (string)Mage::getStoreConfig('sitemap/category/priority', $storeId);
$collection = Mage::getResourceModel('sitemap/catalog_category')->getCollection($storeId);
foreach ($collection as $item) {
$xml = sprintf('<url><loc>%s</loc><lastmod>%s</lastmod><changefreq>%s</changefreq><priority>%.1f</priority></url>',
htmlspecialchars($baseUrl . $item->getUrl()),
substr(Mage::getModel('catalog/category')->load($item->getId())->getUpdatedAt(),0,10), //---> here the changes
$changefreq,
$priority
);
$io->streamWrite($xml);
}
那的作品,但我注意到一些的lastmod是空在我的sitemap.xml(www.edenglamode.com/sitemap.xml) 因此谷歌抱怨的一些網址,我嘗試了產品的一些修改和重新生成網站地圖,但沒辦法
<url>
<loc>
http://www.edenglamode.com/robe-courte-sexy-bustier-avec-ceinture.html
</loc>
<lastmod/>
<changefreq>hourly</changefreq>
<priority>1.0</priority>
</url>
你能幫我解決這個問題嗎?
這些說明適用於我:http://www.semantium.de/msemantic/readme.html – Theodores
我有很多產品沒有lastmod :-(我剛剛修改了幾天前的Sitemap文件,我的產品已經在那裏,我不能一一加載它們,我必須找出最好的方法來做到這一點,如果我使用默認的站點地圖文件,我所有的最後日期,但與當前日期magento,我也注意到所有產品之前創建到最後一個版本有lastmod這個湖 –
謝謝你現在好了 –