This feature added on version 1.05
We have added a new feature to this plugin for getting a few product information with the quote email.
You can have the product ID, URL, Stock Status, Price, SKU etc in the quote email.
You have to add our shortcode to the Contact Form 7 for this. Here is a list of the available shortcodes.
- ID: [gqb_product_id]
- URL: [gqb_product_url]
- Title: [gqb_product_title]
- SKU: [gqb_product_sku]
- Price: [gqb_product_price]
- Status: [gqb_product_status]
- Type: [gqb_product_type]
- Stock Status: [gqb_product_stock_status]
- Stock quantity: [gqb_product_stock_quantity]
- Product Variations: [gqb_product_variations]
- Product Variations Value Only: [gqb_product_variations_value_only]
- Product Variation SKU: [gqb_product_variation_sku]
- Product Description: [gqb_product_description]
- product Short Description: [gqb_product_short_description]
- Step1: Go to the CF7 form that you are showing on the Quote popup.
- Step2: Add the shortcode on both form and mail body. And Save the form .
Want to show this information in the popup form?
By default, these pieces of information are hidden in the form. It will work in the background and send with the email. But if you want to show this information in the popup form, you can enable it in the plugin settings. Go to this plugin settings page > WooCommerce settings. Scroll to the bottom. Here you will see this option.
Showing Customer Selected Product Variations
Sending custom meta in the form
You may need to send a custom product meta through the contact form. You can add this PHP code with your custom meta key in such cases. For example, here, our meta key is “_model_number“.
And we need to add this tag to the contact form 7 form and mail “gqb_product_model_number“.
add_action( 'wpcf7_init', function(){
wpcf7_add_form_tag( 'gqb_product_model_number', function( $tag ){
if( isset( $_POST['wpb_post_id'] ) ){
$id = sanitize_text_field( $_POST['wpb_post_id'] );
return '<input class="gqb_hidden_field gqb_product_model_number" type="text" name="gqb_product_model_number" value="'.esc_attr( get_post_meta( $id, '_model_number', true ) ).'">';
}
} );
} );