• Resolved hexist

    (@hexist)


    Hello,
    Everything works great except, after submitting form it shows “There are no product added in the enquiry cart” instead of “Enquiry submitted”. I found function submit_form() that returns false in my case, so function saveEnquiry() also must give 0, but I can see saved enquiries in “Enquiries” tab and in emails.
    Please help.
    Thank You.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Hi,

    Are you able to receive the email and see the saved enquiry in backend ??

    Thread Starter hexist

    (@hexist)

    Yes, everything works as it should. I receive both emails (as admin and as client) and all enquiries are saved in backend. I tried var_dump to see what gives what, and inside “if( count($this->errors) <= 0 && !empty($_POST))” variable $save gives bool(false), $email gives NULL and $clear_product gives NULL, but everything is sent on email and saved in backend.
    Thank You for quick response.

    • This reply was modified 3 years, 4 months ago by hexist.
    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Hi,

    
    function submit_form(){
            if( count($this->errors) <= 0 && !empty($_POST)){
                $save = $this->saveEnquiry();  // you are saying this comes false, but if this is false then the remaining function of send email and clear session will not run so you should not receive any email as well but you are receving email 
                if($save !== false){
                    $email = $this->sendEmail($save);
                    $clear_product = $this->clearSession();
                    return true;
                }
            }
            return false;
        }
    

    if $save comes out to be false then it will not trigger the other function of sendEmail() and clearSession() but you are getting email

    Thread Starter hexist

    (@hexist)

    I tried changing main theme to default wp, and same result.
    PLease tell me how to remove any data from database, so I can download your plugin again as new. Cause on virtual server it works perfect (no plugins, only WC). All I find I will report to you.
    Thank you

    • This reply was modified 3 years, 4 months ago by hexist.
    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Sorry there is no option of resetting the plugin, which PHP version you are using on the live site as it worked on your test site

    create a copy of the site on virtual server and go on activating other plugin one by one and keep checking then you may find the conflict causing plugin

    Thread Starter hexist

    (@hexist)

    I found conflicting plugin: All in one SEO.
    Now your plugin works perfectly (after submitting form, the “Enquiry submitted” message shows up).
    THANK YOU SO MUCH!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Function submit_form() returns false’ is closed to new replies.