Skip Navigation

[Resolved] Split: I've got to go to sleep but need someone to work on existing tickets – issue 3

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by HOP 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1871783

HOP

Site Name: iAutoUK.com
Issue 3: To Jamal I wrote: I tried to capitalize on the placeholders you entered into the subject field by attempting to add the 'marque' (make of the car selected) and the @service.enquiry - but it didn't come through. Perhaps I did it wrong?
==>
Is it fixed or you will require further assistance? what placeholders text you want to capitalize?

******==>==>
NO, I DON'T WANT TO CAPITALIZE IN TERMS OF LOWERCASE/UPPERCASE! IGNORE THAT WORD! CAPTIALIZE MEANS THE ENGLISH WORD OF 'GAIN ADVANTAGE FROM'. THIS WAS TO SAY THAT I TOOK WHAT JAMAL DID AND USED IT FURTHER. SO PLEASE FIX IT. I WANT TO SHOW THE MAKE OF CAR AND THE SERVICE ENQUIRY THAT THE PERSON SELECTED, TO BE DISPLAYED AS A PLACEHOLDER IN THE SUBJECT OF THE EMAIL NOTIFICATION PLEASE.

#1871801

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The thing is that, 'marque' is the taxonomy not a custom field.

You can display the taxonomy in notification subject as given under:

[wpv-post-taxonomy type="marque" format="name" item='%%POST_ID%%'] 

To display the parent post title, we have a placeholder %%POST_PARENT_TITLE%% but somehow its not working at the moment I will require to check with clean install and if I see not working I will escalate this to our Devs.

So, to display the parent title, I've created the following custom placeholder: %%CUSTOM_PARENT_TITLE%%

I've added the following code to "Custom Code" section of Toolset:
=> hidden link

add_filter('cred_subject_notification_codes', 'func_set_parent_post_title', 9, 1);
add_filter('cred_body_notification_codes', 'func_set_parent_post_title', 9, 1);
  
function func_set_parent_post_title( $defaultPlaceHolders ) {
    $parent_id = $_POST['@service-enquiry_parent'];
    $parent_Title = get_the_title($parent_id);
    
    $newPlaceHolders = array(
        '%%CUSTOM_PARENT_TITLE%%' => $parent_Title
    );
  
    return array_merge($defaultPlaceHolders, $newPlaceHolders );
}

Now, subject line for Admin notification looks as given under:

[iAutoUK] New Request A Booking enquiry from [types field='enquiry-first-name' item='%%POST_ID%%'][/types] [types field='enquiry-last-name' item='%%POST_ID%%'][/types] [wpv-post-taxonomy type="marque" format="name" item='%%POST_ID%%'] %%CUSTOM_PARENT_TITLE%%

More info:
=> https://toolset.com/documentation/programmer-reference/forms/how-to-use-custom-placeholders-in-cred-notifications/

Now, I can see both marque and parent post title is displayed with the subject line, you can modify the subject line if require as per your requirement.

#1871857

HOP

Perfect thanks for sorting this.