Add to basket button

shaunsnaith
Tourist
29 0 1

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.

shaunsnaith_0-1631801813112.png

 

0 Likes
IttantaTech
Shopify Partner
493 53 88

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>

Thanks,
Ittanta Technologies Pvt. Ltd. | Shopify Expert
If reply is helpful, please Like and Accept Solution.
To hire us, contact us at info@ittanta.com
0 Likes

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

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
0 Likes
shaunsnaith
Tourist
29 0 1

Thanks, we'll give that a try.

0 Likes
shaunsnaith
Tourist
29 0 1

@LitExtension could you confirm which file I need to use to replace that code, I'm struggling to find the correct one.

0 Likes

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.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
0 Likes
shaunsnaith
Tourist
29 0 1

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.

 

0 Likes