Fix: Only add products to the sitemap that are on display
This commit is contained in:
parent
3a96886f1d
commit
34be631abb
|
@ -25,7 +25,9 @@ module SpreeSitemapGenerator::SpreeDefaults
|
||||||
|
|
||||||
add(products_path, options.merge(:lastmod => active_products.last_updated))
|
add(products_path, options.merge(:lastmod => active_products.last_updated))
|
||||||
active_products.each do |product|
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue