Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 2

Hiding price on out of stock items?


rishisavera
Go to solution Solved by JulesHugal,

Question

  • Answers 13
  • Created
  • Last Reply

Top Posters For This Question

13 answers to this question

Recommended Posts

  • 1

There’s a pure CSS solution for this problem. Make sure the price and sold out mark are siblings in your HTML:


{@|product-status}
{@|product-price}

Then you can target the price class with a general sibling combinator selector (~) in CSS:


.sold-out ~ .product-price {
   display: none;
}

The price will only disappear when the sold out class is active.

Edited by JulesHugal
Link to post
  • 1
Guest

@JulesHugal

This worked great for a few months.. then it stopped. Here's my fork to get it working again:

page > #productList > .sold-out > div > .product-overlay > .product-meta > .product-price {display: none;}

http://cjohn.design

Link to post
  • 0

I just deleted the sales price on my item and typed in a decimal point and made item quantity 0. This allowed the item to show ‘sold out’, and $0.00 as the price.

If there is a better way, I would love to hear, but for now, this is the solution I came up with.

Link to post
  • 0

I just deleted the sales price on my item and typed in a decimal point and made item quantity 0. This allowed the item to show ‘sold out’, and $0.00 as the price.

If there is a better way, I would love to hear, but for now, this is the solution I came up with.

Edited by 16simplelife
Link to post
  • 0

Hi @Alex -- Thanks. This works great on the product list page - but then price still shows on the product detail page, along with an ADD TO CART button (which is very confusing). Would you mind to let us know how to get rid of price and add to cart on that page?Thanks a lot

Link to post
  • 0

Hello,

This article looks like just what I need but I am having difficulty using it to hide the prices on all sold out items in my Shop & Product pages:

Shop page: http://www.ashleighdix.com/shop/Product page: http://www.ashleighdix.com/shop/flushed

Please could someone advise...?

FYI: - I am running some JS to change ‘Sold Out’ to ‘Sold’ and to hide the ‘Add-to-Cart/Purchase’ button for out of stock items.

Many thanks in advance… :)

Edited by JakeNaude
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...