Home Forums WoodMart support forum Remove ‘Add to Cart’ on hover.

Remove ‘Add to Cart’ on hover.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #501988

    barry.osullivan47
    Participant

    Hello,

    I would like to remove the ‘Add to Cart’ element when the user hovers over the price of a product in a product archive.

    Can you please suggest a method or CSS element I can use to do this?

    Thanks very much

    #502075

    Hello,

    Please insert the site admin access into the Private content below the message area. We will take a closer look at the case.

    Best Regards

    #502300

    barry.osullivan47
    Participant

    Here are the details

    #502366

    Hello,

    Please add this code to the Theme Settings > Custom CSS > Global:

    @media (min-width: 1025px){
    .wd-hover-alt:not(.wd-variation-active) .swap-elements :is(.price,.wd-add-btn) {
    display:none;
    }
    }

    Best Regards

    #502380

    barry.osullivan47
    Participant

    Thank you for that solution, however that hides the price too.

    I would like to just display the price and not an ‘add to cart’ button.

    #502516

    Hello,

    Please replace the code with this one:

    .wd-hover-alt .wd-add-btn>a {
    display:none;
    }

    If you have any questions please feel free to contact us.

    Best Regards

    #502531

    barry.osullivan47
    Participant

    Thanks.

    However, that removes the price on hover.

    I would like the price to stay, basically removing any hover function.

    Thanks

    #502553

    Hello,

    Please remove the previous code and leave this code only:

    .wd-hover-alt .wd-add-btn>a {
    display:none;
    }

    Best Regards

    #503036

    barry.osullivan47
    Participant

    Hello,

    Again that just removes the ‘Add to Cart’ link. So when a user hovers over the price, the price disappears, I would like the price to remain on hover.

    Thanks

    #503206

    Bogdan Donovan
    Keymaster

    Hi,

    Sorry for misunderstanding. Please replace all previous custom code with this one:

    @media (min-width: 1025px) {
    	body .wd-hover-alt:not(.wd-variation-active):is(.purchasable,.product-type-grouped):hover .swap-elements {
    		transform: none;
    	}
    }
    
    body .wd-hover-alt .wd-add-btn {
    	display: none;
    }

    This code hides “add to cart” button and removes the price animation.

    Kind Regards

    #503268

    barry.osullivan47
    Participant

    Great, thanks very much!

    That works as expected.

    #503315

    You are welcome!

    Wish you a wonderful day!

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Remove ‘Add to Cart’ on hover.’ is closed to new replies.