↳ Notes

WooCommerce and a product inquiry

If you want to add an inquiry form to the products in your shop, you don’t necessarily have to look for another plugin to do it. You can get by with the plugin you already use for your other forms and that can be inserted into a page via a shortcode. The form should also be able to insert into the message text which URL it was sent from, otherwise you wouldn’t know which product the inquiry concerns.

Don’t worry, you won’t be inserting this shortcode for each product separately. We’ll use the woocommerce_after_single_product_summary hook and, with code in functions.php, insert the form for all products at once.

The form is inserted after the Description and before the Related products section.

Personally I like Contact Form 7, where, among other things, you then insert the following line into the Message body, which prints the URL the form was sent from.

Produkt: [_url]

Need this on your own shop?

I do these edits on client shops - from small tweaks at checkout to custom payment gateways. Indicative prices are written down, so you know what you are getting into.

Pricing for edits →

Comments

No comments yet. Be the first.

Leave a comment

By submitting a comment you give me your name, and your IP address is also stored for technical reasons (I delete it after a year). I store your email only if you tick follow comments; an unconfirmed subscription is deleted after a week together with the email, a confirmed one is kept until you unsubscribe. Details in the privacy policy →

I approve comments manually; yours will appear once approved.