• Hi,

    This is basically asking the same question as here

    I would like to not repeat the initial search query at the end of the result.

    I know you talked about custom coding, can you point me in the direction of where I should be looking, or is it something you can do for a price?

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Mark,

    You would need to edit the my_services_postcode_checker.js file in JS folder (line 61)

    In our project the line is now:

    element.children('.success-msg').children('.success-return-msg').html('<div>Awesome, you are in!' + '<br><div style="font-size:16px;">Redirecting - Please Wait</div>');

    Here is what I just did to solve this.

    Find the my_services_postcode_checker.js file (it is in the js folder)

    Line 57 is currently

    element.children(‘.success-msg’).children(‘.success-return-msg’).html(result[1]);

    I replaced this with:

    ——————————————————————

    var myString = result[1];
    var newString = myString.slice(0, -7);
    element.children(‘.success-msg’).children(‘.success-return-msg’).html(newString);

    ——————————————————————

    This removes seven characters from the end of the ‘success’ message (in my case that was ‘- SO14*’. Of course this does rely on the initial search query being a known number of characters. If it isn’t you will have to do something a bit cleverer – perhaps look through the string from the end > beginning for the first ‘-‘ character and removing that and the ones after.

    Hope this helps someone.

    Jon

    Plugin Author Kane G

    (@second2none)

    You shouldn’t really be editing the plugin files as these will get lost on any updates (just keep that in mind).

    I’ll be making some changes in the coming months and will add this to the list of new features.

    @jonahall did that work for you? I changed the JS code as you suggested and it is now redirecting to my homepage (which is currently a “coming soon” page with the following extension – ?postcode_check=2000&verify-int=on – instead of showing a message!

    Help please!

    Thread Starter markmck

    (@markmck)

    @bethgee For me, I edited the ‘postcode_class.php’ file within the plugin, and went to around line 35 (I’m looking at an old screenshot, so maybe line number has changed), and I amended where it says;

    array_push( $details , $postcode_details[‘suburb’] . ‘ – ‘ . $postcode_details[‘Postcode’] );

    And changed it to this

    array_push( $details , $postcode_details[‘suburb’]

    This then stopped the original query from showing.

    Hope that helps.

    I have changed the my_services_postcode_checker.js file back and made the change to postcode_class.php, which makes no difference – it is now still redirecting to the url I mentioned above.

    Also, when I try to revert to the original my_services_postcode_checker.js code, it breaks the whole page!

    I am now worried I will need to remove the plugin and start again… unless anyone else has an idea of how to fix the issue??

    I tried uninstalling and reinstalling the plugin, which still didn’t fix this issue!

    No matter what I try, the plugin is now redirecting to the homepage of the site with the extension ?postcode_check=2350&verify-int=on when you click the button or hit enter…

    I haven’t changed any of the settings since reinstalling.

    Help!!!

    Ignore the above, I checked again on a private browser and it works!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hiding search query from end of results’ is closed to new replies.