Fórum OpenCart Brasil

Por um e-commerce livre, confiável e profissional

Suporte geral sobre problemas técnicos para OpenCart v1.x.
#11000
Salve galera,

Criei uma pagina personalizada com um formulário onde o usuário poderá preencher e enviar um arquivo que irá para meu email, porém quando envio o email da um erro alguém tem idéia do que tá pegando ?

Erro:
Código: Selecionar todos
Warning: basename() expects parameter 1 to be string, array given in C:\xampp\htdocs\test\loja10\upload\system\library\mail.php on line 47Warning: file_exists() expects parameter 1 to be string, array given in C:\xampp\htdocs\test\loja10\upload\system\library\mail.php on line 132
Meu controller:
catalog/controller/orcamento/orcamento.php
Código: Selecionar todos
$mail = new Mail();
         $mail->protocol = $this->config->get('config_mail_protocol');
         $mail->parameter = $this->config->get('config_mail_parameter');
         $mail->hostname = $this->config->get('config_smtp_host');
         $mail->username = $this->config->get('config_smtp_username');
         $mail->password = $this->config->get('config_smtp_password');
         $mail->port = $this->config->get('config_smtp_port');
         $mail->timeout = $this->config->get('config_smtp_timeout');
         $mail->setTo($this->config->get('config_email'));
         $mail->setFrom($this->request->post['email']);
         $mail->setSender($this->request->post['name']['tmp_name']);
                         $mail->addAttachment($this->request->files['upload']);
           $mail->setSubject(sprintf($this->language->get('email_subject'), $this->request->post['name']));
           $mail->setText(strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')));
           $mail->send();
#11001
Opa orelhada foi mallzzz rsss a essa hora é perdoável


$mail->setSender($this->request->post['name']['tmp_name']);
$mail->addAttachment($this->request->files['upload']);

inverti as bolas

mas enfim, agora falta só definir o tipo de arquivo
#11045
Então deu outro erro no anexo mas posso disponibilizar sim, assim que eu concluir.
Versão 1.5.1.3


Criei também menu com 3 níveis que por padrão na aparece no menu top
Aneis
Aneis > Ouro
Aneis > Ouro > Branco

Esse pretendo colocar pra vender lá por 5 doletas hehehe quem sabe fatura uma graninha já paga a cerva = ]
#11051
Bom consegui criar a página customizada claro que não ficou uma maravilha mas funciona rsss o cliente solicitou um link extra no menu do topo de orçamento, esse link teria como função exibir um formulário com um anexo e enviar para o email dele. Bom peguei o modelo do CONTACT.PHP que era o que eu precisava porém faltava o upload, você pode simplesmente adicionar ao contact as informações abaixo ou pode criar sua página avulsa como eu fiz.

Versão utilizada: Opencart 1.5.1.3
Template: Cópia do original modificando apenas o menu, cores e coisinhas bestas

Bom então vamos ao POG(Programação Orientada a Gambiarra):

Criei a pasta "orcamento" e o arquivo "orcamento.php"
catalog/controller/orcamento/orcamento.php

Obs: coloquei as rotas orcamento/orcamento pois estou utilizando URL Amigável, caso não utilize então mude se não me engano é index.php?route=orcamento/orcamento, tem que me pesquisar não sei direito.
Outro detalhe é o email que coloquei primeiro o meu pessoal para testar e comentei o email que vem do sistema, então primeiro faça os testes depois remova o seu email e na linha abaixo possui o código para pegar o email do sistema.

Código: Selecionar todos
<?php
class ControllerOrcamentoOrcamento extends Controller {
	private $error = array();

  	public function index() {
		$this->language->load('orcamento/orcamento');

    	$this->document->setTitle($this->language->get('heading_title'));

    	    if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
              //email para testes
              $email_destino = 'seu_email@gmail.com';
              //após teste utilizar o email do sistema
              #$email_destino       = $mail->setTo($this->config->get('config_email'));
              $assunto = sprintf($this->language->get('email_subject'), $this->request->post['name']);
              $mensagem   = "<br><br><b>Nome:</b> " .$this->request->post['name']. "<br>";
              $mensagem  .= "<b>Email:</b> " .$this->request->post['email']. " <br>";
              $mensagem  .= strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8'));

              //formato o campo da mensagem
              $mensagem   = wordwrap( $mensagem, 50, "
              ", 1);

              $arquivo = isset($_FILES["upload"]) ? $_FILES["upload"] : FALSE;

              if(file_exists($arquivo["tmp_name"]) and !empty($arquivo)){

                      $fp = fopen($_FILES["upload"]["tmp_name"],"rb");
                      $anexo = fread($fp,filesize($_FILES["upload"]["tmp_name"]));

                      $anexo = base64_encode($anexo);

              fclose($fp);

              $anexo = chunk_split($anexo);


              $boundary = "XYZ-" . date("dmYis") . "-ZYX";

                    $mens = "--$boundary\n";
                    $mens .= "Content-Transfer-Encoding: 8bits\n";
                    $mens .= "Content-Type: text/html; charset=\"UTF-8\"\n\n"; //plain
                    $mens .= "$mensagem\n";
                    $mens .= "--$boundary\n";
                    $mens .= "Content-Type: ".$arquivo["type"]."\n";
                    $mens .= "Content-Disposition: attachment; filename=\"".$arquivo["name"]."\"\n";
                    $mens .= "Content-Transfer-Encoding: base64\n\n";
                    $mens .= "$anexo\n";
                    $mens .= "--$boundary--\r\n";

              $headers  = "MIME-Version: 1.0\n";
              $headers .= "From: " .$this->request->post['email']. " <" .$this->request->post['name'].">\r\n";
              $headers .= "Content-type: multipart/mixed; boundary=\"$boundary\"\r\n";
              $headers .= "$boundary\n";

              //envio o email com o anexo
              mail($email_destino,$assunto,$mens,$headers);
            }
            //caso não tenha arquivo em anexo
            else
            {
              //email para testes
              $email_destino = 'seu_email@gmail.com';
              //após teste utilizar o email do sistema
              #$email_destino       = $mail->setTo($this->config->get('config_email'));
              $assunto = sprintf($this->language->get('email_subject'), $this->request->post['name']);
              $mensagem   = "<br><br><b>Nome:</b> " .$this->request->post['name']. "<br>";
              $mensagem  .= "<b>Email:</b> " .$this->request->post['email']. " <br>";
              $mensagem  .= strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8'));

              $header = "MIME-Version: 1.0\n";
              $header .= "Content-type: text/html; charset=UTF-8\n";
              $header .= "From: " .$this->request->post['email']. "\n";

              mail($email_destino, $assunto, $mensagem, $header);
            }
	  		$this->redirect($this->url->link('orcamento/orcamento/success'));
    	}

      	$this->data['breadcrumbs'] = array();

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
        	'separator' => false
      	);

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('heading_title'),
			'href'      => $this->url->link('orcamento/orcamento'),
        	'separator' => $this->language->get('text_separator')
      	);

    	$this->data['heading_title'] = $this->language->get('heading_title');

    	$this->data['text_location'] = $this->language->get('text_location');
		$this->data['text_contact'] = $this->language->get('text_contact');
		$this->data['text_address'] = $this->language->get('text_address');
    	$this->data['text_telephone'] = $this->language->get('text_telephone');
    	$this->data['text_fax'] = $this->language->get('text_fax');

    	$this->data['entry_name'] = $this->language->get('entry_name');
    	$this->data['entry_email'] = $this->language->get('entry_email');
    	$this->data['entry_enquiry'] = $this->language->get('entry_enquiry');
    	$this->data['entry_upload'] = $this->language->get('entry_upload');
		$this->data['entry_captcha'] = $this->language->get('entry_captcha');

		if (isset($this->error['name'])) {
    		$this->data['error_name'] = $this->error['name'];
		} else {
			$this->data['error_name'] = '';
		}

		if (isset($this->error['email'])) {
			$this->data['error_email'] = $this->error['email'];
		} else {
			$this->data['error_email'] = '';
		}

		if (isset($this->error['enquiry'])) {
			$this->data['error_enquiry'] = $this->error['enquiry'];
		} else {
			$this->data['error_enquiry'] = '';
		}

        if (isset($this->error['upload'])) {
			$this->data['error_upload'] = $this->error['upload'];
		} else {
			$this->data['error_upload'] = '';
		}

 		if (isset($this->error['captcha'])) {
			$this->data['error_captcha'] = $this->error['captcha'];
		} else {
			$this->data['error_captcha'] = '';
		}

    	$this->data['button_continue'] = $this->language->get('button_continue');

		$this->data['action'] = $this->url->link('orcamento/orcamento');
		$this->data['store'] = $this->config->get('config_name');
    	$this->data['address'] = nl2br($this->config->get('config_address'));
    	$this->data['telephone'] = $this->config->get('config_telephone');
    	$this->data['fax'] = $this->config->get('config_fax');

		if (isset($this->request->post['name'])) {
			$this->data['name'] = $this->request->post['name'];
		} else {
			$this->data['name'] = $this->customer->getFirstName();
		}

		if (isset($this->request->post['email'])) {
			$this->data['email'] = $this->request->post['email'];
		} else {
			$this->data['email'] = $this->customer->getEmail();
		}
        //via
        if (isset($this->request->files['upload'])) {
			$this->data['upload'] = $this->request->files['upload'];
		} else {
			$this->data['email'] = $this->customer->getEmail();
		}

		if (isset($this->request->post['enquiry'])) {
			$this->data['enquiry'] = $this->request->post['enquiry'];
		} else {
			$this->data['enquiry'] = '';
		}

		if (isset($this->request->post['captcha'])) {
			$this->data['captcha'] = $this->request->post['captcha'];
		} else {
			$this->data['captcha'] = '';
		}

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/orcamento/orcamento.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/orcamento/orcamento.tpl';
		} else {
			$this->template = 'default/template/orcamento/orcamento.tpl';
		}

		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);

 		$this->response->setOutput($this->render());
  	}

  	public function success() {
		$this->language->load('orcamento/orcamento');

		$this->document->setTitle($this->language->get('heading_title'));

      	$this->data['breadcrumbs'] = array();

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
        	'separator' => false
      	);

      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('heading_title'),
			'href'      => $this->url->link('orcamento/orcamento'),
        	'separator' => $this->language->get('text_separator')
      	);

    	$this->data['heading_title'] = $this->language->get('heading_title');

    	$this->data['text_message'] = $this->language->get('text_message');

    	$this->data['button_continue'] = $this->language->get('button_continue');

    	$this->data['continue'] = $this->url->link('common/home');

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/success.tpl';
		} else {
			$this->template = 'default/template/common/success.tpl';
		}

		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);

 		$this->response->setOutput($this->render());
	}

	public function captcha() {
		$this->load->library('captcha');

		$captcha = new Captcha();

		$this->session->data['captcha'] = $captcha->getCode();

		$captcha->showImage();
	}

  	private function validate() {
    	if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 32)) {
      		$this->error['name'] = $this->language->get('error_name');
    	}

    	if (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
      		$this->error['email'] = $this->language->get('error_email');
    	}

    	if ((utf8_strlen($this->request->post['enquiry']) < 10) || (utf8_strlen($this->request->post['enquiry']) > 3000)) {
      		$this->error['enquiry'] = $this->language->get('error_enquiry');
    	}

    	if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
      		$this->error['captcha'] = $this->language->get('error_captcha');
    	}

		if (!$this->error) {
	  		return true;
		} else {
	  		return false;
		}
  	}
}
?>
Bom feito isso é necessário criar o template (nota-se que criei a estrutura /orcamento/orcamento.tpl)
catalog/view/theme/nome_do_seu_tema/orcamento/orcamento.tpl
Código: Selecionar todos
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="contact">
    <h2><?php echo $text_location; ?></h2>
    <div class="contact-info">
      <div class="content"><div class="left"><b><?php echo $text_address; ?></b><br />
        <?php echo $store; ?><br />
        <?php echo $address; ?></div>
      <div class="right">
        <?php if ($telephone) { ?>
        <b><?php echo $text_telephone; ?></b><br />
        <?php echo $telephone; ?><br />
        <br />
        <?php } ?>
        <?php if ($fax) { ?>
        <b><?php echo $text_fax; ?></b><br />
        <?php echo $fax; ?>
        <?php } ?>
      </div>
    </div>
    </div>
    <h2><?php echo $text_contact; ?></h2>
    <div class="content">
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="<?php echo $name; ?>" />
    <br />
    <?php if ($error_name) { ?>
    <span class="error"><?php echo $error_name; ?></span>
    <?php } ?>
    <br />
    <b><?php echo $entry_email; ?></b><br />
    <input type="text" name="email" value="<?php echo $email; ?>" />
    <br />
    <?php if ($error_email) { ?>
    <span class="error"><?php echo $error_email; ?></span>
    <?php } ?>
    <br />
    <b><?php echo $entry_enquiry; ?></b><br />
    <textarea name="enquiry" cols="40" rows="10" style="width: 99%;"><?php echo $enquiry; ?></textarea>
    <br />
    <?php if ($error_enquiry) { ?>
    <span class="error"><?php echo $error_enquiry; ?></span>
    <?php } ?>
    <br />

    <br />
    <b><?php echo $entry_upload; ?></b><br />
    <input type="file" name="upload" />
    <br />
    <?php if ($error_upload) { ?>
    <span class="error"><?php echo $error_upload; ?></span>
    <?php } ?>
    <br />

    <b><?php echo $entry_captcha; ?></b><br />
    <input type="text" name="captcha" value="<?php echo $captcha; ?>" />
    <br />
    <img src="index.php?route=orcamento/orcamento/captcha/captcha" alt="" />
    <?php if ($error_captcha) { ?>
    <span class="error"><?php echo $error_captcha; ?></span>
    <?php } ?>
    </div>
    <div class="buttons">
      <div class="right"><a onclick="$('#contact').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
    </div>
  </form>
  <?php echo $content_bottom; ?></div>
<?php echo $footer; ?>
Bom agora é criar o arquivo de tradução
catalog/language/portuguese-br/orcamento/orcamento.php
Código: Selecionar todos
<?php
// Heading
$_['heading_title']  = 'Orçamento';

// Text 
$_['text_location']  = 'Onde estamos';
$_['text_contact']   = 'Envie a imagem da peça desejada para receber o orçamento';
$_['text_address']   = 'Endereço:';
$_['text_email']     = 'E-mail:';
$_['text_telephone'] = 'Telefone:';
$_['text_fax']       = 'Fax:';
$_['text_message']   = '<p>Sua mensagem foi enviada com sucesso! Entraremos em contato.</p>';

// Entry Fields
$_['entry_name']     = 'Seu Nome:';
$_['entry_email']    = 'Seu E-mail:';
$_['entry_enquiry']  = 'Mensagem:';
$_['entry_upload']  =  'Anexar imagem:';
$_['entry_captcha']  = 'Digite o código da imagem:';

// Email
$_['email_subject']  = 'Mensagem %s';

// Errors
$_['error_name']     = 'Atenção: Seu nome deve ter entre 3 e 32 caracteres!';
$_['error_email']    = 'Atenção: Seu e-mail parece não ser válido!';
$_['error_upload']   = 'Atenção: Erro ao enviar anexo!';
$_['error_enquiry']  = 'Atenção: A mensagem deve ter entre 10 e 3000 caracteres!';
$_['error_captcha']  = 'Atenção: O código digitado não é o mesmo da imagem!';
?>
Bom agora é só adicionar o link no menu do topo editando o arquivo
(Estou utilizando esse arquivo separado no meu template porque se deixar o layout default, se o opencart atualizar ele vai alterar esse arquivo e você vai perder as alterações que havia feito)
catalog/view/theme/nome_do_seu_tema/template/common/header.tpl

Basicamente basta adicionar ANTES de:
</ul>
<div id="notification"></div>

o seu menu (observe a URL pois estou utilizando URL Amigável)

COM URL AMIGAVEL
Código: Selecionar todos
<li>
<a href="orcamento/orcamento">
Or&ccedil;amento
</a>
</li>
SEM URL AMIGAVEL
Código: Selecionar todos
<li>
<a href="index.php?route=orcamento/orcamento">
Or&ccedil;amento
</a>
</li>
mais um menuzinho
#24911
Adaptei para confirmação de pagamento da seguinte forma:
catalog/controller/orcamento/orcamento.php
Código: Selecionar todos
<?php
class ControllerOrcamentoOrcamento extends Controller {
   private $error = array();

     public function index() {
		 if (!$this->customer->isLogged()) {
	  		$this->session->data['redirect'] = $this->url->link('account/orcamento', '', 'SSL');
	  
	  		$this->redirect($this->url->link('account/login', '', 'SSL'));}
      $this->language->load('orcamento/orcamento');

       $this->document->setTitle($this->language->get('heading_title'));

           if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
              //email para testes
              $email_destino = 'seuemail@seudominio.com.br';
              //após teste utilizar o email do sistema
              //$email_destino = $mail->setTo($this->config->get('config_email'));
              $assunto = sprintf($this->language->get('email_subject'), $this->request->post['name']);
              $mensagem   = "<br><br><b>Nome:</b> " .$this->request->post['name']. "<br>";
              $mensagem  .= "<b>Email:</b> " .$this->request->post['email']. " <br>";
              $mensagem  .= strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8'));

              //formato o campo da mensagem
              $mensagem   = wordwrap( $mensagem, 50, "
              ", 1);

              $arquivo = isset($_FILES["upload"]) ? $_FILES["upload"] : FALSE;

              if(file_exists($arquivo["tmp_name"]) and !empty($arquivo)){

                      $fp = fopen($_FILES["upload"]["tmp_name"],"rb");
                      $anexo = fread($fp,filesize($_FILES["upload"]["tmp_name"]));

                      $anexo = base64_encode($anexo);

              fclose($fp);

              $anexo = chunk_split($anexo);


              $boundary = "XYZ-" . date("dmYis") . "-ZYX";

                    $mens = "--$boundary\n";
                    $mens .= "Content-Transfer-Encoding: 8bits\n";
                    $mens .= "Content-Type: text/html; charset=\"UTF-8\"\n\n"; //plain
                    $mens .= "$mensagem\n";
                    $mens .= "--$boundary\n";
                    $mens .= "Content-Type: ".$arquivo["type"]."\n";
                    $mens .= "Content-Disposition: attachment; filename=\"".$arquivo["name"]."\"\n";
                    $mens .= "Content-Transfer-Encoding: base64\n\n";
                    $mens .= "$anexo\n";
                    $mens .= "--$boundary--\r\n";

              $headers  = "MIME-Version: 1.0\n";
              $headers .= "From: " .$this->request->post['email']. " <" .$this->request->post['name'].">\r\n";
              $headers .= "Content-type: multipart/mixed; boundary=\"$boundary\"\r\n";
              $headers .= "$boundary\n";

              //envio o email com o anexo
              mail($email_destino,$assunto,$mens,$headers);
            }
            //caso não tenha arquivo em anexo
            else
            {
              //email para testes
              $email_destino = 'seuemail@seudominio.com.br';
              //após teste utilizar o email do sistema
              //$email_destino = $mail->setTo($this->config->get('config_email'));
              $assunto = sprintf($this->language->get('email_subject'), $this->request->post['name']);
              $mensagem   = "<br><br><b>Nome:</b> " .$this->request->post['name']. "<br>";
              $mensagem  .= "<b>Email:</b> " .$this->request->post['email']. " <br>";
              $mensagem  .= strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8'));

              $header = "MIME-Version: 1.0\n";
              $header .= "Content-type: text/html; charset=UTF-8\n";
              $header .= "From: " .$this->request->post['email']. "\n";

              mail($email_destino, $assunto, $mensagem, $header);
            }
           $this->redirect($this->url->link('orcamento/orcamento/success'));
       }

         $this->data['breadcrumbs'] = array();

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('text_home'),
         'href'      => $this->url->link('common/home'),
           'separator' => false
         );

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('heading_title'),
         'href'      => $this->url->link('orcamento/orcamento'),
           'separator' => $this->language->get('text_separator')
         );

       $this->data['heading_title'] = $this->language->get('heading_title');

       $this->data['text_location'] = $this->language->get('text_location');
      $this->data['text_contact'] = $this->language->get('text_contact');
      $this->data['text_address'] = $this->language->get('text_address');
       $this->data['text_telephone'] = $this->language->get('text_telephone');
       $this->data['text_fax'] = $this->language->get('text_fax');

       $this->data['entry_name'] = $this->language->get('entry_name');
       $this->data['entry_email'] = $this->language->get('entry_email');
       $this->data['entry_enquiry'] = $this->language->get('entry_enquiry');
       $this->data['entry_upload'] = $this->language->get('entry_upload');
      $this->data['entry_captcha'] = $this->language->get('entry_captcha');

      if (isset($this->error['name'])) {
          $this->data['error_name'] = $this->error['name'];
      } else {
         $this->data['error_name'] = '';
      }

      if (isset($this->error['email'])) {
         $this->data['error_email'] = $this->error['email'];
      } else {
         $this->data['error_email'] = '';
      }

      if (isset($this->error['enquiry'])) {
         $this->data['error_enquiry'] = $this->error['enquiry'];
      } else {
         $this->data['error_enquiry'] = '';
      }

        if (isset($this->error['upload'])) {
         $this->data['error_upload'] = $this->error['upload'];
      } else {
         $this->data['error_upload'] = '';
      }

       if (isset($this->error['captcha'])) {
         $this->data['error_captcha'] = $this->error['captcha'];
      } else {
         $this->data['error_captcha'] = '';
      }

       $this->data['button_continue'] = $this->language->get('button_continue');

      $this->data['action'] = $this->url->link('orcamento/orcamento');
      $this->data['store'] = $this->config->get('config_name');
       $this->data['address'] = nl2br($this->config->get('config_address'));
       $this->data['telephone'] = $this->config->get('config_telephone');
       $this->data['fax'] = $this->config->get('config_fax');

      if (isset($this->request->post['name'])) {
         $this->data['name'] = $this->request->post['name'];
      } else {
         $this->data['name'] = $this->customer->getFirstName();
      }

      if (isset($this->request->post['email'])) {
         $this->data['email'] = $this->request->post['email'];
      } else {
         $this->data['email'] = $this->customer->getEmail();
      }
        //via
        if (isset($this->request->files['upload'])) {
         $this->data['upload'] = $this->request->files['upload'];
      } else {
         $this->data['email'] = $this->customer->getEmail();
      }

      if (isset($this->request->post['enquiry'])) {
         $this->data['enquiry'] = $this->request->post['enquiry'];
      } else {
         $this->data['enquiry'] = '';
      }

      if (isset($this->request->post['captcha'])) {
         $this->data['captcha'] = $this->request->post['captcha'];
      } else {
         $this->data['captcha'] = '';
      }

      if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/orcamento/orcamento.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/orcamento/orcamento.tpl';
      } else {
         $this->template = '*/template/orcamento/orcamento.tpl';
      }

      $this->children = array(
         'common/column_left',
         'common/column_right',
         'common/content_top',
         'common/content_bottom',
         'common/footer',
         'common/header'
      );

       $this->response->setOutput($this->render());
     }

     public function success() {
      $this->language->load('orcamento/orcamento');

      $this->document->setTitle($this->language->get('heading_title'));

         $this->data['breadcrumbs'] = array();

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('text_home'),
         'href'      => $this->url->link('common/home'),
           'separator' => false
         );

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('heading_title'),
         'href'      => $this->url->link('orcamento/orcamento'),
           'separator' => $this->language->get('text_separator')
         );

       $this->data['heading_title'] = $this->language->get('heading_title');

       $this->data['text_message'] = $this->language->get('text_message');

       $this->data['button_continue'] = $this->language->get('button_continue');

       $this->data['continue'] = $this->url->link('common/home');

      if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/common/success.tpl';
      } else {
         $this->template = '*/template/common/success.tpl';
      }

      $this->children = array(
         'common/column_left',
         'common/column_right',
         'common/content_top',
         'common/content_bottom',
         'common/footer',
         'common/header'
      );

       $this->response->setOutput($this->render());
   }

   public function captcha() {
      $this->load->library('captcha');

      $captcha = new Captcha();

      $this->session->data['captcha'] = $captcha->getCode();

      $captcha->showImage();
   }

     private function validate() {
       if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 32)) {
            $this->error['name'] = $this->language->get('error_name');
       }

       if (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
            $this->error['email'] = $this->language->get('error_email');
       }

       if ((utf8_strlen($this->request->post['enquiry']) < 10) || (utf8_strlen($this->request->post['enquiry']) > 3000)) {
            $this->error['enquiry'] = $this->language->get('error_enquiry');
       }

       if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
            $this->error['captcha'] = $this->language->get('error_captcha');
       }

      if (!$this->error) {
           return true;
      } else {
           return false;
      }
     }
}

?>
Mudei para $this->template = '*/template/orcamento/orcamento.tpl'; para informar todas as templates

catalog/view/theme/nome_do_seu_tema/orcamento/orcamento.tpl
Código: Selecionar todos
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>

<div id="content"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <h1><?php echo $heading_title; ?></h1>
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="contact">
        <h2><?php echo $text_location; ?></h2>
        <div class="contact-info">
            <div class="content">
                <div class="left"><b><?php echo $text_address; ?></b><br />
                    <?php echo $store; ?><br />
                    <?php echo $address; ?></div>
                <div class="right">
                    <?php if ($telephone) { ?>
                    <b><?php echo $text_telephone; ?></b><br />
                    <?php echo $telephone; ?><br />
                    <br />
                    <?php } ?>
                    <?php if ($fax) { ?>
                    <b><?php echo $text_fax; ?></b><br />
                    <?php echo $fax; ?>
                    <?php } ?>
                </div>
            </div>
        </div>
        <h2><?php echo $text_contact; ?></h2>
        <div class="content"> <b><?php echo $entry_name; ?></b><br />
            <input type="text" name="name" value="<?php echo $name; ?>" />
            <br />
            <?php if ($error_name) { ?>
            <span class="error"><?php echo $error_name; ?></span>
            <?php } ?>
            <br />
            <b><?php echo $entry_email; ?></b><br />
            <input type="text" name="email" value="<?php echo $email; ?>" />
            <br />
            <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span>
            <?php } ?>
            <br />
            <b><?php echo $entry_enquiry; ?></b><br />
            <textarea name="enquiry" cols="40" rows="10" style="width: 99%;"><?php echo $enquiry; ?></textarea>
            <br />
            <?php if ($error_enquiry) { ?>
            <span class="error"><?php echo $error_enquiry; ?></span>
            <?php } ?>
            <br />
            <br />
            <b><?php echo $entry_upload; ?></b><br />
            <input type="file" name="upload" />
            <br />
            <?php if ($error_upload) { ?>
            <span class="error"><?php echo $error_upload; ?></span>
            <?php } ?>
            <br />
            <b><?php echo $entry_captcha; ?></b><br />
            <input type="text" name="captcha" value="<?php echo $captcha; ?>" />
            <br />
            <img src="index.php?route=orcamento/orcamento/captcha/captcha" alt="" />
            <?php if ($error_captcha) { ?>
            <span class="error"><?php echo $error_captcha; ?></span>
            <?php } ?>
        </div>
        <div class="buttons">
            <div class="right"><a onclick="$('#contact').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
        </div>
    </form>
    <?php echo $content_bottom; ?></div>
<?php echo $footer; ?>
catalog/language/portuguese-br/orcamento/orcamento.php
Código: Selecionar todos
<?php
// Heading
$_['heading_title']  = 'Comprovante de pagamento';

// Text 
$_['text_location']  = 'Onde estamos';
$_['text_contact']   = 'Envie a imagem para confirmar o pagamento';
$_['text_address']   = 'Endereço:';
$_['text_email']     = 'E-mail:';
$_['text_telephone'] = 'Telefone:';
$_['text_fax']       = 'Fax:';
$_['text_message']   = '<p>Sua mensagem foi enviada com sucesso! Entraremos em contato.</p>';

// Entry Fields
$_['entry_name']     = 'Seu Nome:';
$_['entry_email']    = 'Seu E-mail:';
$_['entry_enquiry']  = 'Mensagem:';
$_['entry_upload']  =  'Anexar imagem:';
$_['entry_captcha']  = 'Digite o código da imagem:';

// Email
$_['email_subject']  = 'Mensagem %s';

// Errors
$_['error_name']     = 'Atenção: Seu nome deve ter entre 3 e 32 caracteres!';
$_['error_email']    = 'Atenção: Seu e-mail parece não ser válido!';
$_['error_upload']   = 'Atenção: Erro ao enviar anexo!';
$_['error_enquiry']  = 'Atenção: A mensagem deve ter entre 10 e 3000 caracteres!';
$_['error_captcha']  = 'Atenção: O código digitado não é o mesmo da imagem!';
?>
/public_html/catalog/view/theme/nome_do_seu_tema/template/account/account.tpl

Depois de
Código: Selecionar todos
<li><a href="<?php echo $transaction; ?>"><?php echo $text_transaction; ?></a></li>
Adicionar
Código: Selecionar todos
<li><a href="index.php?route=orcamento/orcamento">Confirmar Pagamento</a></li>
Desta forma quem estiver autenticado no sistema poderá confirmar o pagamento.

Sei que não é grande coisa, mas vai facilitar a vida dos clientes (y) a proposito excelente solução estes scripts eim :)


edit:

Para evitar de ter que ficar modificadno account.tpl fiz um XML aqui no vqmode que insere a opção abaixo do "Crédito e Debitos" na pagina "minha conta";

confirmar_pagamento.xml
Código: Selecionar todos
<modification>
	<id>Comprovar pagamento</id>
	<version>1.0</version>
	<vqmver>2.1.5</vqmver>
	<author>kinzinho / vqmod Percio Andrade</author>
	
	<file name="catalog/controller/account/account.php">
		<operation>
			<search position="after"><![CDATA[$this->data['text_transaction'] = $this->language->get('text_transaction');]]></search>
			<add><![CDATA[
			$this->data['text_confirmpayment'] = $this->language->get('text_confirmpayment');
			]]>
			</add>
		</operation>
	</file>
		<file name="catalog/view/theme/*/template/account/account.tpl">
		<operation error="skip">
			<search position="after"><![CDATA[<li><a href="<?php echo $transaction; ?>"><?php echo $text_transaction; ?></a></li>]]></search>
			<add><![CDATA[
			<li><a href="index.php?route=orcamento/orcamento">Confirmar Pagamento</a></li>
			]]>
			</add>
		</operation>
	</file>
	
	<file name="catalog/language/english/account/account.php">
		<operation error="skip">
			<search position="after"><![CDATA[$_['text_transaction']]]></search>
			<add><![CDATA[
			$_['text_confirmpayment']     = 'Confirm Payment';
			]]>
			</add>
		</operation>
	</file>
		<file name="catalog/language/portuguese-br/account/account.php">
		<operation error="skip">
			<search position="after"><![CDATA[$_['text_transaction']]]></search>
			<add><![CDATA[
			$_['text_confirmpayment']     = 'Confirmar Pagamento';
			]]>
			</add>
		</operation>
	</file>

</modification>
Teste feito na 1.5.3.1 (y)/bpost