Sha256: 4cb1c2fd09db19d467946f469c13f9a570eb72071ab0b212c8462a3a3b4628e3
Contents?: true
Size: 611 Bytes
Versions: 3
Compression:
Stored size: 611 Bytes
Contents
module Spree BaseHelper.module_eval do # removed current_page? check because link_to_cart is called everywhere by spree_minicart def link_to_cart(text = nil) text = text ? h(text) : t('cart') css_class = nil if current_order.nil? or current_order.line_items.empty? text = "#{text}: (#{t('empty')})" css_class = 'empty' else text = "#{text}: (#{current_order.item_count}) <span class='amount'>#{order_subtotal(current_order)}</span>".html_safe css_class = 'full' end link_to text, cart_path, :class => css_class end end end
Version data entries
3 entries across 3 versions & 1 rubygems