Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Inquiries Tab message
- This topic has 11 replies, 2 voices, and was last updated 4 years, 11 months ago by Sushobhan.
- AuthorPosts
- November 13, 2019 at 9:25 am #92126productsexportParticipant
When the product doesn’t have any inquirie, the Inquiries Tab shows:
General Inquiries
There are no inquiries yet.Can I change that to something different:
For example:
1) If there are no inquiries on the product yet, I want the message to say:
Contact the vendor to inquire about this product.
[Button to contact the vendor]2) If there are publically displayed inquiries, I want the message after the “publically displayed inquiries” to say:
Contact the vendor to inquire about this product.
[Button to contact the vendor] - November 16, 2019 at 1:36 pm #92549SushobhanKeymaster
There are two part of the answer-
First, changing strings – You can do that easily using string translation(no coding involved). You can use Loco translate plugin for this purpose. (How to use Loco translate – https://www.youtube.com/watch?v=ZUPhsoUm-QE)
Alternatively, you can override the template file located at:
wc-frontend-manager\views\enquiry\wcfm-view-enquiry-tab.phpSecond, for adding the [Button to contact the vendor] – use the following code to achieve this
add_filter('wcfm_is_pref_enquiry_button', '__return_false');
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/- November 20, 2019 at 7:01 pm #93133productsexportParticipant
Thank you for your reply. I will try LOCO as you have suggested
I tried the code it added a button in the inquiry tab as I wanted, but took away the “main inquiry button” I have under the add to cart button. Can you modify the code to allow the two buttons?
- November 21, 2019 at 2:58 pm #93205SushobhanKeymaster
Please give me a snapshot of the issue.
- November 22, 2019 at 2:20 pm #93427productsexportParticipant
When I add the code, it adds a button in the inquiry tab, but the existing button (the orange one in the attached snapshot) disappears. I want to keep both if possible. Or even add the form inside the inquiry tab.
Attachments:
You must be logged in to view attached files. - November 23, 2019 at 2:18 pm #93603SushobhanKeymaster
Use the following snippet to do that.
add_filter( 'wcfm_is_pref_enquiry_button', '__return_false' ); function my_wcfm_enquiry_button() { echo do_shortcode('[wcfm_enquiry]'); } add_action( 'woocommerce_single_product_summary', 'my_wcfm_enquiry_button', 35 );
Thanks!
- December 3, 2019 at 3:18 pm #95827productsexportParticipant
Yes, that worked nicely. How can I match the color of the buttons?
- December 4, 2019 at 1:45 pm #95992SushobhanKeymaster
You can do that via css. Which one you want to change the one inside ‘Inquiries’ tab or the one after ‘Add to Cart’ button?
- December 5, 2019 at 5:21 pm #96162productsexportParticipant
I want to change the one inside ‘Inquiries’ tab to match the one after ‘Add to Cart’ button
- December 5, 2019 at 5:44 pm #96166SushobhanKeymaster
Then you can use ‘span.add_enquiry’ class to change the appearance of that button using css like the following-
span.add_enquiry {
background: blue; //use the color you want to use
} - January 9, 2020 at 5:06 pm #101470productsexportParticipant
Ok, the question remains, how can I change the default message from
There are no inquiries yet.
to
Click inquiry button to contact the vendor about this product.
- January 14, 2020 at 12:36 pm #101990SushobhanKeymaster
Hello,
As I suggest you earlier, you can use Loco translate plugin for this purpose. (How to use Loco translate – https://www.youtube.com/watch?v=ZUPhsoUm-QE)
It’s the easiest way to achieve what you want. Search for string “There are no enquiries yet.”, (enquiries not inquiries). Refer to the image https://ibb.co/xYZHS5J
Thanks
- AuthorPosts
- The topic ‘Inquiries Tab message’ is closed to new replies.