Melbaspence Posted November 2, 2022 Share Posted November 2, 2022 On 10/24/2022 at 7:02 PM, Melbaspence said: @creedon hey there, I followed this a while back to redirect CTA on product page to external link. One extra thing I'm looking to add to design. For all the buttons linking out, I want to add the external link icon (attached) after the copy "Buy it now". Can you advise how to do that? Also, it looks like the text is centered right to left, but not top to bottom. Can you tell me how to fix that? Website is live - https://www.senseofspencer.com/home-decor-edit/p/raja-throw-pillow Thank you! @creedon checking in to see if I can get some help with this question. Thank you!! Link to comment
creedon Posted November 2, 2022 Share Posted November 2, 2022 On 10/24/2022 at 4:02 PM, Melbaspence said: One extra thing I'm looking to add to design. For all the buttons linking out, I want to add the external link icon (attached) after the copy "Buy it now". Can you advise how to do that? I have updated my cited code in my October 30, 2020 post adding a class to the atc button so that one can achieve effects that alter the appearance of the atc button based on it being a redirect. Then add something like the following to Store Settings > Advanced > Page Header Code Injection for the store page. Please see per-page code injection. <style> .twc-spdatcbur .sqs-add-to-cart-button-inner { align-items : center; display : flex; gap : 1em; justify-content : center; } .twc-spdatcbur .sqs-add-to-cart-button-inner::after { --size : 25px; content : ''; background-image : url( [enter image url here replacing aquare brackets] ); background-repeat : no-repeat; background-size : contain; display : inline-block; height : var( --size ); width : var( --size ); } </style> I don't have an solution for alignment issues. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support! Link to comment
lindsayc123 Posted April 12 Share Posted April 12 (edited) Hi there @creedon! What if I only want one Add to Cart button (for a single product) to link externally and the others to remain as normal Add to Cart buttons? Is there a way to do this? I managed to get the one button I want to link to the external URL but now the other Add to Cart buttons are directing to the 404 page. The site I'm working on is demostudios.ca and the pw is: demostudios2023 I only want the "Explore the Shop" under Print Shop button to link to the external URL and the others to remain normal. Edited April 12 by lindsayc123 Link to comment
creedon Posted April 12 Share Posted April 12 17 hours ago, lindsayc123 said: What if I only want one Add to Cart button (for a single product) to link externally and the others to remain as normal Add to Cart buttons? Is there a way to do this? Yes. Use my official code cited in my October 30, 2020 post. You've copied code that a member posted of my code. If someone is quoting code you don't know how they may have altered it. It also is a static snapshot of code at that point and may no longer work. Let us know how it goes. tuanphan, lindsayc123 and sayreambrosio 3 Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support! Link to comment
lindsayc123 Posted April 14 Share Posted April 14 I managed to get it working using your original code! Thanks so much! creedon 1 Link to comment
mcgharios Posted April 24 Share Posted April 24 (edited) @creedon thank you for always posting helpful content! I am using Brine 7.0 Template and i have followed the steps you have provided in this thread using the following link:https://github.com/tomsWebConsulting/twcsl/blob/main/Store Product Detail Add to Cart Button Url Redirect/README.md i set Set bailIfNoSkusInMap to false. Set url to a URL. Everything is working fine but "add to cart" is redirecting to the following:https://www.website.net/shop/www.website.net/wishlist instead of www.website.net/wishlist Can you please tell me what am i doing wrong? Edited April 24 by mcgharios avoid sharing wrong codes Link to comment
creedon Posted April 24 Share Posted April 24 9 hours ago, mcgharios said: but "add to cart" is redirecting to the following The url should be the following. url : '/wishlist', Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support! Link to comment
mcgharios Posted April 24 Share Posted April 24 1 hour ago, creedon said: The url should be the following. url : '/wishlist', Let us know how it goes. worked just fine! thank you for your assistance and helpfull content as always! creedon 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment