• Resolved yousuft

    (@yousuft)


    Hi,

    Not sure if I’m doing something wrong in the settings but if I leave set the plugin to “input” and then enter no value in the input field, the product is added at 0.00 (Free).

    If however I enter a negative value like -5 for Name your price then it subtracts that amount from the shopping cart.

    Either are options I don;t want to give the user.

    Is it possible to set the method to input but validate that a product can only be added to the cart if a minimum price of lets say 50.00 is typed into the input? There is no maximum, but I have to have a minimnum.
    Also no negative values should be allowed on the input.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @yousuft ,

    Thanks for reporting this. I’ll write a note to our developers so that they can check and fix this in the next update.

    I’ll keep you posted when there is any news from our developers.

    Best regards.

    Thread Starter yousuft

    (@yousuft)

    I also found another bug:

    If the status is set to enabled on the plugin’s setting page then all products in the store are set to “name your price” which may be dangerous for stores like mine ??

    Have a look at https://whiteteastudios.com if you;re interested to see how I’ve structured my store.

    Good luck with the plugin ??

    Plugin Author WPClever

    (@wpclever)

    Hi,
    It’s not a bug, our plugin is designed that way. You can disable it in the Name Your Price tab of Product Data section in each individual product page.
    Best regards.

    @yousuft
    I just realized that the check for “not empty” is even super easy nowadays, just needed to edit wp-content/plugins/wpc-name-your-price/includes/wpc-woonp-core.php

    adding required to line 154
    size="4" required />

    hope this can be included in the next version @wpclever , I think it should fit to all use cases ?!

    The “not negative” check can be accomplished by adding a minimum value in the product pricing, but I guess it would make sense to add this to the code. I would do it like this:
    if (!is_numeric ( $woonp_min ) ) { $woonp_min = 0; }
    in line 109

    Hi, I am experiencing this issue as well. Even with a minimum price if the user makes the input ’empty’ it allows the product to be purchased for nothing. This is a great plugin but this issue makes it dangerous to use. Is this going to be fixed any time soon?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Allows zero and negative pricing’ is closed to new replies.