Re: checkout button

checkout button

Ainius12345
Shopify Partner
13 0 0

How do you redirect the checkout button to the person's cart instead of checkout when you place an item in the cart?Screenshot 2024-07-23 205357.png

 

Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
9193 1843 1875

Hi @Ainius12345 

You can do that by editing code in cart-drawer.liquid file

Replace this code 

          <button
            type="submit"
            id="CartDrawer-Checkout"
            class="cart__checkout-button button"
            name="checkout"
            form="CartDrawer-Form"
            {% if cart == empty %}
              disabled
            {% endif %}
          >
            {{ 'sections.cart.checkout' | t }}
          </button>

With this code 

          <a href="/cart" style="width: 100%;"
            id="CartDrawer-Checkout"
            class="cart__checkout-button button"
            name="checkout"
            form="CartDrawer-Form"
            {% if cart == empty %}
              disabled
            {% endif %}
          >
            {{ 'sections.cart.title' | t }}
          </a>

 

- Helpful? Like and Accept solution!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Ainius12345
Shopify Partner
13 0 0

Hi, so there were no scripts in this file and now that I changed it doesn't do anything it just redirects to checkout.

Ainius12345
Shopify Partner
13 0 0

Also when i add the item to the cart, the cart notification doesn't pop up anymore.