Send Inquiry Popup not working
This topic contains 9 replies, has 5 voices, and was last updated by Stiofan O’Connor 6 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
July 14, 2018 at 7:34 pm #438463
Hello!
We have added a custom button on this page called ‘Contact Now’ that should trigger the popup window for the Send Inquiry modal window:
However, the call to:
https://wolocal.rmtnnuj8-liquidwebsites.com/wp-admin/admin-ajax.php?action=geodir_ajax_actionIs not returning a response (see screenshot) – the GeoDirectory plugins are up to date. Can you please assist?
Thanks!
July 14, 2018 at 7:56 pm #438472You can post your code here and we can take a look at it.
Use the code markup button here in the editor to preserve formatting.
July 14, 2018 at 9:42 pm #438489Why do you not use the default contact link?
It is not as simple as using the same URL….July 14, 2018 at 11:06 pm #438501Why do you not use the default contact link?
We didn’t want to use the link in the right sidebar for this
You can post your code here and we can take a look at it.
Use the code markup button here in the editor to preserve formatting.
Note the code here in the larger excerpt below:
echo '<a class="btn b_send_inquiry">Contact Now <i class="fa fa-info-circle"></i></a>';
add_action( 'geodir_details_main_content', 'wo_custom_detail_page', 10); function wo_custom_detail_page(){ global $post; //print_r($post); if (!$post->claimed) { echo '<div id="listings-top"><div id="logo"><img src="/wp-content/themes/geodir_geo-1280/images/claim-me.png" alt="Claim Me" /></div>'; } else if ($post->claimed && $post->package_id > 2) { echo '<div id="listings-top"><div id="logo"><img src="' . $post->geodir_Logo . '" alt="' . $post->post_title . '" /></div>'; } else if ($post->claimed && $post->package_id ==1) { echo '<div id="listings-top"><div id="logo"><img src="/wp-content/themes/geodir_geo-1280/images/basic-member.png" alt="Basic Member" /></div>'; } echo '<div id="detail-title-area"><h1 class="main-page-title"> ' . $post->post_title . '</h1><span class="description">' . $post->geodir_Description . '</span>'; if ($post->rating_count > 0){ $fullStars = floor($post->overall_rating); $remainder = $post->overall_rating - floor($post->overall_rating); echo '<div class="gd-star-rating gd-fa-star-rating">'; for ($i=0; $i < $fullStars;$i++){ echo '<i class="fa fa-star gd-full-star"></i>'; } if ($remainder > 0.001) { echo '<i class="fa fa-star-half gd-full-star"></i>'; } echo '<span class="rating-total">' . number_format($post->overall_rating, 1) . ' / 5 stars (' . $post->rating_count . ' Reviews) </span> <span class="rating-writeone"><a href="#reviews">Write a Review</span><span id="review-count">' . $post->rating_count . '</span></div>'; } else { echo 'No ratings yet'; } echo '<div id="social">'; if (!empty($post->geodir_facebook)) echo '<a target="_blank" href="' . $post->geodir_facebook . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-facebook.png"></a>' ; if (!empty($post->geodir_twitter)) echo '<a target="_blank" href="' . $post->geodir_twitter . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-twitter.png"></a>' ; if (!empty($post->geodir_linkedin)) echo '<a target="_blank" href="' . $post->geodir_linkedin. '"><img src="/wp-content/themes/geodir_geo-1280/images/32-linkedin.png"></a>' ; if (!empty($post->geodir_instagram)) echo '<a target="_blank" href="' . $post->geodir_instagram. '"><img src="/wp-content/themes/geodir_geo-1280/images/32-instagram.png"></a>' ; if (!empty($post->geodir_youtube)) echo '<a target="_blank" href="' . $post->geodir_youtube . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-youtube.png"></a>' ; if (!empty($post->geodir_pinterest)) echo '<a target="_blank" href="' . $post->geodir_pinterest . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-pinterest.png"></a>' ; echo '</div>'; echo '<div id="contact-btns" class="clearfix">'; if (!empty($post->geodir_contact)) echo '<a target="_blank" class="btn" href="tel:' . $post->geodir_contact . '">' . $post->geodir_contact . ' <i class="fa fa-phone"></i></a>'; if (!empty($post->geodir_website)) echo '<a target="_blank" class="btn" href="' . $post->geodir_website . '">VISIT WEBSITE <i class="fa fa-external-link-square"></i></a>'; echo '<a class="btn b_send_inquiry">Contact Now <i class="fa fa-info-circle"></i></a>'; echo '</div></div><div id="plans" class="clearfix">' ; if ($post->package_id == 3) echo '<div class="plan">Enhanced Member</div>' ; if ($post->package_id == 4) echo '<div class="plan">Featured Member</div>' ; if ($post->package_id == 5) echo '<div class="plan">Elite Member</div>' ; if ($post->geodir_iapwo == 1) echo '<img alt="IAPWO Member" class="iapwo" src="/wp-content/uploads/2018/02/iapwo-member.png" />' ; if ($post->geodir_verified == 1) echo '<img alt="Verified Business" class="verified" src="/wp-content/uploads/2018/02/verified-business.png" />' ; echo '</div></div><div class="clearfix"></div>'; echo '<div id="geodir-video">' . $post->geodir_video . '</div>'; }
July 14, 2018 at 11:09 pm #438502Trying again…
Why do you not use the default contact link?
Client does not want to use the link in the right sidebar for this.
You can post your code here and we can take a look at it.
Use the code markup button here in the editor to preserve formatting.
Note the code here in the larger excerpt below:
echo '<a class="btn b_send_inquiry">Contact Now <i class="fa fa-info-circle"></i></a>';
add_action( 'geodir_details_main_content', 'wo_custom_detail_page', 10); function wo_custom_detail_page(){ global $post; //print_r($post); if (!$post->claimed) { echo '<div id="listings-top"><div id="logo"><img src="/wp-content/themes/geodir_geo-1280/images/claim-me.png" alt="Claim Me" /></div>'; } else if ($post->claimed && $post->package_id > 2) { echo '<div id="listings-top"><div id="logo"><img src="' . $post->geodir_Logo . '" alt="' . $post->post_title . '" /></div>'; } else if ($post->claimed && $post->package_id ==1) { echo '<div id="listings-top"><div id="logo"><img src="/wp-content/themes/geodir_geo-1280/images/basic-member.png" alt="Basic Member" /></div>'; } echo '<div id="detail-title-area"><h1 class="main-page-title"> ' . $post->post_title . '</h1><span class="description">' . $post->geodir_Description . '</span>'; if ($post->rating_count > 0){ $fullStars = floor($post->overall_rating); $remainder = $post->overall_rating - floor($post->overall_rating); echo '<div class="gd-star-rating gd-fa-star-rating">'; for ($i=0; $i < $fullStars;$i++){ echo '<i class="fa fa-star gd-full-star"></i>'; } if ($remainder > 0.001) { echo '<i class="fa fa-star-half gd-full-star"></i>'; } echo '<span class="rating-total">' . number_format($post->overall_rating, 1) . ' / 5 stars (' . $post->rating_count . ' Reviews) </span> <span class="rating-writeone"><a href="#reviews">Write a Review</span><span id="review-count">' . $post->rating_count . '</span></div>'; } else { echo 'No ratings yet'; } echo '<div id="social">'; if (!empty($post->geodir_facebook)) echo '<a target="_blank" href="' . $post->geodir_facebook . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-facebook.png"></a>' ; if (!empty($post->geodir_twitter)) echo '<a target="_blank" href="' . $post->geodir_twitter . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-twitter.png"></a>' ; if (!empty($post->geodir_linkedin)) echo '<a target="_blank" href="' . $post->geodir_linkedin. '"><img src="/wp-content/themes/geodir_geo-1280/images/32-linkedin.png"></a>' ; if (!empty($post->geodir_instagram)) echo '<a target="_blank" href="' . $post->geodir_instagram. '"><img src="/wp-content/themes/geodir_geo-1280/images/32-instagram.png"></a>' ; if (!empty($post->geodir_youtube)) echo '<a target="_blank" href="' . $post->geodir_youtube . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-youtube.png"></a>' ; if (!empty($post->geodir_pinterest)) echo '<a target="_blank" href="' . $post->geodir_pinterest . '"><img src="/wp-content/themes/geodir_geo-1280/images/32-pinterest.png"></a>' ; echo '</div>'; echo '<div id="contact-btns" class="clearfix">'; if (!empty($post->geodir_contact)) echo '<a target="_blank" class="btn" href="tel:' . $post->geodir_contact . '">' . $post->geodir_contact . ' <i class="fa fa-phone"></i></a>'; if (!empty($post->geodir_website)) echo '<a target="_blank" class="btn" href="' . $post->geodir_website . '">VISIT WEBSITE <i class="fa fa-external-link-square"></i></a>'; echo '<a class="btn b_send_inquiry">Contact Now <i class="fa fa-info-circle"></i></a>'; echo '</div></div><div id="plans" class="clearfix">' ; if ($post->package_id == 3) echo '<div class="plan">Enhanced Member</div>' ; if ($post->package_id == 4) echo '<div class="plan">Featured Member</div>' ; if ($post->package_id == 5) echo '<div class="plan">Elite Member</div>' ; if ($post->geodir_iapwo == 1) echo '<img alt="IAPWO Member" class="iapwo" src="/wp-content/uploads/2018/02/iapwo-member.png" />' ; if ($post->geodir_verified == 1) echo '<img alt="Verified Business" class="verified" src="/wp-content/uploads/2018/02/verified-business.png" />' ; echo '</div></div><div class="clearfix"></div>'; echo '<div id="geodir-video">' . $post->geodir_video . '</div>'; }
July 15, 2018 at 9:24 am #438512I think I got your problem. You are just echoing the link, but the java script is missing. You have to use the
geodir_cf_email
function for echoing the link and adding the script. You have to use the latest version of core.
The echo could look like (not tested):
echo geodir_cf_email($html,'none', 'geodir_email');
the “geodir_email” is the field used for the email address. “geodir_email” is the GD standard field.
July 15, 2018 at 10:55 am #438515Thanks! I tried that:
echo geodir_cf_email($html,'none', 'geodir_email');
However, the same thing happens. The button is rendered using that code but the https://wolocal.rmtnnuj8-liquidwebsites.com/wp-admin/admin-ajax.php?action=geodir_ajax_action POST is not returning the HTML for the modal.
July 15, 2018 at 1:31 pm #438527I would disable all optimization (minify and caching). I can see the modal window open, but no content is there.
I’m also getting DOM error in console. Also this should be fixed before…
July 16, 2018 at 9:22 am #438604Your topic has been flagged for the developers. Generally we do not undertake customizations here in the forum but they will take a quick look and see if there is an easy fix for what you are trying to do.
July 16, 2018 at 9:52 am #438612Form seems to be showing now, do u need me to look at anything?
Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket