diff --git a/lib/solidus_sitemap/solidus_defaults.rb b/lib/solidus_sitemap/solidus_defaults.rb index f8f751a..56ebfe2 100644 --- a/lib/solidus_sitemap/solidus_defaults.rb +++ b/lib/solidus_sitemap/solidus_defaults.rb @@ -9,25 +9,25 @@ def default_url_options end def add_login(options = {}) - add(login_path, options) + add(main_app.login_path, options) end def add_signup(options = {}) - add(signup_path, options) + add(main_app.signup_path, options) end def add_account(options = {}) - add(account_path, options) + add(main_app.account_path, options) end def add_password_reset(options = {}) - add(new_spree_user_password_path, options) + add(main_app.new_spree_user_password_path, options) end def add_products(options = {}) available_products = Spree::Product.available.distinct - add(products_path, options.merge(lastmod: available_products.last_updated)) + add(main_app.products_path, options.merge(lastmod: available_products.last_updated)) available_products.find_each do |product| add_product(product, options) end @@ -45,7 +45,7 @@ def add_product(product, options = {}) opts[:video] = [video_options(primary_video.youtube_ref, product)] end - add(product_path(product), opts) + add(main_app.product_path(product), opts) end def add_pages(options = {}) @@ -73,7 +73,7 @@ def add_taxons(options = {}) end def add_taxon(taxon, options = {}) - add(nested_taxons_path(taxon.permalink), options.merge(lastmod: taxon.products.last_updated)) if taxon.permalink.present? + add(main_app.nested_taxons_path(taxon.permalink), options.merge(lastmod: taxon.products.last_updated)) if taxon.permalink.present? taxon.children.each { |child| add_taxon(child, options) } end