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
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.
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.
What's weird is that all the custom post fields are filled out properly. You can check this yourself in the backend.
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
I added the advertiser details view. Because this one was missing.
I thought that the generic fields don't show up in the form because they are hidden.
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
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.
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
Well not really.
Do you think this part is causing a confilict?
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
Alright.
So the generic field with the view is not showing up on the front end if you remove the hidden type?
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