Re: Link to call the cart drawer?

Link to call the cart drawer?

MaloWanin
New Member
5 0 0

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!

Replies 11 (11)

StudioEnchant
Shopify Partner
245 40 38

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

If we helped you please Like this reply and Mark it as Solution! ❤️

Chat with us on WhatsApp


Click here to enjoy 3 months of Shopify for $1/month on select plans.
StudioEnchant
Shopify Partner
245 40 38

 

 

If we helped you please Like this reply and Mark it as Solution! ❤️

Chat with us on WhatsApp


Click here to enjoy 3 months of Shopify for $1/month on select plans.
MaloWanin
New Member
5 0 0

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. 

MartinaIct
Shopify Partner
5 0 0

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

MaloWanin
New Member
5 0 0

Thank you for your answer. 

I'm using this theme: https://themefullstack.com/

Could you please provide the Javascript code? 

MartinaIct
Shopify Partner
5 0 0

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 🙂

StudioEnchant
Shopify Partner
245 40 38

Hello again, @MaloWanin

Please provide your store's URL and we will do our best to provide a solution.

If we helped you please Like this reply and Mark it as Solution! ❤️

Chat with us on WhatsApp


Click here to enjoy 3 months of Shopify for $1/month on select plans.
MaloWanin
New Member
5 0 0

Hello @StudioEnchant, thanks for your answer. 

 

Here it is: 959930-2.myshopify.com

StudioEnchant
Shopify Partner
245 40 38

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>

 

If we helped you please Like this reply and Mark it as Solution! ❤️

Chat with us on WhatsApp


Click here to enjoy 3 months of Shopify for $1/month on select plans.
MaloWanin
New Member
5 0 0

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"...

Sahilz24_
Visitor
1 0 0

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