Jump to content

iletişim formuna yeni alan ekleme sorunu.


Argia

Recommended Posts

meraba arkadaslar..

iletişim formunda standartların dısında birkaç alan eklemeye calıstım ancak.. tüm işlemlere ragmen

müşteri mesajları ve giden e-postalar içinde söz konusu alanlar görünmüyor..

 

buradaki;
https://www.prestashop.com/forums/topic/11123-creation-of-new-fields-in-the-contact-form/

ve buradak;

https://www.prestashop.com/forums/topic/264731-free-tutorial-adding-new-fields-to-the-contact-form/

 işlemleri yapmama rağmen.. hala durum aynı.. yardım ederseniz sevinirim.. Teşekkürler şimdiden..

 

değişikliklerim söyledir:

 

Version: 1.5.6.2

AdminContactsController.php

	$this->fields_list = array(
			'id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
			'name' => array('title' => $this->l('Title'), 'width' => 130),
			'email' => array('title' => $this->l('Email address'), 'width' => 130),
			'contactperson' => array('title' => $this->l('contactperson'), 'width' => 130),
			'phonenumber' => array('title' => $this->l('phonenumber'), 'width' => 130),
			'description' => array('title' => $this->l('Description'), 'width' => 150),
		);

		parent::__construct();
	}

	public function renderForm()
	{
		$this->fields_form = array(
			'legend' => array(
				'title' => $this->l('Contacts'),
				'image' => '../img/admin/contact.gif'
			),
			'input' => array(
				array(
					'type' => 'text',
					'label' => $this->l('Title'),
					'name' => 'name',
					'size' => 33,
					'required' => true,
					'lang' => true,
					'desc' => $this->l('Contact name (e.g. Customer Support)'),
				),
				'contactperson' => array(
                'title' => $this->l('Contact Person'),
                'width' => 100,
                'filter_key' => 'contactperson',
                'tmpTableFilter' => true,
            ),
            'phonenumber' => array(
                'title' => $this->l('Phone number'),
                'width' => 100,
                'filter_key' => 'phonenumber',
                'tmpTableFilter' => true,
            ),

contact.txt

{shop_name}´dan mesajınız var...
 
E-posta adresi: {email} 
Name: {contactperson}
Phone #: {phonenumber}
Mesaj: {message}
 
{shop_name}

contact.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Message from {shop_name}</title>
</head>
<body>
	<table align="center" style="font-family: Verdana,sans-serif; font-size: 11px; color: #374953; width: 550px;">
<tbody>
<tr>
<td align="left"><a title="{shop_name}" href="{shop_url}"><img style="border: none;" src="{shop_logo}" alt="{shop_name}" /></a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style="background-color: #F7552D; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{shop_name}´dan mesajınız var...</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="left"><p>E-posta adresi: <a href="mailto:{email}"><strong>{email}</strong></a> <br />
  Name: {contactperson} <br> 
  Phone Number: {phonenumber}</p>
  <p>Mesaj: {message}</p></td>

</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #808080; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a></td>
</tr>
</tbody>
</table>
</body>
</html>

contact-form.tpl

<p class="text">
				<label for="email">{l s='Email address'}</label>
				{if isset($customerThread.email)}
					<input type="text" id="email" name="from" value="{$customerThread.email|escape:'htmlall':'UTF-8'}" readonly="readonly" />
				{else}
					<input type="text" id="email" name="from" value="{$email|escape:'htmlall':'UTF-8'}" />
				{/if}
			</p>
<p class="text">
         <label for="contactperson">{l s='Name'}</label>
         <input type="text" id="contactperson" name="contactperson" value="{if isset($contactperson)}{$contactperson|escape:'htmlall':'UTF-8'|stripslashes}{/if}" />
     </p>
     <p class="text">
         <label for="phonenumber">{l s='Phone Number'}</label>
         <input type="text" id="phonenumber" name="phonenumber" value="{if isset($phonenumber)}{$phonenumber|escape:'htmlall':'UTF-8'|stripslashes}{/if}" />
     </p>
		{if !$PS_CATALOG_MODE}
			{if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
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...