Why does clicking on the basket icon open an empty tab?

SCSW
Visitor
1 0 0

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&colon;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> 

 

Reply 1 (1)

ThePrimeWeb
Shopify Partner
2045 592 464

Hey @SCSW,

 

Remove this. 'target="_blank" means do this in a new blank page AKA new tab.

ThePrimeWeb_0-1713626818718.png

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!