Site logo

Archived topic

Hide original price and show only sale price

11 replies · Started by roadlink on October 3, 2020

Viewing posts 1–12 of 12

Hi,

I am using below css to hide original price for "composite products". (Woodmart theme)
Same code doesn't work with GP and Prime.

Any idea?


/* Composite product remove previous price */
.archive .product-type-composite .price .from {
    display: none!important;
}

.single-product .product-type-composite .price .from {
    display: none!important;
}

Hi there,

Try this CSS:

.woocommerce ul.products li.product .price del {
    display: none;
}
.woocommerce div.product p.price del, .woocommerce div.product span.price del {
    display: none;
}

Hi Leo,

Thank you.
I have changed your code a bit. This one works good in single product pages.
If it is composite product, It is hiding original price and if it is simple product original price is there.

.woocommerce .product-type-composite div.product p.price del, .woocommerce .product-type-composite div.product span.price del {
    display: none;
}

This one is also works good in shop pages.

.archive .product-type-composite ul.products li.product .price del {
    display: none;
}

But i couldn't solve the issue for main page, which is using woocommerce shorcodes to show products.

Hi,

This should work on the products on your homepage.

.woocommerce ul.products li.product .price del {
    display: none;
}

Hi Elvin,

Yes it is working but delete for all products.
I want to delete only for composite products.
Thanks

Your site seems to be in maintenance mode.

Can you open it up so we could take another look? Thanks.

hi,
I added pass.

Hi there,

can you share the URL to one of your composite products?

sure here it is.

So are all products on that page the composite products?

I have managed to fix it with below code in category pages.
Just couldn't hide from main page, which created with woocommerce shortcodes.

Thanks for help.

.archive .product-type-composite ul.products li.product .price del {
    display: none;
}
.woocommerce .product-type-composite div.product p.price del, .woocommerce .product-type-composite div.product span.price del {
    display: none;
}

Glad to hear :)

This archived topic is closed to new replies.