Hi,
I want to place Quantity selector next to Add to Cart. I use Trade theme for my store.
My current store
The View that I’m expecting
Store link: https://shinsoku.myshopify.com/
A user seeks to reposition the quantity selector next to the “Add to Cart” button on their product page using the Trade theme.
Current Issue:
Solutions Proposed:
Two support representatives (HDL-Shin and BSSCommerce-B2B) provided CSS and JavaScript solutions:
Current Status:
The conversation includes multiple code snippets and screenshots demonstrating the implementation steps.
Hi,
I want to place Quantity selector next to Add to Cart. I use Trade theme for my store.
My current store
The View that I’m expecting
Store link: https://shinsoku.myshopify.com/
Hi @shin1106 ,
Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file base.css or theme.css
Step 3: Insert the below code at the bottom of the file → Save
.product-form:has(form[data-type="add-to-cart-form"]) .product-form__submit {
margin-top: 25px;
margin-left: 10px;
}
.shopify-payment-button .shopify-payment-button__button--unbranded:hover, .shopify-payment-button .shopify-payment-button__button--unbranded:hover:not([disabled]) {
background-color: #da3f3f !important;
color: #ffff !important;
}
Step 4: Search file theme.liquid and Insert the below code at the bottom of the file → Save
{% if template.name == 'product' %}
{% endif %}
Final Result:
Hope this can help you
Kind regards,
HDL-Shin
Hi @shin1106 , You can try follow my instructions.
[id^='Quantity-Form']:has(.price-per-item__container) {
max-width: 100% !important;
}
.product-form__submit {
margin-bottom: 0 !important;
}
result:
I hope these instructions will help you. If they are helpful, don’t forget to like and mark as the solution.
Have a nice day sir!
Tried this. The Quantity Selector is in the same position. It has not shifted next to Add to Cart
Tried this, Now the Buy button and add to cart are not of same size
Hi @shin1106 , Let’s try my code again and i’ll go to your storefront. After i’ll give the solution for “Buy button and add to cart are not of same size”
Sure
Hi @shin1106
In theme.liquid, replace the script code above with this code as follows:
I hope these instructions will help you. Have a nice day sir!