We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Trying to implement the add to cart button to product cart

Solved

Trying to implement the add to cart button to product cart

Mentorpublish
Explorer
63 0 14

Hi,

 

I trying to implement "add to cart" button from my product page, to my product card, but I not sure why the quantity button also show together.

 

Mentorpublish_0-1722241513603.png

I don't want the thing inside the red circle to show, but I can't seems to find the code to delete in my coding, can anyone tell me how to do it?

 

Hereby is my coding:

{% if onboarding %}
<button
type="submit"
name="add"
class="
product__add-to-cart-button
product__add-to-cart-button--onboarding
"
data-product-atc
>
<span class="text" data-product-atc-text>
{{ 'products.product.add_to_cart' | t }}
</span>
</button>
{% else %}

{% unless collection_handles contains 'coming-soon' %}
<div class="product__form" data-product-form-area>
{%
render 'product-form',
product: product,
context: 'product',
collection_handles: collection_handles,
show_recipient_form: block.settings.show_gift_card_recipient_form,
show_payment_button_quickshop: show_payment_button_quickshop
%}
</div>

{%
render 'product-notify-me',
product: product,
variant: selected_variant
%}
{% endunless %}
{% endif %}

Here is my website: https://1cabe3-26.myshopify.com/


Thank you.

 

 

Accepted Solutions (2)

Moeed
Shopify Partner
7764 2082 2567

This is an accepted solution.

Hey @Mentorpublish 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.product-thumbnail .product-form__quantity-box-wrapper {
    display: none !important;
}
</style>

RESULT:

Moeed_0-1722241782202.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

niraj_patel
Shopify Partner
2391 516 516

This is an accepted solution.

Hello @Mentorpublish 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
.product-form__quantity-box{
display: none !important;
}
.product-form__quantity-box-wrapper {
display: none !important;
}

</style>

techlyser_web_0-1722241885681.png

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

View solution in original post

Replies 4 (4)

Moeed
Shopify Partner
7764 2082 2567

This is an accepted solution.

Hey @Mentorpublish 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.product-thumbnail .product-form__quantity-box-wrapper {
    display: none !important;
}
</style>

RESULT:

Moeed_0-1722241782202.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Mentorpublish
Explorer
63 0 14

Hi @Moeed ,

 

It worked, thank you for your help.

Moeed
Shopify Partner
7764 2082 2567

Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


niraj_patel
Shopify Partner
2391 516 516

This is an accepted solution.

Hello @Mentorpublish 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
.product-form__quantity-box{
display: none !important;
}
.product-form__quantity-box-wrapper {
display: none !important;
}

</style>

techlyser_web_0-1722241885681.png

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com