Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi.

    In classes/options.php, remove the spaces before and after the colon on line 309.

    In original, it is

    $url .= $_SERVER[‘SERVER_NAME’] . ‘ : ‘ . $_SERVER[‘SERVER_PORT’] . $_SERVER[‘PHP_SELF’];

    but should be

    $url .= $_SERVER[‘SERVER_NAME’] . ‘:’ . $_SERVER[‘SERVER_PORT’] . $_SERVER[‘PHP_SELF’];

    BR
    /Simon

    Thanks for your hint!
    A friend helped me complete the function.
    Here is that solution:

    /* Zoom to store */
    $("#wpsl-stores").on('click', '.zoom-to-store', function() {
    	var i, len, $parentLi = $( this ).parents( "li" ), storeId = $parentLi.data( "store-id" );
    
    	for ( i = 0, len = markersArray.length; i < len; i++ ) {
    		if ( markersArray[i].storeId == storeId ) {
    			map.setCenter( markersArray[i].position );
    			map.setZoom( 15  );
    
    			return false;
    		}
        }
    });

    String to insert at html = “<li data-store-id='” + id + “‘>

    "<br><a class='zoom-to-store' href='#'>Zoom in map</a>"

    Yes!

    This is also a function I need, but how do I add the the function as a separate link eg. above “Show directions”?
    I want to keep the URL to the store homepage function.

    Something like this:
    Store name (with url link)
    Address
    Distances
    Zoom here
    Directions

    Thanks Tijmen, for this great plug-in!

    BR
    Simon

Viewing 3 replies - 1 through 3 (of 3 total)