Skip Navigation

[Resolved] Notification settings

This support ticket is created 7 years 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 81 replies, has 4 voices.

Last updated by Nicholas 6 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#512228

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicholas,

So the issue here is that the advertiser isn't getting an email correct?

I see you have made the fields hidden.

What you need to do is add this hook to your functions.php file

add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );

function prefix_clean_view_output( $out, $id ) {
    if ( $id == '375' ) {
        $start = strpos( $out, '<!-- wpv-loop-start -->' );
        if ( 
            $start !== false
            && strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
        ) {
            $start = $start + strlen( '<!-- wpv-loop-start -->' );
            $out = substr( $out , $start );
            $end = strrpos( $out, '<!-- wpv-loop-end -->' );
            $out = substr( $out, 0, $end );
        }
    }
    return $out;
}

Change the 375 to the ID of the view that is providing the email of the advertiser email field and then try again.

The issue seemed to be that the view wasn't providing the email to the field.

Please let me know if this helps.

Thanks,
Shane

#512308

Hey Shane. Thank you for the code. I will test this and will get back to you.

So basically nobody is getting an e-mail.

#512309

Hey Shane what view?

Do you mean the form?

Which ID do you mean?

#512346

So i was missing the Advertiser details view and added it to my site now.
I also used the code you provided.
Unfortunately I still don't receive any e-mails. Neither as an advertiser nor as a customer.

#512352

What's weird is that all the custom post fields are filled out properly. You can check this yourself in the backend.

#512708

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicholas,

Did you add anything or change anything at all to the site apart from adding the code I gave?

I'm noticing now that no generic email fields are showing up in your form.

This worked fine before and I could see the information in the POST request but not anymore.

Please let me know as soon as possible.

Thanks,
Shane

#512710

I added the advertiser details view. Because this one was missing.

#512712

I thought that the generic fields don't show up in the form because they are hidden.

#512799

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicholas,

I know they were hidden but upon submission it should show in the Post request.

Currently i'm not seeing this anymore so i'm debugging even further.

Thanks,
Shane

#512808

Thank you Shane.

That's weird.

Adding the view + your code with the ID of the advertiser details view was all I did.

When I realized that I was missing the view I thought that was the reason why it didn't work.

#512809

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicholas,

Would you use the id of the advertiser or the email of the advertiser to send the email ?

Please let me know.
Thanks,
Shane

#512821

Well not really.
Do you think this part is causing a confilict?

#512836

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicholas,

Not sure why the view is not showing up in the generic field but on our demo this works fine.

Could you try re-creating the form like our default form from the classified demo as this seems to be what your form is modelled after.

Thanks,
Shane

#512837

Alright.
So the generic field with the view is not showing up on the front end if you remove the hidden type?

#512840

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicholas,

That is correct.

On our Classifieds demo it shows up and works fine but here i'm not sure what happened but it doesn't.

I wouldn't want to debug further and end up messing things up but as long as the field shows up then your emails should start sending.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.