Browse Source

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

1-2-stable-sysmocom
Holger Hans Peter Freyther 9 years ago
parent
commit
34be631abb
  1. 4
      lib/spree_sitemap_generator/spree_defaults.rb

4
lib/spree_sitemap_generator/spree_defaults.rb

@ -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

Loading…
Cancel
Save