Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Removal of Notification / Enquiry number alert
- This topic has 10 replies, 4 voices, and was last updated 6 years, 8 months ago by WCFM Forum.
- AuthorPosts
- March 11, 2018 at 5:50 am #20133info31Participant
Hi there
How do I removal of numbers on top of Notification / Enquiry if there are no notifications/enquiries.
Ideally, the numbers should only show when there is a Notification / Enquiry.
Thank you.
- March 11, 2018 at 4:18 pm #20147WCFM ForumMember
Hi,
“Ideally, the numbers should only show when there is a Notification / Enquiry.” – This is not possible to achieve using any PHP or CSS, if so then you have to edit the core files.
If you really want to achieve this then may use some JavaScript.
Or you may totally remove count display using CSS.
Thank You
- March 11, 2018 at 4:27 pm #20150info31Participant
Is that achieved easily?
Could you kindly send me the code?
Thank you.
- March 11, 2018 at 9:59 pm #20168BingalMember
OK, I will give you that.
Thank You
- March 12, 2018 at 1:56 am #20178info31Participant
Thank you Bingal. I appreciate all your help.
The level of support from WC Lovers has been amazing.
- March 12, 2018 at 5:37 am #20191WCFM ForumMember
Hi,
Here is your code for the purpose –
jQuery(document).ready(function($) { function wcfmMessageCounthide() { $notice_count = parseInt( $('.notice_count').text() ); $message_count = parseInt( $('.message_count').text() ); $enquiry_count = parseInt( $('.enquiry_count').text() ); if( !$notice_count ) { $('.notice_count').hide(); } else { $('.notice_count').show(); } if( !$message_count ) { $('.message_count').hide(); } else { $('.message_count').show(); } if( !$enquiry_count ) { $('.enquiry_count').hide(); } else { $('.enquiry_count').show(); } setTimeout(function() { wcfmMessageCounthide(); }, 10000 ); } wcfmMessageCounthide(); });
Please be careful it’s a JavaScript code, not PHP.
Thank You
Shhiv - March 12, 2018 at 5:12 pm #20232info31Guest
Hi there,
I’ve entered it into the custom javascript in my site:
https://imgur.com/a/QfYl2Unfortunately, the numbers still remain.
https://imgur.com/a/OQuBP - March 13, 2018 at 9:34 am #20251BingalMember
I send you a mail regarding this.
I must say, your site is crazy.
PHP, JS – no custom codes work ..
- March 13, 2018 at 4:24 pm #20301KevinGuest
That is why I’m so stumped. It seems like all other codes work. Only the ones provided by WCFM (which is very bizarre).
Thank you for all the help. I’m no very good in code, so I need all the help I can get.
Is the code right? Am I installing it in the right place?
- March 15, 2018 at 8:14 am #20353KevinGuest
Hi. Following up on this.
- March 15, 2018 at 8:18 am #20356WCFM ForumMember
It’s resolved.
Code added wrongly, garbage character as there.Thank You
- AuthorPosts
- The topic ‘Removal of Notification / Enquiry number alert’ is closed to new replies.