Need to add second "ADD TO CART" button on my product pages? DEBUT THEME

Highlighted
Tourist
22 0 0

Hello. I need to add a second add to cart button on my product pages. One is just not enough for long description pages.

 

I already have a "GO BACK TO TOP" button but I don't like it. I want an actual add to cart button just like the one I have except at the the bottom of my product description. 

 

How do I accomplish this? Couldn't find ANY solid answers on how to do this so I hope someone can chime in and hook it up.

0 Likes
Shopify Partner
104 2 17

Hi,

First, you have to find the code for the Add to Cart button in the product-template.liquid file (Sections folder).

It looks something like this:

<div class="product-form__item product-form__item--submit">
  <button type="submit" name="add" id="AddToCart-{{ section.id }}" {% unless current_variant.available %}disabled="disabled"{% endunless %} class="btn product-form__cart-submit{% if product.options.size == 1 and product.variants[0].title == 'Default Title' %} product-form__cart-submit--small{% endif %}">
	<span id="AddToCartText-{{ section.id }}">
	  {% unless current_variant.available %}
		{{ 'products.product.sold_out' | t }}
	  {% else %}
		{{ 'products.product.add_to_cart' | t }}
	  {% endunless %}
	</span>
  </button>
</div>

This is usually at the end of the form.

Then, there are few ways to add a second submit button to that form, but the easiest one is just to copy the same code, inside the form.

Now, the description is outside that form usually, so you will have to copy it inside the form, too, between the two buttons.

The description part looks like this:

<div class="product-single__description rte" itemprop="description">
   {{ product.description }}
</div>

 

0 Likes
Shopify Expert
203 27 43

Hello,

 

We have created an application that allows you to easily add a second button "add to cart" on the product pages : https://apps.shopify.com/second-add-to-cart-button

0 Likes
Tourist
17 0 2

@BogdanM   I am also using the debut shopify theme and I want to know how to add a second buy/add to cart button under the product description.

 

I have tried but for some reason when I test out the 2nd buy button, it changes the quantity and variation of the product and then says the product is unavailable (but the product is in stock)

 

I am currently using the shopify dynamic add to cart button (on the debut theme)

So Im sure there is something I am doing wrong in the code somewhere.

 

 

D.H.C
0 Likes