Shopify themes, liquid, logos, and UX
Dear,
I am using the Refresh theme and would like to change the add-to-cart into an external link button, but I don't want to use an app. I already found a guide that supports Vintage-Shopify-Themes, but I am using an 2.0-Theme.
I want to do this in bulk, so not just only with one link. It would be great if I could change the external link when I create the product.
Is there any way I can do this?
Best, Wolfi
Solved! Go to the solution
This is an accepted solution.
Hi @Wolfi , when I said file structure, I meant on your files that contain code. When you go to Edit Code > Sections > There are many files. Is there a file called main-product.liquid or product.liquid?
That contains this piece of code:
<div class="product-form__buttons">
<button type="submit" name="add" class="product-form__submit button button--full-width button--secondary" aria-haspopup="dialog">
This submit button is your add to cart button. So we should remove that and add:
<a href="URL THAT YOU WANT" class="atc-url-btn" />
And some styling should come later. 🙂
@Wolfi Why don't you hide add to cart button and add another one with another url? Or maybe, I misunderstood your problem 🙂
I forgot to say that I want to do this at bulk. That means I could hide the add to card button and add a new button. The problem is, I don't know how to add a button with a changeable external link in the product editor. Do you understand what I mean?
Yeah sure @Wolfi , you'd like to do that for every product page, add button, but each page should have different url. It's great that you're on 2.0 theme.
Not a problem. I'm not sure about the file structure on your store. Could you share url so I can take a look?
Sorry for the late respawns. What do you mean by Filestrukture? Do you mean the URL to my shop?
Here is my shop link: men-commodity.myshopify.com
Password: sownto
I don't care if everyone can see this website, I am atm just working on this function only anyway.
@MarinaPetrovicHey again, I would like to know if you could help me soon, because I need to get this to work asap. If not, that's no problem, I just need to know. Thanks
This is an accepted solution.
Hi @Wolfi , when I said file structure, I meant on your files that contain code. When you go to Edit Code > Sections > There are many files. Is there a file called main-product.liquid or product.liquid?
That contains this piece of code:
<div class="product-form__buttons">
<button type="submit" name="add" class="product-form__submit button button--full-width button--secondary" aria-haspopup="dialog">
This submit button is your add to cart button. So we should remove that and add:
<a href="URL THAT YOU WANT" class="atc-url-btn" />
And some styling should come later. 🙂
@MarinaPetrovicThanks for the reply. The filename is "main-product.liquid". Removing the add-to-card button is already working 🙂
Hi is there a way to just apply this to certain product pages and not all?
Hi @jamal4e , sure there is a way. You should add condition that check which product page are you at:
{% if product.url == '/products/product-name' %}
//your code
{% endif %}
Hello, I have done the search you mentioned and in my code it did not give me any coincidence. Is there another way and should I say another way?
Could we get this updated? Right now I'm trying to solve it and it doesn't appear the same anymore, I look forward to your comments. Thank you.
Can not see the product form button. what do i do next?
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024