Shopify themes, liquid, logos, and UX
Hello, I have an issue I hope someone can help with.
As the title suggests when clicking on the basket in the header it opens a blank tab but I would prefer it to take you to the cart instead. The hover is fine and you can check out, modify your basket and see your contents as normal but my instinct is to click on the basket and this could cause a few bounces with potential customers.
I have put the generated code below and you can see the href has javascript:void(0) and I would like this to take me to /cart. I have searched all the code for the theme and can see a couple of references to javascript:void(0) in the assets/theme.js but they do not seem to be the cause of this.
I have added custom html, css and javascript here and there but nothing that should any effect on the header or basket. Any advice or code will be greatly appreciated.
<div class="baskettop">
<div class="wrapper-top-cart">
<a href="javascript:void(0)" id="ToggleDown" class="icon-cart-arrow" target="_blank" rel="noreferrer noopener">
<i class="icon-handbag icons" aria-hidden="true"></i>
<div class="detail">
<div id="cartCount">
2
</div>
</div>
</a>
Hey @SCSW,
Remove this. 'target="_blank" means do this in a new blank page AKA new tab.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025