• Hello,

    I have the Store Locator set up with a ‘More info’ link that opens the store info in the box on the map. This does not seem to work properly. In 1 situation (see below) all info is visible, in another situation the box does not open, in another situation the box opens, but not all info is inside.

    Dutch version: http://www.security-expert.be/contact/
    – Without searching for a location: More info link works perfectly, opens all info in the box on the map.
    – After searching for a location: More info link does nothing, no box opens on the map.

    French version: http://www.security-expert.be/fr/contact/
    – Without searching for a location: More info link opens a pop-up on the map, but only the name, address and route are in the box. The e-mail, website and phone are missing from the box.

    Kind regards,
    Pj

    (using: last version of WordPress, last version the Store Locator, last version of the ‘Jupiter’ theme)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Does this happen for you in a different browser as well, also in private mode?

    The more info link works for me after making a search, but none of the ones I clicked on show an email / website or phone. Does it show anywhere for you in Dutch or French?

    Thread Starter pjdc

    (@pjdc)

    Hello Tijmen,

    Indeed, the info was probably still showing because of the cache.
    Now it works like you say, the box opens, but no extra info (mail, website phone) is inside.

    I have used the text-editor for this info (mail, site, phone), not the fields of the plugin.
    The fact that this info does not show anymore is probably because i updated WordPress and the function was deleted.

    Could you please remind me how to add the function to show the text-editor info in the map-box? I added this function and was working before the WordPress update, but i forgot how…

    Thanks!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This article explains how to include the extra data in the search results itself, but instead of using the wpsl_listing_template filter mentioned in the article, you have to use the wpsl_info_window_template filter.

    You can access the data with <%= email %>, <%= url %> and <%= formatPhoneNumber( phone ) %> if you want to include them in the template code.

    The code itself goes in the functions.php inside your active theme folder. Do flush the WPSL transient cache, you can do this on the WPSL settings page ( tools section ) before reloading the store locator page.

    Thread Starter pjdc

    (@pjdc)

    Ok, so updating the theme was the problem…
    Thanks for helping me out!
    I got everything back up and running!

    For anyone looking for the code to add the description to the map-box:

    add_filter( 'wpsl_info_window_template', 'custom_info_window_template' );
    
    function custom_info_window_template() {
       
        $info_window_template = '<div data-store-id="<%= id %>" class="wpsl-info-window">' . "\r\n";
        $info_window_template .= "\t\t" . '<p>' . "\r\n";
        $info_window_template .= "\t\t\t" .  wpsl_store_header_template() . "\r\n";  
        $info_window_template .= "\t\t\t" . '<span><%= address %></span>' . "\r\n";
        $info_window_template .= "\t\t\t" . '<% if ( address2 ) { %>' . "\r\n";
        $info_window_template .= "\t\t\t" . '<span><%= address2 %></span>' . "\r\n";
        $info_window_template .= "\t\t\t" . '<% } %>' . "\r\n";
        $info_window_template .= "\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n";
        $info_window_template .= "\t\t" . '</p>' . "\r\n";
        
        $info_window_template .= "\t\t" . '<% if ( description ) { %>' . "\r\n";
        $info_window_template .= "\t\t" . '<%= description %>' . "\r\n";
        $info_window_template .= "\t\t" . '<% } %>' . "\r\n";
        
        $info_window_template .= "\t\t" . '<%= createInfoWindowActions( id ) %>' . "\r\n";
        $info_window_template .= "\t" . '</div>' . "\r\n";
        
        return $info_window_template;
    }
    
    add_filter( 'wpsl_include_post_content', '__return_true' );
    
    ?>
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘More info box not working properly’ is closed to new replies.