• Resolved Rahim

    (@rahimvaziri)


    Hi Woocommerce,

    Thank you for changing the world of E-Commerce.
    I have a question.
    I would like to have the word ” Free ” instead of ” 0$ ” when I enter the price=0
    and I would like to have ” Coming Soon ” when I leave the price=blank

    How can I do this?

    Kind Regards.
    Rahim

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @rahimvaziri

    This should do what you need. I tested it with 0 and 0.00 entered as values using the most current version of WordPress and WooCommerce and if you leave the price blank.

    https://gist.github.com/mtruitt/1fb7bacb4fda7548280d05aaa289e6b1

    Thread Starter Rahim

    (@rahimvaziri)

    Hi @mtruitt

    Thank you my friend.
    Yeah that solved my problem.
    But I had to remove <?php form the code.

    Now working.

    Regards.

    Thread Starter Rahim

    (@rahimvaziri)

    @mtruitt

    Is there any chance to change the color of these two words?
    I mean only in the case of printing “Free” and “Coming Soon” !

    Regards.
    Rahim

    @rahimvaziri

    The <?php is on there just to make the code highlighting show up correctly. I should have noted that.

    If you know any HTML and CSS you could add a span around them and style it based on that. Without knowing how the page looks/is styled it is hard to answer directly on the easiest way to do it.

    Thread Starter Rahim

    (@rahimvaziri)

    @mtruitt

    As I am new in this field, I could found the solution with adding this
    @mtruitt

    .price {
    color: #ec0101;
    }

    You really help me.

    Regards.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    I’m glad to hear you’re all set! 🙂

    Thread Starter Rahim

    (@rahimvaziri)

    Hi @mtruitt
    Hope you are fine.

    Thank you for previous help you gave to me.
    A simple question.
    The link and the code that you gave to me for the need is working great for the product which are not on the sale.
    I mean, when I put 0 in the main price I get , Free
    But I just wonder is there any chance to do the same for sale price?
    When I put the main price for example some dollars and put the sale price to 0 , I don’t get Free , I get 0

    Warm regards,
    Rahim.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘0 or Blank price’ is closed to new replies.