自定义狂欢电子商务视图
Customizing spree e-commerce view
我正在定制我的 spree 电子商务应用程序。起初我添加了 spree_bootstrap_frontend
gem 并且我想自定义 oredres/edit 视图如下:
Deface::Override.new(:virtual_path =>"spree/orders/edit",
:name => "continue_shopping",
:replace => "erb[loud]:contains('link_to t(:continue_shopping), products_path')",
:erb => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>")
但没有变化。
你能帮我第一个自定义视图吗?
我认为你应该只使用 :text
键而不是 :erb
:
Deface::Override.new(:virtual_path =>"spree/orders/edit",
:name => "continue_shopping",
:replace => "erb[loud]:contains('link_to Spree.t(:continue_shopping), products_path')",
:text => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>")
我正在定制我的 spree 电子商务应用程序。起初我添加了 spree_bootstrap_frontend
gem 并且我想自定义 oredres/edit 视图如下:
Deface::Override.new(:virtual_path =>"spree/orders/edit",
:name => "continue_shopping",
:replace => "erb[loud]:contains('link_to t(:continue_shopping), products_path')",
:erb => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>")
但没有变化。 你能帮我第一个自定义视图吗?
我认为你应该只使用 :text
键而不是 :erb
:
Deface::Override.new(:virtual_path =>"spree/orders/edit",
:name => "continue_shopping",
:replace => "erb[loud]:contains('link_to Spree.t(:continue_shopping), products_path')",
:text => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>")