You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.
This works but doesn't seem clean (It will also include the image in the anchor tag)
Any thoughts?
base_helper_decorator.rb
Spree::BaseHelper.class_eval do
def link_to_cart(text = nil)
text = text ? h(text) : Spree.t('cart')
css_class = nil
if simple_current_order.nil? or simple_current_order.item_count.zero?
text = "#{text}: (#{Spree.t('empty')})"
css_class = 'empty'
else
text = "#{text}: (#{simple_current_order.item_count}) <span class='amount'>#{simple_current_order.display_total.to_html}</span>"
css_class = 'full'
end
text = "<i class='icon-basket'></i> #{text}"
link_to text.html_safe, spree.cart_path, :class => "cart-info #{css_class}"
end
end
add_cart_link.html.erb.deface
icon class is replaced after ajax update of cart link<i class="icon-basket"></i>
is then removedPossible fixes:
override link_to_cart in basehelper
deface erbs with link_to_cart
The text was updated successfully, but these errors were encountered: