Solved

Changing buttons throughout my page to Add to Cart

plants4friendz
Excursionist
37 1 9

Can someone please advise on how I can make the multiple buttons throughout my page add the product to cart instead of taking the user up to the top of the page?

 

https://thespiralpath.love/products/untamed-a-journey-home-to-your-wildish-self


Thank you so much in advance!

Accepted Solution (1)

plants4friendz
Excursionist
37 1 9

This is an accepted solution.

I ended up figuring out a solution by changing the code for the page's buttons to link to a cart permalink. Thanks everyone.

View solution in original post

Replies 8 (8)

Made4uo-Ribe
Shopify Partner
5938 1429 1759

Hi @plants4friendz 

Can you please, explain more farther? Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


plants4friendz
Excursionist
37 1 9

I'd like the buttons that say "Register" throughout the page to just add the same product (at the top of the page) to cart. Is that possible? 

Made4uo-Ribe
Shopify Partner
5938 1429 1759

Do you mean a customer log.in account? For them to register into your store? 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


plants4friendz
Excursionist
37 1 9

No, I just want to have multiple buttons throughout my page that function as "Add to Cart'. Here's an example of someone offering a solution, but I think I'm missing a little bit of the previous context needed to implement this solution in my own store.

kaiyaa
Excursionist
178 13 19

Hello @plants4friendz 

Do you want to show a fixed add to cart button so user not need to scroll to top for product in their cart

Was I helpful? Buy me a coffee
For fast response Message me
Need Help Message me
plants4friendz
Excursionist
37 1 9

Yes. I'd like the buttons throughout the page that say register to function as adding the product to cart so that it doesn't interrupt the client's viewing experience (as of right now when I click register it takes me back to the top to use the add to cart). 

kaiyaa
Excursionist
178 13 19

For that you have to write javascript for function you  can check here. This will help you 
https://shopify.dev/docs/api/ajax/reference/cart#post-locale-cart-add-js

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

Was I helpful? Buy me a coffee
For fast response Message me
Need Help Message me

plants4friendz
Excursionist
37 1 9

This is an accepted solution.

I ended up figuring out a solution by changing the code for the page's buttons to link to a cart permalink. Thanks everyone.