Forum Replies Created
-
AuthorPosts
-
mar1eke_louise
ParticipantHi Ernest,
It is me again!
All is working as initially requested by the client, but as you might know, a client can change their mind and it does have to do with this code. In all other options there is a possibilty to add ALL option, this is not the case with this custom code and the client wants this option back to show all events in all locations first. The location starts with the first location, Arnhem, and shows only the events in Arnhem and only changes that when you select another location.
Could you have a nother look to see if it is possible to add the ||Any value** back in this code?
Thank you,
Mariekemar1eke_louise
ParticipantYou are a star!!
Thank you for your time and helping out with this.
Have a nice weekend.
Mariekemar1eke_louise
ParticipantYou cannot access this content.
mar1eke_louise
ParticipantHi Ernest,
Thank you for your reply, it could also be a country restrict, my IP changes and I never have problems loggin in. When you use Filezilla, is logon type set to normal?
Can I please get your IP and the country you are in so they can whitelist either your ip or the country, that should do the trick.
This code did not work, it threw a 500 error so I have put it back for now.
Thank you again,
Mariekemar1eke_louise
ParticipantHi Ernest,
After the latest update the entire code is not working anymore for the location filter, it is solely showing the id’s of the location now, the code for the name and or town are not working anymore, nor are the most recent codes that where.
My client is getting very frustrated about this now and demands an asap solution for this, since the website is not working anymore because of the update.
Could you please provide a solution?
mar1eke_louise
ParticipantHi,
Thank you, I think it might be the ftp program you are using, I can connect with Filezila and WinScp, but not with NppFTP. Can you try connecting with another ftp program and see if you get the same error.
By the way, you do not need to connect with a private key, just the password.
mar1eke_louise
ParticipantYou cannot access this content.
mar1eke_louise
ParticipantThank you, this works indeed!
But….
When you choose a location, it gives no results found, even though there are for sure results, could you please have a look at that?
I am very gratefull for your help and feel a bit awkward for asking so much.
Thank you again,
Mariekemar1eke_louise
ParticipantThank you again, we might almost be there but not yet.
If I use your code the towns are doubled again in the results, so it takes in the IDs, renames it to the town name and outputs this info twice. If I remove part of the code it works in a way that the town names are shown only once but.. there is a huge amount of blank spaces above the names (I figured out these are the IDs of the other ones) and no results are found for the towns, I have attached a screenshot for you to see, since I cannot leave this on the live environment. As you can see, the towns are shown once and on alfabetical order, which is exactly what we need, but no results.
Marieke
mar1eke_louise
ParticipantHi,
No, I had to change it back to location name, so there are no double’s, but the client wants to have the location town in stead of the name, I have just turned it back to location town so you can see what is happening with above code.
Thanks,
Mariekemar1eke_louise
ParticipantHi,
Thank you for your response. Yes, if I use the location_town, I get dupliactes of the towns since there are duplicates. Unfortunately this code did not do the trick. The location town names are still shown as duplicates.
add_filter('asp_cf_item_view', 'asp_em_locations_cf_filter', 10, 1); function asp_em_locations_cf_filter($item) { if ( $item->asp_f_field == '_location_id' && class_exists('EM_Locations') ) { $location_ids = array(); foreach ( $item->asp_f_dropdown_value as $k=>$v ) { if ( is_numeric($v[1]) ) { $location_ids[] = $v[2]; unset($item->asp_f_dropdown_value[$k]); } } $locations = EM_Locations::get( array('location'=>array_unique($location_ids)) ); if ( is_array($locations) && count($locations) > 0 ) { foreach ( $locations as $loc ) { $item->asp_f_dropdown_value[] = array( $loc->location_id, $loc-> location_town ); } } } return $item; }It did not do anything, I tried SORT_REGULAR, but also to no avail.
Any other suggestions?
Thank you again,
Marieke -
AuthorPosts