0

I have a problem with a multi-language site, where I cannot make the contact form work for the 2nd language.

Here is my setup:

English contact form is at: https://www.mysite.de/en/contacts

on submiting the forum it then loads: https://www.mysite.de/en/contacts/index/

To customize the form, I made a dedicated page here: the EN version is stored as a seperate tempalate here: \app\design\frontend\ultimo\mytheme\template\contacts\form.phtml

the German version of the file is here: \app\design\frontend\ultimo\mytheme\template\contacts\form-de.phtml

in this phtml, I have my form code, including the submit:

<div class="buttons-set">
    <p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
    <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
    <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
</div>

for DE, is the same code as EN.

The EN form is using the default /contacts/ setup of magento > there's no special CMS page for this. However, for the DE version, I made a dedicated page, where I load this code:

{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form-de.phtml"}}

This allows me to show the different form depending on the language.

However, here's the problem:

When I load the page from here: http://www.mysite.de/de/kontakt/ I see the form etc, everything looks good.

But on submit, it redirects to: http://www.mysite.de/contacts/index/post with a 404 page not found error.

I'm lost on how to sort this out, and appreciate any help! Thanks.

edit: - could it be something to do with the URL storecode options I am using in the system setup? If so, what could be the workaround do you think?

1 Answer 1

0

I think I have solved the problem following the tips from here:

https://stackoverflow.com/questions/21642846/contact-form-gives-me-a-404-page-in-magento

adding .. to the form action "/contacts/index/post" seems to have helped!

1
  • feel free to either accept this as the answer or post your complete code as it could help someone else in future. May 1, 2015 at 18:15

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.