Jump to content

customizing the contact form for 1 single person


crossroads

Recommended Posts

Hello!

I've installed Prestashop v.1.3.2 and I'm liking it very much. However, I'm having some difficulties to customise it. In the contact form (the "Contact Us") I would like to have just a subject (of the email) field, an email address and the text field. I would like to remove the part to choose to whom you want to send the email as I only have one single email.
I know I have to change 3 files: contact-form.php, contact-form.tpl and contact.html. However, I wasn't able to do it correctly.
If anybody already has experience with this form, could you help me?

Thank you very much!

Link to comment
Share on other sites

In contact-form.tpl, all you have to do is replace this code:


{l s='-- Choose --'}
{foreach from=$contacts item=contact}
{$contact.name|escape:'htmlall':'UTF-8'}
{/foreach}


with this code

<input type="hidden" id="id_contact" name="id_contact" value="put_the_id_of_your_contact_here" />



Also, remove this code as it is not needed:


{l s='Select a subject'}
{foreach from=$contacts item=contact}


{l s='Description'}{$contact.description|escape:'htmlall':'UTF-8'}
{/foreach}



This is not tested but from the looks of it, I think that is all that is needed.

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...