Collection Page Show and Hide 'Add to Cart' Option

Collection Page Show and Hide 'Add to Cart' Option

Gii
Shopify Partner
5 0 1

Hi there,

 

I'm trying to add a show/hide feature on the collection page similar to this but we need to include variation options:

https://shop.thenewtinsomerset.com/uk/pl/182/categories/farm-shop/staples/grains-rice-pasta

 

I am using Prestige theme (not 2.0 as we had alot of customisations prior to this launching).

 

Does anyone know of any apps that use this functionality?

Replies 2 (2)

BSS-Commerce
Shopify Partner
3477 463 535

Hi @Gii ,

 

Step 1: Go to Admin -> Select the live Theme you are using -> Select Edit code

Step 2: Add the following code to the theme.liquid file and in front of the </head> tag (as shown in the image below)

x-add-to-cart-button.x-add-to-cart-button {
    display: none;
}

.action.ng-star-inserted {
    display: none;
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .shop .x-product-list-item {
        padding-bottom: 0px;
        transition: none;
    }
    .shop .x-product-list-item.adding-to-cart,.shop .x-product-list-item:hover {
        padding-bottom: unset;
    }
}

view - 2023-11-24T103048.088.png

Result: Add to cart and Option variant button hidden

view - 2023-11-24T103129.107.png

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
Gii
Shopify Partner
5 0 1

The website example I sent was purely for functionality reference. We want to use the feature on a different website.