• Resolved serew

    (@serew)


    Good morning,
    I would like to remove the price from out of stock products and here on your forum I found the code to do it.

    Problem: my client has modified the .price class with css so inserting the code from function.php eliminates the price but the background remains that they have entered white (so I see a white ball where the price used to be).

    Question: How can I solve the problem? Is it possible to assign a class to the price of the out of stock product?
    thank you so much

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    but the background remains that they have entered white (so I see a white ball where the price used to be).
    Question: How can I solve the problem? Is it possible to assign a class to the price of the out of stock product?

    Some quick CSS should also do the trick.
    Where can we see this?

    Kind regards,

    Thread Starter serew

    (@serew)

    Plugin Support EtienneP a11n

    (@etiennep)

    Hi @serew

    That product seems to be in stock again, so we can’t test with that one, but the following CSS will remove the price if the product is out of stock and should also remove the background customizations;

    .outofstock .price{display:none}
    
    .outofstock .amount{display:none}

    The first one removes the price from the out of stock item’s product page and the second removes the price from the out of stock item in the shop and category pages.

    Thread Starter serew

    (@serew)

    fantastic! thanks!!!!!!

    Plugin Support EtienneP a11n

    (@etiennep)

    Pleasure!

    I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Delete price from out of stock products’ is closed to new replies.