Jump to content

Redirect Add to Cart Button

Recommended Posts

I'm trying to create a product page for a brand owned by an existing retailer. The goal is for users to be able to view products by this brand but when they want to purchase the item, they will be redirected to the existing retailer for purchase. The problem is that I can't find a way to change the url for the "Add to Cart" button. I can change the text to something more appropriate like "Shop Online", but I need it to send users off site when they click on it.

Link to comment
  • 6 months later...
On 4/7/2021 at 6:40 AM, ashantawines said:

The url doesn't exist. Can you check it again?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 month later...

Hi Tuan, please can you help me with this too. However I would only like to remove the "Add to Cart" button from visible products, not from the hidden products is that possible? 

Here is the link to my product page, please let me know what else you need from me. 

Thanks for your help,

https://arugula-ladybug-mnsd.squarespace.com/config/pages/60b8839e672bce3b21e6c5d8/categories/60b8839e672bce3b21e6c5df

Nell 

Link to comment
On 6/5/2021 at 12:08 PM, IvoryOcean said:

Hi Tuan, please can you help me with this too. However I would only like to remove the "Add to Cart" button from visible products, not from the hidden products is that possible? 

Here is the link to my product page, please let me know what else you need from me. 

Thanks for your help,

https://arugula-ladybug-mnsd.squarespace.com/config/pages/60b8839e672bce3b21e6c5d8/categories/60b8839e672bce3b21e6c5df

Nell 

Hi. Sent the code. You can check. if it works, you can share for other members

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 3 weeks later...

Hi @tuanphan,

I have a similar query. We're no longer selling online, so we want to change my 'Add to Cart' button link to redirect users to another Page on the site. 

I added to the Custom CSS to remove Add to Cart, and added a new button, the new button appeared way below to product information on the page and couldn't be moved.

All products are hidden until we can display them without purchasing options - but here's a sample: https://www.homesavers.ie/new-page-1

Michelle

Link to comment
1 hour ago, MichelleMcSweeney said:

Hi @tuanphan,

I have a similar query. We're no longer selling online, so we want to change my 'Add to Cart' button link to redirect users to another Page on the site. 

I added to the Custom CSS to remove Add to Cart, and added a new button, the new button appeared way below to product information on the page and couldn't be moved.

All products are hidden until we can display them without purchasing options - but here's a sample: https://www.homesavers.ie/new-page-1

Michelle

Hi Michelle,

You can hide your current add to cart button and add a new button with the below codes.

 

<style>
.sqs-add-to-cart-button-wrapper {
    display : none!important;
}

.custom-button {
    border: 1px solid;
    padding: 10px 15px
}
</style>

<script>
$(document).ready(function() {
  $('<a class="custom-button" href="/page-url">Button name</a>').insertAfter($(".ProductItem-details-excerpt ul"))
});    
</script>

 

Screenshot 2021-06-22 at 20.47.57.png

Link to comment
  • 8 months later...

Hi @tuanphan we are trying solve a similar problem on a client's site of ours. I tried the code above but it completely removes the button instead of updating/redirecting it. Can you help? Any advice would be greatly appreciated. Our site url is: https://coyote-bagpipe-yyjt.squarespace.com/ourwork/ferb6jya7878ba7-ejszk-msxa2-rgdj3-zb48c-z2b53-el68s-n997b-eka39 and the password to view it is Stal2022!

 

Thank you!

Link to comment
6 hours ago, MinerMan2022 said:

I tried the code above but it completely removes the button instead of updating/redirecting it.

That code was not designed for your template.

Please see the following for a more generalized solution.

If you want all your buttons to redirect follow the Note below my Quick Install instructions.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.