Send Inquiry Popup not working

This topic contains 9 replies, has 5 voices, and was last updated by  Stiofan O’Connor 5 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #438463

    Evan Reitmeyer
    Expired Member
    Post count: 11

    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:

    https://wolocal.rmtnnuj8-liquidwebsites.com/wedding-officiants/united-states/maryland/baltimore/officiants/claimable-listing/

    However, the call to:
    https://wolocal.rmtnnuj8-liquidwebsites.com/wp-admin/admin-ajax.php?action=geodir_ajax_action

    Is not returning a response (see screenshot) – the GeoDirectory plugins are up to date. Can you please assist?

    Thanks!

    #438472

    Alex Rollin
    Moderator
    Post count: 27815

    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.

    #438489

    Guust
    Moderator
    Post count: 29970

    Why do you not use the default contact link?
    It is not as simple as using the same URL….

    #438501

    Evan Reitmeyer
    Expired Member
    Post count: 11

    Why 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>';
    }
    #438502

    Evan Reitmeyer
    Expired Member
    Post count: 11

    Trying 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>';
    }
    #438512

    Dirk
    Full Member
    Post count: 390

    I 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.

    #438515

    Evan Reitmeyer
    Expired Member
    Post count: 11

    Thanks! I tried that:

    echo geodir_cf_email($html,'none', 'geodir_email');

    https://wolocal.rmtnnuj8-liquidwebsites.com/wedding-officiants/united-states/maryland/ellicott-city/officiants/ceremony-officiants-western-maryland/

    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.

    #438527

    Dirk
    Full Member
    Post count: 390

    I 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…

    #438604

    Alex Rollin
    Moderator
    Post count: 27815

    Your 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.

    #438612

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Form seems to be showing now, do u need me to look at anything?

    Stiofan

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket