markburton52
Forum Replies Created
-
I’ve used WP Import with Events Manager for years. I have the Pro version of WP Events Manager (via a one-off subscription) which allows custom fields to be filled from a csv file.
This year I can’t get the import to fill in the location. This is despite using both the correct location name and the WP location id.
Any ideas why this isn’t working for me? Maybe something has changed in WP.
- This reply was modified 21 hours, 35 minutes ago by markburton52.
Forum: Plugins
In reply to: [Import and export users and customers] list data not populating fieldThank you. I looked at the documentation and am not sure what to do.
The data I have is in this format:
Monday 11 May, Afternoon, Monday 11 May, Evening, Friday 15 May, Morning, Friday 15 May, Afternoon, Friday 15 May, Evening, Saturday 16 May, Morning, Saturday 16 May, Afternoon, Saturday 16 May, Evening, Sunday 17 May, Morning, Sunday 17 May, Afternoon, Sunday 17 May, Evening
It needs to be in this format to be uploaded and then populate the database:
“a:11:{i:0;s:24:”Monday 11 May, Afternoon”;i:1;s:22:”Monday 11 May, Evening”;i:2;s:22:”Friday 15 May, Morning”;i:3;s:24:”Friday 15 May, Afternoon”;i:4;s:22:”Friday 15 May, Evening”;i:5;s:24:”Saturday 16 May, Morning”;i:6;s:26:”Saturday 16 May, Afternoon”;i:7;s:24:”Saturday 16 May, Evening”;i:8;s:22:”Sunday 17 May, Morning”;i:9;s:24:”Sunday 17 May, Afternoon”;i:10;s:22:”Sunday 17 May, Evening”;}”Is there away to make that conversion? I would do it via spreadsheet formulae but don’t understand how the encoding works.
Thanks for any help / clues.- This reply was modified 3 months ago by markburton52.
Forum: Plugins
In reply to: [Import and export users and customers] list data not populating fieldThanks. Yes, UM requires that field to be serialised data. I know that “Import and export…” can output a list from a serialised field – is there any way it can do the reverse? I did try rewriting the list with :: separators but it only accepted the last element in the list.
Thank you for this. I’ve tried separating each date slot in the list with :: but it is only accepting the last term. So for Saturday 9 May, Morning ::Saturday 9 May, Afternoon ::Saturday 9 May, Evening ::Sunday 10 May, Morning ::Sunday 10 May, Afternoon ::Sunday 10 May, Evening it only accepts ‘Sunday 10 May, Evening’.
The other possibility is that it needs serialised data (that seems to be what is in the database for this field), but I don’t know if there is a way to convert a list like the above into the appropriate serialised data.Oh dear – “uploadin list gata” of course should read “uploading list data”!
Many thanks Jon, I didn’t think to look there – these settings are a bit scattered around the settings area – I was looking in formats and then trying to use the search parameters.
Too late for this year’s events but it will improve things a lot next year!
Thanks @joneiseman I thought that was it but couldn’t figure out how to add an ASC argument there either.
Just to confirm: the problem wasn’t with the shortcode but with the uploaded events. Both old and new version work: I actually prefer the way events are formatted in the original version.
Hi, thanks for the rapid answer. I don’t think that’s it. Some events do appear and for some reason when I did a bulk upload of events from a csv file (using WP All Import), only some have post id numbers and it’s those that are found in the search. I’ll dig into the database to see what’s going on but it looks like a local problem to my setup.
Thanks – very helpful. I’ve got it working now. Note that there should be no ‘-has’ in the expression for the null case:
{has_att_link_to_book}
<a href="#_ATT{link to book}">link to book</a>
{/has_att_link_to_book}
{no_att_link_to_book}
no booking needed
{/no_att_link_to_book}Sorry no that didn’t work. Here is the working LATT one and the non-working ATT one. Removing the att_ as suggested made no diffrence in the ATT version – is something still wrong in the php snippet?
{has_att_link to book}
<a href="#_ATT{link to book}">link to book</a>
{/has_att_link to book}
{no_has_att_link to book}
no booking needed
{/no_has_att_link to book}
{has_latt_website}
<a href="#_LATT{website}">website</a>
{/has_latt_website}
{no_has_latt_website}
no website
{/no_has_latt_website}Thanks – not your mistake but mine, but I’m getting this output on the front page.
{has_att_link to book} link to book {/has_att_link to book} {no_has_att_link to book} no booking needed {/no_has_att_link to book}
The template formatting is identical to that used for the previous location one (with the obvious changes).
I did a conflict test: however I couldn’t disable the two plugins being used in this context: Ultimate Member and Events Manager. No other conflicts are apparent. It’s curious that the profile link shortcode does work perfectly when applied via the EM Attribute / Custom Field but the url one doesn’t (nor does the plain user meta version used the same way), although clearly the shortcode works when used in the editor. It’s a frustration but if it is conflict due to some EM code (it has an internal bookings functionality but disabled on my site) then I will have to use a work around that doesn’t dynamically link the user profile to the EM event custom post for the few artists that do supply an external booking link.
@joneiseman I’ve tried to clone and edit your code to do similar with a link in the event posts:
add_filter('em_event_output_show_condition', function($show_condition, $condition, $key, $EM_Event) {
if ($condition == "has_link_to_book" && !empty($event->event_attributes['link to book'])) {
return true;
}
else if ($condition == "no_has_link_to_book" && empty($event->event_attributes['link to book'])) {
return true;
}
return $show_condition;
}, 10, 4);and in the single event page template
{has_att_link to book}
<a href="#_ATT{link to book}">link to book</a>
{/has_att_link to book}
{no_has_att_link to book}
no booking needed
{/no_has_att_link to book}But the link isn’t coming through to the front end. Can you spot an error in the code?
(We aren’t using the inbuilt EM booking functionality but rather links to external sites for that.)
Thanks
I’ve been using the plugin by @missveronicatv and it’s really helpful.
I’ve one problem though with the url variant. I’m using it to display a link via the Events Manager (EM) plugin. I can apply it via the tinyMCE editor in the usual way but want to use the EM-specific attibutes function which allows me a lot of control in formatting the event custom posts. These attributes, specified in the EM html event post template, are actually custom fields. When I apply the url shortcode in this way, I get a broken link.
The shortcode is [um_profile_info type=”url” meta_key=”dbem_caf_um_bookinglink” user_id=”147″]Booking link[/um_profile_info]
Via tinyMCE editor: I get the correct, clickable url link: https://www.eventbrite.co.uk/e/word-of-mouth-chorlton-arts-festival-tickets-1217686425879
Via the EM ustom attribute I get https://chorltonartsfestival.org/events/test-event/%5Bum_profile_info%20type=The profile link shortcode does work properly when submitted via an attribute.
I suspect the problem is some kind of code conflict between the UM snippet and the EM code but maybe there is a way around it.