• Resolved jonthomaswp

    (@jonthomaswp)


    My site has a “contact us on the form below” form.

    In the back I had to remove the 0.00 price in the field price to remove all the price details on the front end. Just allows JUST the contact form to appear.

    This is on 12 products.

    Now search console giving me errors and I fear it could be harming site?

    I did read it’s just a warning, not to worry, but how can you not worry when the almighty master google is giving you big fat red text.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @jonthomaswp ,

    Okay, let’s first understand the end goal of the changes.

    Your products do not need any price option because there is no add-to-cart feature for them. You have added a contact form to get the details from the customer. Have I got the right idea?

    Removing the price option from the backend might not be required here. You can use this filter in your theme’s functions.php file to remove the add to cart button and price option from frontend –

    add_filter( 'woocommerce_is_purchasable', '__return_false');
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );

    This should not produce any error for you in console or in Google. Let me know the update.

    Thank you ??

    Thread Starter jonthomaswp

    (@jonthomaswp)

    Hi thanks for your help!

    Before I add code and break my site I will just explain a little more.

    I have products, whereby you select many options, which creates a sheet for us to create a custom product from – nothing technical, just size, colours, attachments etc..

    I later added more technical products that needed an enquiry only as they were too complex for people to simply choose options on…

    This created a temp issue as when I added the contact form code in the product description it still shown all the options.. Not good..

    Someone told me to take the “field price” out, which was always set at £0.00…. Because the price was dependent on the products options..

    Still with me?

    Will thise code sort that?

    So just add to the bottom of the functions.php?

    Will it not cause issues with the products with 0.00 in there, cause I have a mixture of products with and without options and contact form.

    Hello @jonthomaswp ,

    First of all, you can always use a snippet plugin to add custom codes. This will ensure that you do not break the site with custom code.

    Now, the code I shared is actually to remove the price field and “Add to cart” button for all products on your site. You can run this depending on different conditions.

    You can use extension like this – Hide Price & Add to Cart Button to have an easier option to hide these for specific products.

    If you want to go for custom code solution, this article has some examples – Remove both “Add to cart” and “Read more” Buttons

    So, you can hide the price and the add to cart button when you use the form in a product.

    I hope this will help you.

    Thank you ??

    Thread Starter jonthomaswp

    (@jonthomaswp)

    Thanks for your help, will read over all asap.

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search Console – Missing Field Price Error’ is closed to new replies.