Jump to content

1.6.1.2 Adding field to contact form and facebook floating widget?


magix01

Recommended Posts

Hi

 

I have tryed to add a new field "Full name" in contact for and followed all the tutorials but most of them are for 1.5 version and don't work, my override creates database entry but doubles the field and only one contains the data, the backend part don't show. Is there any tutorial specific for 1.6.x version?

 

The facebook part is, I am trying to add facebook floating button like this one:

 

http://theblogwidgets.com/2013/11/floating-facebook-like-box-widget-for.html

 

I have followed guide using HTML box and putting it in header but instead of the float to be position as on that site, white space gets generated above the header on page and fb icon is on the left.

 

Thanks for help in advance.

Regards

Magix01

Link to comment
Share on other sites

Hi 

 

I have managed to find a solution for contact form adding field (Prestashop 1.6.1.2), you can follow this guide (only PHP part!!!, i will write tpl beneath):

 

http://nemops.com/adding-new-fields-to-prestashop-contact-form/#.VkYPPfmrS70

 

But instead of overriding "themes\default\template\controllers\customer_threads\message.tpl" you need to override "themes\default\template\controllers\customer_threads\helpers\view\view.tpl. 

 

Go to line 64 in views.tpl, above "<h2>{$thread->email|escape:'html':'UTF-8'}</h2>" add your own field value like this "<h2>{$thread->extrafield|escape:'html':'UTF-8'}</h2>"

 

My code now looks like this:

{else}
<h2>{$thread->extrafield|escape:'html':'UTF-8'}</h2>
<h2>{$thread->email|escape:'html':'UTF-8'}</h2>
{/if}

 

In my case i added "Full Name" field so i know a name of unregistered user that is contacting me, now when you go to your new received thread you will see the value you added with "extrafield".

 

Can someone help me with facebook floating widget please?

 

Regards

Edited by magix01 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi 

 

I have managed to find a solution for contact form adding field (Prestashop 1.6.1.2), you can follow this guide (only PHP part!!!, i will write tpl beneath):

 

http://nemops.com/adding-new-fields-to-prestashop-contact-form/#.VkYPPfmrS70

 

But instead of overriding "themes\default\template\controllers\customer_threads\message.tpl" you need to override "themes\default\template\controllers\customer_threads\helpers\view\view.tpl. 

 

Go to line 64 in views.tpl, above "<h2>{$thread->email|escape:'html':'UTF-8'}</h2>" add your own field value like this "<h2>{$thread->extrafield|escape:'html':'UTF-8'}</h2>"

 

My code now looks like this:

{else}
<h2>{$thread->extrafield|escape:'html':'UTF-8'}</h2>
<h2>{$thread->email|escape:'html':'UTF-8'}</h2>
{/if}

 

In my case i added "Full Name" field so i know a name of unregistered user that is contacting me, now when you go to your new received thread you will see the value you added with "extrafield".

 

Can someone help me with facebook floating widget please?

 

Regards

 

Hey ! It worked like a charm thank you !!!!

 

Also i did override the entire view folder 'cause view.tpl it needed the other templates to work. 

Edited by conceptorobledo (see edit history)
Link to comment
Share on other sites

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...