|
|
|
@ -2,7 +2,7 @@ module SpreeSitemapGenerator::SpreeDefaults
|
|
|
|
|
def default_url_options |
|
|
|
|
{:host => SitemapGenerator::Sitemap.default_host} |
|
|
|
|
end |
|
|
|
|
include ::Rails.application.routes.url_helpers |
|
|
|
|
include Spree::Core::Engine.routes.url_helpers |
|
|
|
|
|
|
|
|
|
def add_login(options={}) |
|
|
|
|
add(login_path, options) |
|
|
|
@ -21,7 +21,7 @@ module SpreeSitemapGenerator::SpreeDefaults
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def add_products(options={}) |
|
|
|
|
active_products = Product.active |
|
|
|
|
active_products = Spree::Product.active |
|
|
|
|
|
|
|
|
|
add(products_path, options.merge(:lastmod => active_products.last_updated)) |
|
|
|
|
active_products.each do |product| |
|
|
|
@ -30,7 +30,7 @@ module SpreeSitemapGenerator::SpreeDefaults
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def add_taxons(options={}) |
|
|
|
|
Taxon.roots.each {|taxon| add_taxon(taxon, options) } |
|
|
|
|
Spree::Taxon.roots.each {|taxon| add_taxon(taxon, options) } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def add_taxon(taxon, options={}) |
|
|
|
@ -38,4 +38,3 @@ module SpreeSitemapGenerator::SpreeDefaults
|
|
|
|
|
taxon.children.each {|child| add_taxon(child, options) } |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|