When clicking on checkout it redirects back to cart - cant get to checkout page

I had a similar issue with a cart drawer’s checkout button, it’s a simple “” tag that although its “href” value is “/checkout”, it redirects to “/cart”, and it keeps doing that even when I remove its “id” and “class” attributes. And since I wasn’t familiar with the codebase, and the JavaScript files were very messed up I couldn’t figure out what was happening in a short time, I ended up overriding any events with my own code inside “onclick”:

(“id” and “class” attributes removed for clarity)


the “pushState” method is just to make it seem as though it’s an effect of “href”, because when I kept the “href=‘/checkout’”, the “onclick” code still didn’t override whatever was happening, so I had to keep the “href” empty.