A space to discuss online store customization, theme development, and Liquid templating.
Hey!
My site is single-product, so the homepage is similar to a landing page since it only presents one product.
On this homepage/landing page I have several CTA buttons that link to the product page.
I'd like to skip this step so that when a visitor clicks on my CTA buttons they directly open the cart drawer just like when they click on Add To Cart on the product page.
What is the link calling this cart drawer? Or another solution to perform my wish?
Thanks in advance!
Hey, you will need an app for that.
We would recommend this amazing app.
this app will automatically redirect the customer to the checkout, skipping the cart
Hey, no this is not what I'm looking for.
I do not want to skip the cart. I want to open the cart drawer on the click of a button, a random button and not the "Add To Cart" button.
Hello from a dev, it depends on your theme, what theme are you using? In any case, you have to use javascript to open your drawer
Thank you for your answer.
I'm using this theme: https://themefullstack.com/
Could you please provide the Javascript code?
I see your theme is not from the shopify theme store, so I can't provide you any code (as I can't see your store's code). You need a developer to do the work 🙂
Hello again, @MaloWanin
Please provide your store's URL and we will do our best to provide a solution.
Hello again @MaloWanin,
This is the code for your button:
<form id="addToCartForm" method="post" action="/cart/add">
<input type="hidden" name="id" value="46931691864396">
</form>
<a href="/pages/home_cart" class="button button--primary" onclick="event.preventDefault(); document.getElementById('addToCartForm').submit();">
BUTTON TEXT GOES HERE
</a>
Thanks for your answer @StudioEnchant!
Although this doesn't work.
It still redirects to the original button link (/pages/home_cart).
As I said, I want my random button directing to this link to open the cart drawer on click instead of the page "/pages/home_cart"...
Hey did you find the solution to link button such that it opens add to cart drawer instead of redirecting to add to cart page? could you please share it