• Resolved Omtesla

    (@itesla)


    Hello
    So I was strugling with a plugin and found a solution, have set most of products to 0 price and used a code in functions,php to display a text in place of 0 price, this I needed because of Make a Offer plugin I use there is no price required in some cases, now need to disable the Submit button for such 0 price products so the end user can’t buy it by 0 price.
    Is it possible to disable submit button on checkout page?
    Thank you.

    • This topic was modified 3 years, 6 months ago by Omtesla.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Niall a11n

    (@wpniall)

    Hi @itesla,

    Thanks for reaching out us and sharing details about your use case. I’m happy to help you!

    Hmm, disabling the submit button on the checkout page would require some custom JavaScript to be written for your site, which is a bit outside of the specialty of most of us here.

    As your post involves a fairly complex development topic, I’m going to leave it open for a bit to see if anyone is able to chime in and help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources about WooCommerce development.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    (Removing the checkout page button would be a bit easier, but I think that might not a good option for your use case)

    Thank you!

    Thread Starter Omtesla

    (@itesla)

    Hello
    Unfortunatelly I did not had any sales yet, that is how with domain names, need years to get a sale.
    That is why I can’t afford at the moment personal development, I though there is some filter can be added to functions file.
    Thank you anyway.
    P.s. I prefer to write in forums rather than feeding Zuckerberg with content, this is one of the reason why domains don’t sell, because FB eats peoples websites away.

    Thread Starter Omtesla

    (@itesla)

    I also realized now that if I disable the submit button, it will disable it at all when someone try to buy a product with the set price, so indeed this will require custom dev, because the button must be hidden for 0 price and display for higher price.
    If no one is willing to help in some days you can close this case.
    P.s. i can make a small donation if there is an easy to write code for this.
    Thank you.

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @itesla!

    Yes, it sounds like you need a conditional solution > disable checkout when price => 0 and if not, keep the checkout enabled.

    The easiest thing I can think of at this time would be to use something like setting a minimum order amount in WooCommerce and disable checkout page if it is not met. There is some code available for that here https://gist.github.com/ChromeOrange/33af495f6afdd5d7a397 and https://docs.woocommerce.com/document/minimum-order-amount/

    You can learn more about adding code to your site here:

    https://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/

    Cheers!

    Thread Starter Omtesla

    (@itesla)

    Hello @rynald0s
    It seems the code from Github is what I need, it’s not perfect but it does prevent the checkout to happen at zero price.
    If you can share your PP I can make a small donation.
    P.s. I think WP website should add a donate button for people here helping others, I have seen such on GSMhosting Forum.
    Thank you.

    • This reply was modified 3 years, 6 months ago by Omtesla. Reason: idea
    Mirko P.

    (@rainfallnixfig)

    Hey @itesla,

    We’re happy to hear that Rynald0s’s solution worked for you! According to the forum guidelines users are not allowed to pay for help. We get special gratification when we manage to help other users on this forum, and in line with the common spirit of the WooCommerce Community you can return the favor to other users!

    Have a good day!

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @itesla!

    As @rainfallnixfig said, no payment! It has been an absolute pleasure and I am glad we could help.

    Please stay safe and have a fantastic day further.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable Free Product Submit Button on Checkout’ is closed to new replies.