0

i have landing page in magento , i have ajax contact form but, i want take action contact form default! in url has contact_me.php but it doesn't work so could u help me what can i do?

 $.ajax({
                    url: "contact_me.php",
                    type: "POST",
                    data: {
                        name: name,
                        phone: phone,
                        email: email,
                        message: message
                    },
                    cache: false,
                    success: function() {
                        // Success message
                        $('#success').html("<div class='alert alert-success'>");
                        $('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
                            .append("</button>");
                        $('#success > .alert-success')
                            .append("<strong>Your message has been sent. </strong>");
                        $('#success > .alert-success')
                            .append('</div>');

1 Answer 1

1

Assume that your contact_me.php located at magento application root folder.

In,order to call contact_me.php from any page you need to change

to url: "<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'contact_me.php' ;?>"

from

url: "contact_me.php",

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.