How to add "add to cart" button on my shopify debut theme

Solved
Excursionist
39 1 1

Hello everyone!

 

I really need your help. I don't know how to add "add to cart" button on our shopify store using debut theme. when I use my mobile I can't able to proceed to check out. Please help to fix this issue.

 

Thanks a lot.

0 Likes
Shopify Expert
2514 423 533

You want to add "Add to cart" button collection page? or any specific section.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Shopify Expert
2514 423 533

Hi,

Follow this:

1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file

#footer-newsletter button:hover {color:black; background-color: white;}

Note: If not work then send me your store url.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Excursionist
39 1 1

Here is my store url https://boutq.com/


@Jasoliya wrote:

Hi,

Follow this:

1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file

#footer-newsletter button:hover {color:black; background-color: white;}

Note: If not work then send me your store url.


 

0 Likes
Excursionist
39 1 1

Screenshot 2019-06-24 15.45.23.png

0 Likes

Success.

Shopify Expert
2514 423 533

Follow this:

Add this button in snippet->product-grid.liquid 

<input type="button" class="btn ad_to_cart" var_id="{{ product.selected_or_first_available_variant.id }}">

Add this js in asset->theme.js

$(document).on('click','.ad_to_cart',function(){
  var var_id=$(this).attr('var_id');
  $.ajax({
    type: 'POST',
    url: '/cart/add.js',
    data: {
      quantity: 1,
      id: var_id
    },
    dataType: 'json', 
    success: function (data) { 
       
    } 
  });
})
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
New Member
1 0 0

Hi @Jasoliya , I had the same query and used your solution, which worked. Thanks for that! :) The only issue is that when I click Add to Cart, although the product gets added to the cart, there is no notification. I am using debut theme and when I go to product page and add to cart, I see a little notification at the top right corner of the store notifying me the product is in the cart and I can choose to go to the cart from there. Could you help me adding this notification feature to the code you have mentioned?

Thanks

0 Likes
Shopify Expert
2514 423 533

basically you have to find code in debut theme where theme notification popup but you can show simple notification by this:

$.ajax({
    type: 'POST',
    url: '/cart/add.js',
    data: {
      quantity: 1,
      id: var_id
    },
    dataType: 'json', 
    success: function (data) { 
       alert('Added to cart');
    } 
  });

Here you can add "alert"

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like