Fix: Only add products to the sitemap that are on display

This commit is contained in:
Holger Hans Peter Freyther 2013-02-01 09:08:49 +01:00
parent 3a96886f1d
commit 34be631abb
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ module SpreeSitemapGenerator::SpreeDefaults
add(products_path, options.merge(:lastmod => active_products.last_updated))
active_products.each do |product|
add(product_path(product), options.merge(:lastmod => product.updated_at))
if product.on_display?
add(product_path(product), options.merge(:lastmod => product.updated_at))
end
end
end