如何在结帐进度中连接侧边栏?

时间:2011-04-07 10:49:52

标签: spree

解决了将def seo_url复制到checkout helper的问题。

您好,我正在尝试在结帐过程中连接侧边栏。
但我明白了:

显示c:/Projects/musthave/spree_theme_musthave/app/views/shared/_taxonomies.html.erb第6行:

#<#:0x799d910>的未定义方法`seo_url' 提取的来源(第6行):

3:   <ul class="navigation-list">  
4:    <li<%= ' class="current"' if @taxon && @taxon == taxonomy.root %>> <div class="sidebar_taxon"><%=taxonomy.name.singularize %></div></li>
5:    <% taxonomy.root.children.each do |taxon| %>
6:      <li<%= ' class="current"' if @taxon and ([@taxon] + @taxon.ancestors).include?(taxon) %>><%= link_to taxon.name, seo_url(taxon) %></li>
7:      
8:    <% end %>
9:  </ul>

`seo_url'仅在'products_helper.rb'中提及:

def seo_url(taxon, product = nil)    
  return '/t/' + taxon.permalink if product.nil?
  warn "DEPRECATION: the /t/taxon-permalink/p/product-permalink urls are "+  
    "not used anymore. Use product_url instead. (called from #{caller[0]})"
  return product_url(product)
end

无法弄清楚如何让它发挥作用。到处搜索,但找不到任何有用的东西。

试过这个,但它没有帮助:

def get_taxonomies
  @taxonomies ||= Taxonomy.find(:all, :include => {:root => :children})
  @taxonomies.select { |t| !t.root.nil? }
end

感谢您的任何建议。

1 个答案:

答案 0 :(得分:0)

您是在尝试展示分类单元,还是在尝试显示侧边栏?

如果它只是你想要的侧栏你不需要添加你的分类,你可以尝试

<% content_for :sidebar do %>
  <Add your sidebar content here...>
<% end %>

由于