Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 18f858c

Browse files
committed
Fix cart link bubble
Expected behavior ----------------- Given the cart has items When I view the cart Then I should see that it has a bubble with the number of items on it Actual behavior --------------- The cart link shows the text "CART: (<count>)" on top of the cart icon. It also shows the cart total amount. Cause ----- In `app/monkey_patches/spree/base_helper_monkey_patch.rb`, it seems that prepending the module with the modified `link_to_cart` helper to `Spree::BaseHelper` does not work as expected.
1 parent 3c11395 commit 18f858c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/monkey_patches/spree/base_helper_monkey_patch.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Spree
2-
module UpdateCartLink
2+
module BaseHelper
33
def link_to_cart(text = nil)
44
text = text ? h(text) : t('spree.cart')
55
css_class = nil
@@ -14,7 +14,5 @@ def link_to_cart(text = nil)
1414
end
1515
link_to text.html_safe, spree.cart_path, class: "cart-info #{css_class}"
1616
end
17-
18-
BaseHelper.prepend(UpdateCartLink)
1917
end
2018
end

0 commit comments

Comments
 (0)