Liquid, JavaScript, themes, sales channels
Hello All,
At the moment on our collection pages the 'Add to Basket' button will add a product to cart and send them to said cart. However we want to change it that so that it takes the customer to the product page. Is there are way of doing this. I know how to change the button text no problem but changing the link where the button directs is proving difficult.
Is there anyone that can help with this?
I've asked elsewhere but not had any responses. From what I can see it's this code that needs changing but I've tried searching the code but can't find it to edit it and when I do find it I have no idea what to change it to to make it work.
Hello , @shaunsnaith
I don't get much idea from the code given.
But you can try like this. Just remove the code between <li></li>
and put this code :- <a href="{{product.url}}">your button name</a>
Hi @shaunsnaith,
Please change code as below:
<form action="/cart">
<input type="submit" value="View Basket" class="btn auto-full-width outline" />
</form>
=>
<a href="{{product.url}}" class="btn auto-full-width outline">View Basket</a>
Hope it helps!
If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck
Thanks, we'll give that a try.
@LitExtension could you confirm which file I need to use to replace that code, I'm struggling to find the correct one.
Where did you find the screenshot?
Or you can send me the code of the sections/collection-template.liquid file. I will check and show you how to find the correct file.
I viewed the source of the live site. We ended up getting a guy to sort the code out for us, I didn't want to risk screwing the site up for the sake of $20. Thanks for your help though.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024