riopar10 Posted October 7, 2009 Share Posted October 7, 2009 Hola, despues de un tiempo me he dado cuenta que el formulario de contacto no envia el asunto (texto), email y demas si, sabeis el problema. gracias Link to comment Share on other sites More sharing options...
Fergus Posted October 9, 2009 Share Posted October 9, 2009 El asunto o mensaje??El asunto ya está predeterminada y tendria que aparecer automamente en el e-mail cuando se ejecuta el formulario de contacto. Link to comment Share on other sites More sharing options...
riopar10 Posted October 9, 2009 Author Share Posted October 9, 2009 ese es el motivo, que no aparece, he subido contact-form de nuevo y nada, sigue igual Link to comment Share on other sites More sharing options...
Fergus Posted October 9, 2009 Share Posted October 9, 2009 Adjunta aca los dos archivos, contact-form.php y contact-form.tpl y vemos si te podemos ayudar.Saludos. Link to comment Share on other sites More sharing options...
riopar10 Posted October 10, 2009 Author Share Posted October 10, 2009 Hola, adjunto contact-form<?php$useSSL = true;include(dirname(__FILE__).'/config/config.inc.php');include(dirname(__FILE__).'/header.php');$errors = array();$smarty->assign('contacts', Contact::getContacts(intval($cookie->id_lang)));if (Tools::isSubmit('submitMessage')){ if (!($from = Tools::getValue('from')) OR !Validate::isEmail($from)) $errors[] = Tools::displayError('invalid e-mail address'); elseif (!($message = nl2br2(Tools::getValue('message')))) $errors[] = Tools::displayError('message cannot be blank'); elseif (!Validate::isMessage($message)) $errors[] = Tools::displayError('invalid message'); elseif (!($id_contact = intval(Tools::getValue('id_contact'))) OR !(Validate::isLoadedObject($contact = new Contact(intval($id_contact), intval($cookie->id_lang))))) $errors[] = Tools::displayError('please select a contact in the list'); else { if (intval($cookie->id_customer)) $customer = new Customer(intval($cookie->id_customer)); if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from))) $smarty->assign('confirmation', 1); else $errors[] = Tools::displayError('an error occurred while sending message'); }}$email = Tools::getValue('from', ((isset($cookie) AND isset($cookie->email) AND Validate::isEmail($cookie->email)) ? $cookie->email : ''));$smarty->assign(array( 'errors' => $errors, 'email' => $email));$smarty->display(_PS_THEME_DIR_.'contact-form.tpl');include(dirname(__FILE__).'/footer.php');?>y contact-form.tpl{capture name=path}{l s='Contact'}{/capture}{include file=$tpl_dir./breadcrumb.tpl} {l s='Contact us'} {if isset($confirmation)}{l s='Your message has been successfully sent to our team.'} {l s='Home'} {else}{l s='For questions about an order or for information about our products'}. {include file=$tpl_dir./errors.tpl} <form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std">{l s='Send a message'} {l s='Subject'}{l s='-- Choose --'} {foreach from=$contacts item=contact}{$contact.name|escape:'htmlall':'UTF-8'} {/foreach} {foreach from=$contacts item=contact} {$contact.description|escape:'htmlall':'UTF-8'} {/foreach}{l s='E-mail address'} <input type="text" id="email" name="from" value="{$email}" /> {l s='Message'} <textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea> <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" /> </form>{/if}Espero vuestra ayuda, gracias Link to comment Share on other sites More sharing options...
Fergus Posted October 10, 2009 Share Posted October 10, 2009 Proba con reemplazar este código en la linea 26 apróx en contact-form.php if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from))) Link to comment Share on other sites More sharing options...
riopar10 Posted October 10, 2009 Author Share Posted October 10, 2009 He realizado el cambio y sigue igual, parece raro.Gracias por tu ayuda Daniel Link to comment Share on other sites More sharing options...
Recommended Posts