Bem vindo ao brockdev.com, não seja tímido compartilhe suas duvidas e conhecimento. :D

One Step Checkout - Opção de login não aparece

rafaelwo Usuário
editado December 2013 em Módulos Varios
Olá Pessoal, instalei a poucos dias o módulo 4.0.2 Pro no Magento 1.8 e o meu problema é que não aparece a opção de fazer login caso o cliente já tenha cadastro na loja...
Já tentei contato com o Deivison de toda a forma por diversos dias, mas ele não responde...

Alguém pode meu auxiliar?

Abraços!
«1

Comentários

  • Jonatan Machado Moderador Global, Administrador
    Eu ainda não testei esse modulo no Magento 1.8 não recomendo utilizar uma vercao tao nova porque incompatibilidade com módulos são muito comum, nao sei se esse problema e causa disso, mais e so uma dica ;) .
    Vou tentar simular esse problema aqui.
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Olá Jonatan,

    Obrigado pelo retorno. No fórum do OSC vi que algumas pessoas passaram por este mesmo problema em também em versões anteriores do Magento, até tentei a solução indicada pelo Deivison, porém não mudou nada...
    Ele indicou para a pessoa substituir o arquivo onepagecheckout.phtml por este: https://github.com/deivisonarthur/OSC-M ... kout.phtml

    Abraços!
  • Jonatan Machado Moderador Global, Administrador
    Quando voce aperta em fazer login no OSCBR nao aparece o campo de digitar ou nao redireciona para pagina de login?
    Você usa o login padrão do magento ou o login do OSCBR?
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Olá Jonatan,

    Não, eu não clico na opção de fazer login do OSC porque ele simplesmente não aparece, ou seja não existe a opção de fazer login pelo OSC, não aparece a frase “Caso possua conta? Clique aqui e poupe tempo!” ...

    Abraços
  • Jonatan Machado Moderador Global, Administrador
    Pode passar o link do seu projeto?
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Olá Jonatan,

    Segue o link para compra de um produto para teste: http://lojaam.com.br/clor-in.html#.UqYwLPRDt_B

    Você tem Skype ou facebook para conversarmos diretamente?

    Valeu!
  • Jonatan Machado Moderador Global, Administrador
    Poste aqui o conteúdo do onestepcheckout.phtml
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com

  • <div class=\"page-title\">
    <h1 class='h1_opc'><?php echo Mage::getStoreConfig('onepagecheckout/general/title') ?></h1>
    <?php echo $this->__('Fill in the fields below to complete your purchase!') ?>
    <?php if (!Mage::getSingleton('customer/session')->isLoggedIn()){ ?>



    <?php
    $guest_checkout1 = Mage::getStoreConfig('onepagecheckout/general/guest_checkout1');
    if ($guest_checkout1 == 1) : ?>
    <p class=\"onepagecheckout_loginarea\">
    <a href=\"javascript:void(0)\" class=\"onepagecheckout_loginlink\" onclick='open_login();'>
    <?php echo $this->__('Already registered? Click here to login') ?>
    </a>
    </p>
    <?php endif; ?>


    <?php
    $guest_checkout2 = Mage::getStoreConfig('onepagecheckout/general/guest_checkout2');
    if ($guest_checkout2 === '1') : ?>
    <p class=\"onepagecheckout_loginarea\">
    <a href=\"<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)?>customer/account/login/\" class=\"onepagecheckout_loginlink\" >
    <?php echo $this->__('Already registered? Click here to login') ?>
    </a>
    </p>
    <?php endif; ?>




    <?php

    echo $this->getChildHtml('customer.login');
    echo $this->getChildHtml('customer.forgot');

    }
    ?>
    </div>
    <div class='ptdivline'></div>

    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

    <?php
    $seq_http = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on');

    ?>
    <script type=\"text/javascript\">
    var http_type = '<?php if($seq_http){echo 'https';}else{echo 'http';}?>';
    </script>
    <script type=\"text/javascript\" src=\"<?php echo $this->getSkinUrl('js/onepagecheckout.js') ?>\"></script>

    <script type=\"text/javascript\">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>

    <form action=\"\" id=\"onepagecheckout_orderform\">
    <div class=\"col3-set onepagecheckout_datafields\">
    <div class=\"col-1\">
    <?php echo $this->getChildHtml('billing.address') ?>
    <?php echo $this->getChildHtml('shipping.address') ?>
    </div>

    <div class=\"col-2\">
    <?php echo $this->getChildHtml('shipping.method') ?>
    <?php echo $this->getChildHtml('payment.method') ?>
    <div id=\"checkout-coupon-discount-load\">
    <?php echo $this->getChildHtml('coupon') ?>
    </div>

    <?php if (Mage::getStoreConfig('onepagecheckout/general/comment')) : ?>
    <div class=\"op_block_title\">
    <?php echo $this->helper('sales')->__('Comment') ?>
    </div>
    <div class=\"form_fields\">
    <div class=\"full\">
    <div class=\"data_area\" id='comment-block'>
    <textarea name=\"order-comment\" id=\"order-comment\"><?php echo trim(Mage::getSingleton('customer/session')->getOrderCustomerComment()) ?></textarea>
    </div>
    </div>
    </div>
    <?php endif; ?>
    <!--<input type=\"hidden\" checked=\"checked\" id=\"newsletter-signup\" name=\"newsletter\" value=\"1\" title=\"<?php echo Mage::helper('newsletter')->__('Sign up for our newsletter') ?>\" class=\"checkbox\" />-->

    <?php //if (Mage::helper('onepagecheckout')->isSubscribeNewAllowed()) : ?>
    <p class=\"newsletter\">
    <input type=\"checkbox\" id=\"newsletter-signup\" name=\"newsletter\" title=\"<?php echo Mage::helper('newsletter')->__('Sign up for our newsletter') ?>\" class=\"checkbox\" />
    <label for=\"newsletter-signup\">
    Receba nossas novidades
    </label>
    </p>
    <?php //endif; ?>

    </div>

    <div class=\"col-3\">
    <?php echo $this->getChildHtml('review') ?>
    </div>
    </div>
    </form>

    <script type=\"text/javascript\">
    //<![CDATA[
    var checkout = new OPC('onepagecheckout_orderform', {
    save : '<?php echo $this->getUrl('onepagecheckout/index/saveOrder', array('_secure'=>$seq_http)) ?>',
    update : '<?php echo $this->getUrl('onepagecheckout/index/updateCheckout', array('_secure'=>$seq_http)) ?>',
    success : '<?php echo $this->getUrl('onepagecheckout/index/success', array('_secure'=>$seq_http)) ?>',
    failure : '<?php echo $this->getUrl('checkout/cart') ?>'
    }, \"<?php echo $this->__('Please agree to all the terms and conditions.') ?>\");

    document.observe(\"dom:loaded\", function() {
    var win_triggers = Array();
    $$('.checkout-agreements .agree a').each(function(item){
    var obj = {
    el: $$('.' + item.className),
    event: 'click',
    window: $(item.className + '-window')
    };
    win_triggers.push(obj);
    });
    opc_window = new OPC.Window({triggers: win_triggers});
    });


    var opcDatafields=document.getElementsByClassName('onepagecheckout_datafields')[0];var opcLock=document.createElement('div');opcLock.setStyle({display:'none',position:'relative',width:'100%',top:'0',left:'0',backgroundColor:'#fff',opacity:'0.7'});opcDatafields.appendChild(opcLock);if(checkout){checkout.setLoadWaiting=function(flag){if(flag){opcLock.setStyle({display:'block',height:opcDatafields.offsetHeight+'px'});var container=$('review-buttons-container');container.addClassName('disabled');container.setStyle({opacity:0.5});this._disableEnableAll(container,true)}else if(this.loadWaiting){opcLock.setStyle({display:'none',height:opcDatafields.offsetHeight+'px'});var container=$('review-buttons-container');container.removeClassName('disabled');container.setStyle({opacity:1});this._disableEnableAll(container,false)}this.loadWaiting=flag}};


    //]]>
    </script>





    <script type=\"text/javascript\">
    var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");
    document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));
    </script>
    <script type=\"text/javascript\">
    try{
    var pageTracker = _gat._getTracker(\"<?=Mage::getStoreConfig('onepagecheckout/general/analytics')?>\");
    pageTracker._trackPageview();
    } catch(err) {}

    </script>
  • Jonatan Machado Moderador Global, Administrador
    Se voce colocar na configuraçao do onepagecheckout usar login padrao do magento tambem nao funciona?

    Testa utilizando esse onepagecheckout.phtml
    <div class=\"page-title\">
    <h1 class='h1_opc'><?php echo Mage::getStoreConfig('onepagecheckout/general/title') ?></h1>
    <?php echo $this->__('Fill in the fields below to complete your purchase!') ?>
    <?php if (!Mage::getSingleton('customer/session')->isLoggedIn()){ ?>



    <?php
    $guest_checkout1 = Mage::getStoreConfig('onepagecheckout/general/guest_checkout1');
    if ($guest_checkout1 == 1) : ?>
    <p class=\"onepagecheckout_loginarea\">
    <a href=\"javascript:void(0)\" class=\"onepagecheckout_loginlink\" onclick='open_login();'>
    <?php echo $this->__('Already registered? Click here to login') ?>
    </a>
    </p>
    <?php endif; ?>


    <?php
    $guest_checkout2 = Mage::getStoreConfig('onepagecheckout/general/guest_checkout2');
    if ($guest_checkout2 === '1') : ?>
    <p class=\"onepagecheckout_loginarea\">
    <a href=\"<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)?>customer/account/login/\" class=\"onepagecheckout_loginlink\" >
    <?php echo $this->__('Already registered? Click here to login') ?>
    </a>
    </p>
    <?php endif; ?>




    <?php

    echo $this->getChildHtml('customer.login');
    echo $this->getChildHtml('customer.forgot');

    }
    ?>
    </div>
    <div class='ptdivline'></div>

    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

    <?php
    $seq_http = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on');

    ?>
    <script type=\"text/javascript\">
    var http_type = '<?php if($seq_http){echo 'https';}else{echo 'http';}?>';
    </script>
    <script type=\"text/javascript\" src=\"<?php echo $this->getSkinUrl('js/onepagecheckout.js') ?>\"></script>

    <script type=\"text/javascript\">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>

    <form action=\"\" id=\"onepagecheckout_orderform\">
    <div class=\"col3-set onepagecheckout_datafields\">
    <div class=\"col-1\">
    <?php echo $this->getChildHtml('billing.address') ?>
    <?php echo $this->getChildHtml('shipping.address') ?>
    </div>

    <div class=\"col-2\">
    <?php echo $this->getChildHtml('shipping.method') ?>
    <?php echo $this->getChildHtml('payment.method') ?>
    <div id=\"checkout-coupon-discount-load\">
    <?php echo $this->getChildHtml('coupon') ?>
    </div>

    <?php if (Mage::getStoreConfig('onepagecheckout/general/comment')) : ?>
    <div class=\"op_block_title\">
    <?php echo $this->helper('sales')->__('Comment') ?>
    </div>
    <div class=\"form_fields\">
    <div class=\"full\">
    <div class=\"data_area\" id='comment-block'>
    <textarea name=\"order-comment\" id=\"order-comment\"><?php echo trim(Mage::getSingleton('customer/session')->getOrderCustomerComment()) ?></textarea>
    </div>
    </div>
    </div>
    <?php endif; ?>
    <!--<input type=\"hidden\" checked=\"checked\" id=\"newsletter-signup\" name=\"newsletter\" value=\"1\" title=\"<?php echo Mage::helper('newsletter')->__('Sign up for our newsletter') ?>\" class=\"checkbox\" />-->

    <?php //if (Mage::helper('onepagecheckout')->isSubscribeNewAllowed()) : ?>
    <p class=\"newsletter\">
    <input type=\"checkbox\" id=\"newsletter-signup\" name=\"newsletter\" title=\"<?php echo Mage::helper('newsletter')->__('Sign up for our newsletter') ?>\" class=\"checkbox\" />
    <label for=\"newsletter-signup\">
    Receba nossas novidades
    </label>
    </p>
    <?php //endif; ?>

    </div>

    <div class=\"col-3\">
    <?php echo $this->getChildHtml('review') ?>
    </div>
    </div>
    </form>

    <script type=\"text/javascript\">
    //<![CDATA[
    var checkout = new OPC('onepagecheckout_orderform', {
    save : '<?php echo $this->getUrl('onepagecheckout/index/saveOrder', array('_secure'=>$seq_http)) ?>',
    update : '<?php echo $this->getUrl('onepagecheckout/index/updateCheckout', array('_secure'=>$seq_http)) ?>',
    success : '<?php echo $this->getUrl('onepagecheckout/index/success', array('_secure'=>$seq_http)) ?>',
    failure : '<?php echo $this->getUrl('checkout/cart') ?>'
    }, \"<?php echo $this->__('Please agree to all the terms and conditions.') ?>\");

    document.observe(\"dom:loaded\", function() {
    var win_triggers = Array();
    $$('.checkout-agreements .agree a').each(function(item){
    var obj = {
    el: $$('.' + item.className),
    event: 'click',
    window: $(item.className + '-window')
    };
    win_triggers.push(obj);
    });
    opc_window = new OPC.Window({triggers: win_triggers});
    });


    var opcDatafields=document.getElementsByClassName('onepagecheckout_datafields')[0];var opcLock=document.createElement('div');opcLock.setStyle({display:'none',position:'relative',width:'100%',top:'0',left:'0',backgroundColor:'#fff',opacity:'0.7'});opcDatafields.appendChild(opcLock);if(checkout){checkout.setLoadWaiting=function(flag){if(flag){opcLock.setStyle({display:'block',height:opcDatafields.offsetHeight+'px'});var container=$('review-buttons-container');container.addClassName('disabled');container.setStyle({opacity:0.5});this._disableEnableAll(container,true)}else if(this.loadWaiting){opcLock.setStyle({display:'none',height:opcDatafields.offsetHeight+'px'});var container=$('review-buttons-container');container.removeClassName('disabled');container.setStyle({opacity:1});this._disableEnableAll(container,false)}this.loadWaiting=flag}};


    //]]>
    </script>





    <script type=\"text/javascript\">
    var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");
    document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));
    </script>
    <script type=\"text/javascript\">
    try{
    var pageTracker = _gat._getTracker(\"<?=Mage::getStoreConfig('onepagecheckout/general/analytics')?>\");
    pageTracker._trackPageview();
    } catch(err) {}

    </script>


    Obs: Desabilite o cache!
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Janatan,

    Não tem a opção "Usar login padrão do magento" na configuração do meu OSC... Deveria ter?
    Desabilitei o cache e substituí o onepagecheckout.phtml mas nada...
  • Jonatan Machado Moderador Global, Administrador
    Sua verçao do OSCBR é a 4?
    Caso nao for baixe desse link
    https://github.com/deivisonarthur/OSC-M ... asil-4-Pro
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Opa Jonatan,

    O meu era o 4.0.2, mas resolvi sobrescrever os arquivos, pois vi que teve uma atualização no dia 28/11. Agora apareceram várias opções no backend que não apareciam antes, inclusive a opção "Exibir login padrao do OSC" que não aparecia antes. Agora a opção de fazer login apareceu! Porém, quando o usuário já tem cadastro e faz o login, fica em vermelho um alerta no campo de frete: "Por favor, digite o código postal corretamente" Sabe o que ocasiona isto?

    Muito obrigado!
  • Jonatan Machado Moderador Global, Administrador
    Nunca ocorreu esse erro aqui porem vários usuários do do modulo ja tiveram.
    Tenta algumas soluções que o próprio deivison fez
    https://groups.google.com/forum/#!topic ... 0-false%5D
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Vixe Jonatan,

    ta cheio de bug... rsrsrs
    Eu tentei fazer um novo cadastro e da uma mensagem de que o CPF ou CNPJ é um campo obrigatório, então fui atrás da solução e achei isso: https://github.com/deivisonarthur/OSC-M ... eivison.js

    Porém não funcionou... Continua dando a mesma mensagem e além disso apareceu os bugs:

    O campo endereço se auto preenche com isso: <?/*========================================================================================================================================================= * * PROJETO OSC MAGENTO BRASIL - VERSÃO FINAL V3.0 * * O módulo One Step Checkout normatizado para a localização brasileira. * site do projeto

    O campo bairro se auto preenche com isto: http

    E o campo cidade se auto preenche com isto: //onestepcheckout.com.br/ * * * * * Mmantenedores do Projeto

    Você conhece alguém que tenha uma solução melhor que esta que encontrei? rsrsrs

    Estou com dúvida também quanto as opções:

    Em Conf Geral:
    Campo CPF/CNPJ pelo TaxVat: Sim ou Não?

    Em Configuracao do OSC(Billing e Shipping):
    CPF/CNPJ pelo Taxvat: Obrigatório ou não exibir campo?
    CPF/CNPJ pelo campo cpfcnpj: Obrigatório ou não exibir campo?

    Obrigado
  • Jonatan Machado Moderador Global, Administrador
    E um modulo bem completo e complexo para ser desenvolvido. Como ele e free vai demora bastante para ter uma verçao 98% funcional vai depender da comunidade ajudar. a maioria das pessoas so reclama do modulo mais nao entendem que o modulo e free e e feito em comunidade e precisam de pessoas com soluções e não reclamação.

    Esse problema do campo obrigatório acontece mais quando utiliza duas verçao desse mesmo modulo instalada uma em cima da outra

    O modulo foi desenvolvido para o magento sem alterações a maioria dos problema e causado porque arquivo foram alterados. Sobre o alto preenchimento tente reinstalar o modulo vou procurar outras soluções.

    O TaxVat eo campo padrado do magento para o CPF esse modulo cria um campo espacial para CPF/CNPJ. ai ele deu essa opção se você quiser utilizar o campo TaxVat que seria o CPF padrão do magento você colocar

    Em Conf Geral:
    Campo CPF/CNPJ pelo TaxVat: Sim

    Em Configuracao do OSC(Billing e Shipping):
    CPF/CNPJ pelo Taxvat: Obrigatório
    CPF/CNPJ pelo campo cpfcnpj: não exibir campo


    Caso queira utilizar cpfcnpj só fazer o contrario. Isso fica mais a seu critério acho que não tem diferença

    Abraço
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Olá Jonatan,

    Aqueles erros de auto preenchimento ocorreram quando eu coloquei um arquivo disponibilizado para corrigir o problema de gravação do CPF/CNPJ.
    Por via das dúvidas hoje deletei todos os arquivos do servidor e subi novamente, porém continuo tendo o problema da mensagem: "O CPF ou CNPJ é um campo obrigatório." Configurei no backend conforme você me instruiu...

    Estou pesquisando bastante na internet sobre a resolução deste problema, mas todos que relataram ele não chegam a uma conclusão final... Onde eu mais cheguei perto de encontrar a solução foi aqui: https://github.com/deivisonarthur/OSC-M ... eivison.js mas nem assim resolveu e acabou gerando aquele problema de auto preenchimento...

    Você já se deparou com este problema da não gravação do CPF/CNPJ também?

    Abraços
  • Jonatan Machado Moderador Global, Administrador
    Consegui simular o erro aqui em uma loja que ja modifiquei bastante talvel esse problema que eu tive seja parecido com o seu
    De alguma forma a configuração esta ao contrario eu acho smile_drunk nao sei diser bem ao certo o esta ocorrendo mais eu coloquei essa configuraçao

    Em Conf Geral:
    Campo CPF/CNPJ pelo TaxVat: Sim

    Em Configuracao do OSC(Billing e Shipping):
    CPF/CNPJ pelo Taxvat: Opcional
    CPF/CNPJ pelo campo cpfcnpj: Obrigatorio

    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Jonatan,

    Alterei a configuração na config do OSC mas permanece a mensagem "O CPF ou CNPJ é um campo obrigatório."...
    Nesta loja você não substituiu nenhum arquivo para solucionar isso?

    Abraços
  • Jonatan Machado Moderador Global, Administrador
    Deixa o OSCBR ativado
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Deixei ativado
  • Jonatan Machado Moderador Global, Administrador
    Ta bem bugado no seu projeto não consegui fazer a compra direto erro 503

    Service Unavailable

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

    So instalou o OSCBR e nao fez nem uma alteração nele?
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Jonatan,

    Deve ser alguma instabilidade em meu servidor...
    Não estava dando este erro... estava fazendo uns testes aqui em outras coisas do site e tb tive o mesmo problema... Agora parece estar normal...

    Rafael
  • Jonatan Machado Moderador Global, Administrador
    Posta o conteúdo do billing.phtml
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com

  • &lt;?php
    /*=========================================================================================================================================================
    *
    * PROJETO OSC MAGENTO BRASIL - VERSÃO FINAL V3.0
    * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    * O módulo One Step Checkout normatizado para a localização brasileira.
    * site do projeto: http://onestepcheckout.com.br/
    * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    *
    *
    *
    * Mmantenedores do Projeto:
    * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    *
    * Deivison Arthur Lemos Serpa
    * deivison.arthur@gmail.com
    * www.deivison.com.br
    * (21)9203-8986
    *
    * Denis Colli Spalenza
    * http://www.xpdev.com.br
    *
    * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    *
    *
    *
    * GOSTOU DO MÓDULO?
    * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    * Se você gostou, se foi útil para você, se fez você economizar aquela grana pois estava prestes a pagar caro por aquele módulo pago, pois não achava uma
    * solução gratuita que te atendesse e queira prestigiar o trabalho feito efetuando uma doação de qualquer valor, não vou negar e vou ficar grato! você
    * pode fazer isso visitando a página do projeto em: http://onestepcheckout.com.br/
    * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    *
    /*=========================================================================================================================================================
    */

    $logged = $this-&gt;isCustomerLoggedIn();
    $has_addr = $this-&gt;customerHasAddresses();

    ?&gt;
    &lt;?php $this-&gt;setShowAddressFields(true);?&gt;

    &lt;div class=\"onepagecheckout_block\"&gt;
    &lt;div class=\"op_block_title\"&gt;
    &lt;?php echo $this-&gt;__('Name & Address'); ?&gt;
    &lt;/div&gt;
    &lt;div class=\"form_fields\"&gt;
    &lt;?php if ($has_addr){ ?&gt;
    &lt;div class=\"full\"&gt;
    &lt;label for=\"billing_cutomer_address\"&gt;
    &lt;?php echo $this-&gt;__('Select a billing address from your address book or enter a new address.') ?&gt;
    &lt;/label&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;?php echo $this-&gt;getCustomerBillAddr() ?&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php } ?&gt;
    &lt;div id=\"bill_form\"&lt;?php if ($has_addr) {echo ' style=\"display:none;\" ';} ?&gt;&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;address_id&#93;\" id=\"billing:address_id\" value=\"&lt;?php echo $this-&gt;getBillAddress()-&gt;getId() ?&gt;\" /&gt;


    &lt;!-- Start Logged ###########################################################################################--&gt;
    &lt;!-- START CAMPOS DO CADASTRO ###########################################################################################--&gt;



    &lt;!--
    NOME, SOBRENOME E EMAIL -----------------------------------------
    --&gt;
    &lt;?php if (!$logged) : ?&gt;
    &lt;div class=\"two_fields\"&gt;
    &lt;?php echo $this-&gt;getLayout()-&gt;createBlock('onepagecheckout/widget_name')-&gt;setObject($this-&gt;getCustomer())-&gt;setFieldIdFormat('billing:%s')-&gt;setFieldNameFormat('billing&#91;%s&#93;')-&gt;toHtml() ?&gt;
    &lt;/div&gt;
    &lt;div class='clr'&gt;&lt;/div&gt;
    &lt;div class=\"full\"&gt;
    &lt;label for=\"billing:email\" class=\"required\"&gt;
    &lt;?php echo $this-&gt;__('Email Address') ?&gt;
    &lt;/label&gt;
    &lt;sup&gt;*&lt;/sup&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" name=\"billing&#91;email&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getEmail()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Email Address') ?&gt;\" class=\"t1 validate-email required-entry\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;



    &lt;!--
    BLOCO TIPO PESSOA -----------------------------------------
    --&gt;
    &lt;div style=\"clear: both; height: 0px;\" &gt;&lt;/div&gt;
    &lt;?php
    $tipopessoa = Mage::getStoreConfig('onepagecheckout/billing/tipopessoa');
    if ($tipopessoa !== 'hidden') :
    ?&gt;

    &lt;?php
    $attribute = Mage::getModel('eav/config')-&gt;getAttribute('customer','tipopessoa');
    ?&gt;
    &lt;ul style=\"list-style: none\"&gt;

    &lt;li style=\"float: left\" class=\"editando\"&gt;
    &lt;label style=\"padding-left: 0px\" for=\"persona_pf\" &lt;?php if ( $tipopessoa === 'required' ){ echo 'class=\"required\"'; }?&gt;&gt;Pessoa F&iacute;sica&lt;input type=\"radio\" style=\"margin-left: 5px\" name=\"billing&#91;tipopessoa&#93;\" id=\"persona_pf\" value=\"Fisica\" checked=\"\" title=\"Pessoa Fisica\" &lt;?php if ( $tipopessoa === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;&lt;/label&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;label style=\"padding-left: 15px\" for=\"persona_pj\" &lt;?php if ( $tipopessoa === 'required' ){ echo 'class=\"required\"'; }?&gt;&gt;Pessoa Jur&iacute;dica&lt;input type=\"radio\" style=\"margin-left: 5px\" name=\"billing&#91;tipopessoa&#93;\" id=\"persona_pj\" value=\"Juridica\" title=\"Pessoa Juridica\" &lt;?php if ( $tipopessoa === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;&lt;/label&gt;
    &lt;/li&gt;


    &lt;script type=\"text/javascript\"&gt;
    //&lt;!&#91;CDATA&#91;
    &lt;?php
    $tipoPessoa = $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getTipopessoa());
    if (!$tipoPessoa) $tipoPessoa = 'Fisica'; //ccd: conserta default errado no IE
    ?&gt;
    $j('input&#91;value*=\"&lt;?php echo $tipoPessoa;?&gt;\"&#93;').attr('checked', true);
    //&#93;&#93;&gt;
    &lt;/script&gt;

    &lt;/ul&gt;
    &lt;?php endif; ?&gt;
    &lt;br style=\"clear: both\" /&gt;



    &lt;!--
    BLOCO IDENTIDADE E CPF -----------------------------------------
    --&gt;
    &lt;div class=\"two_fields boxpf\"&gt; &lt;!-- START --&gt;
    &lt;!--
    BLOCO IDENTIDADE -----------------------------------------
    --&gt;
    &lt;?php
    $identidade = Mage::getStoreConfig('onepagecheckout/outrasopcoes/rgiregistro');
    if ($identidade !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label &lt;?php if ( $identidade === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;
    &lt;?php echo $this-&gt;__('Identidade') ?&gt;
    &lt;?php
    if($identidade === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;/label&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" name=\"billing&#91;rg&#93;\" id=\"rg\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getRg()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Identidade'); ?&gt;\" class=\"input-text t1 validate-number &lt;?php if($identidade === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    BLOCO CPF -----------------------------------------
    --&gt;
    &lt;?php
    $cpfcnpj = Mage::getStoreConfig('onepagecheckout/outrasopcoes/taxvat');
    if ($cpfcnpj) : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label &lt;?php if ( $cpfcnpj === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;
    &lt;?php echo $this-&gt;__('CPF') ?&gt;
    &lt;?php echo ' &lt;sup&gt;*&lt;/sup&gt; '; ?&gt;
    &lt;/label&gt;
    &lt;div class=\"input-box\"&gt;
    &lt;input type=\"text\" id=\"cpfcnpj\" name=\"cpfcnpj\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getCpfcnpj()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('CPF'); ?&gt;\" class=\"input-text t1 Binputcpf validar_cpf &lt;?php if($cpfcnpj === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php else: ?&gt;
    &lt;?php $_taxvat = $this-&gt;getLayout()-&gt;createBlock('customer/widget_taxvat') ?&gt;
    &lt;?php if ($_taxvat-&gt;isEnabled()): ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;?php echo $_taxvat-&gt;setTaxvat($this-&gt;getCustomer()-&gt;getTaxvat())-&gt;toHtml() ?&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;?php endif; ?&gt;
    &lt;/div&gt; &lt;!-- END --&gt;





    &lt;!--
    BLOCO DT NASCIMENTO E SEXO -----------------------------------------
    --&gt;
    &lt;div class=\"two_fields boxpf\"&gt; &lt;!-- START --&gt;
    &lt;!--
    BLOCO DT NASCIMENTO -----------------------------------------
    --&gt;
    &lt;?php $dob = $this-&gt;getLayout()-&gt;createBlock('onepagecheckout/widget_dob'); ?&gt;
    &lt;?php if ($dob-&gt;isEnabled()): ?&gt;
    &lt;?php $_dob = $this-&gt;getLayout()-&gt;createBlock('customer/widget_dob') ?&gt;
    &lt;?php if ($_dob-&gt;isEnabled()): ?&gt;
    &lt;div class=\"short\" style=\"margin-bottom: 0px !important\"&gt;
    &lt;?php echo $dob-&gt;setDate($this-&gt;getQuote()-&gt;getCustomerDob())-&gt;setFieldIdFormat('billing:%s')-&gt;setFieldNameFormat('billing&#91;%s&#93;')-&gt;toHtml(); ?&gt;
    &lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;?php endif ?&gt;
    &lt;!--
    BLOCO SEXO -----------------------------------------
    --&gt;
    &lt;?php $gender = $this-&gt;getLayout()-&gt;createBlock('onepagecheckout/widget_gender'); ?&gt;
    &lt;?php if ($gender-&gt;isEnabled()): ?&gt;
    &lt;?php $_gender = $this-&gt;getLayout()-&gt;createBlock('customer/widget_gender') ?&gt;
    &lt;?php if ($_gender-&gt;isEnabled()): ?&gt;
    &lt;div class=\"short\" style=\"margin-bottom: 0px !important\"&gt;
    &lt;?php echo $gender-&gt;setGender($this-&gt;getQuote()-&gt;getCustomerGender())-&gt;setFieldIdFormat('billing:%s')-&gt;setFieldNameFormat('billing&#91;%s&#93;')-&gt;toHtml(); ?&gt;
    &lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;?php endif ?&gt;
    &lt;/div&gt; &lt;!-- END --&gt;




    &lt;!--
    BLOCO CNPJ E IE -----------------------------------------
    --&gt;
    &lt;div class=\"two_fields boxpj\" style=\"display: none\"&gt; &lt;!-- START --&gt;
    &lt;!--
    IF BLOCO CNPJ -----------------------------------------
    --&gt;
    &lt;?php
    $cpfcnpj = Mage::getStoreConfig('onepagecheckout/outrasopcoes/taxvat');
    if ($cpfcnpj) : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label class=\"required\"&gt;
    &lt;?php echo $this-&gt;__('CNPJ') ?&gt;
    &lt;?php echo ' &lt;sup&gt;*&lt;/sup&gt; '; ?&gt;
    &lt;/label&gt;
    &lt;div class=\"input-box\"&gt;
    &lt;input type=\"text\" style=\"width: 109px !important\" id=\"cpfcnpj\" name=\"cpfcnpj\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getCpfcnpj()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('CNPJ'); ?&gt;\" class=\"input-text t1 Binputcnpj validar_cpf2 &lt;?php if($cpfcnpj === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php else: ?&gt;
    &lt;?php $_taxvat = $this-&gt;getLayout()-&gt;createBlock('customer/widget_taxvat') ?&gt;
    &lt;?php if ($_taxvat-&gt;isEnabled()): ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;?php echo $_taxvat-&gt;setTaxvat($this-&gt;getCustomer()-&gt;getTaxvat())-&gt;toHtml() ?&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;?php endif; ?&gt;

    &lt;!--
    IF BLOCO IE -----------------------------------------
    --&gt;
    &lt;?php
    $ie = Mage::getStoreConfig('onepagecheckout/outrasopcoes/ieregistro');
    if ($ie !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label &lt;?php if ( $ie === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;
    &lt;?php echo $this-&gt;__('IE') ?&gt;
    &lt;?php
    if($ie === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;/label&gt;
    &lt;div class=\"input-box\"&gt;
    &lt;input type=\"text\" style=\"width: 115px !important\" for=\"isento\" name=\"billing&#91;ie&#93;\" id=\"ie\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getIe()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('IE (Inscri&ccedil;&atilde;o Estadual)'); ?&gt;\" class=\"input-text t1 validate-alphanum &lt;?php if($ie === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;div class=\"control\"&gt;
    &lt;div class=\"input-box\"&gt;
    &lt;label for=\"isento\"&gt;&lt;input type=\"checkbox\" name=\"isento\" title=\"Isento?\" value=\"1\" id=\"isento\" class=\"checkbox\"&gt;Isento?&lt;/label&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;/div&gt; &lt;!-- END --&gt;




    &lt;!--
    BLOCO RAZÃO SOCIAL E NOME FANTASIA -----------------------------------------
    --&gt;
    &lt;div class=\"two_fields boxpj\" style=\"display: none\"&gt; &lt;!-- START --&gt;
    &lt;!--
    IF BLOCO EMPRESA -----------------------------------------
    --&gt;
    &lt;?php
    $company = Mage::getStoreConfig('onepagecheckout/outrasopcoes/empresaregistro');
    if ($company !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label &lt;?php if ( $company === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;

    &lt;?php echo $this-&gt;__('Raz&atilde;o Social') ?&gt;
    &lt;?php
    if($company === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;/label&gt;
    &lt;div class=\"input-box\"&gt;
    &lt;input type=\"text\" style=\"width: 109px !important\" name=\"billing&#91;empresa&#93;\" id=\"empresa\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getEmpresa()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Raz&atilde;o Social'); ?&gt;\" class=\"input-text t1 &lt;?php if($company === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    IF BLOCO NOME FANTASIA -----------------------------------------
    --&gt;
    &lt;?php
    $company2 = Mage::getStoreConfig('onepagecheckout/outrasopcoes/nomefantasiaregistro');
    if ($company2 !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label &lt;?php if ( $company2 === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;
    &lt;?php echo $this-&gt;__('Nome Fantasia') ?&gt;
    &lt;?php
    if($company2 === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;/label&gt;
    &lt;div class=\"input-box\"&gt;
    &lt;input type=\"text\" style=\"width: 115px !important\" name=\"billing&#91;nomefantasia&#93;\" id=\"nomefantasia\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getNomefantasia()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Nome Fantasia'); ?&gt;\" class=\"input-text t1 &lt;?php if($company2 === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;/div&gt; &lt;!-- END --&gt;




    &lt;div class=\"clr\"&gt;&lt;/div&gt;
    &lt;?php else: ?&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;address_id&#93;\" value=\"&lt;?php echo $this-&gt;getBillAddress()-&gt;getId() ?&gt;\" /&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;firstname&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getFirstname()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;lastname&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getLastname()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;tipopessoa&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getTipopessoa()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;rg&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getRg()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;cpfcnpj&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getCpfcnpj()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;taxvat&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getTaxvat()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;ie&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getIe()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;empresa&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getEmpresa()) ?&gt;\"/&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;nomefantasia&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getCustomer()-&gt;getNomefantasia()) ?&gt;\"/&gt;
    &lt;?php endif; ?&gt;
    &lt;!-- END IF LOGGED ###########################################################################################--&gt;
    &lt;!-- END CAMPOS DO CADASTRO ###########################################################################################--&gt;





    &lt;!--
    BLOCO RAZÃO SOCIAL E NOME FANTASIA -----------------------------------------
    --&gt;
    &lt;?php
    $phone_r= Mage::getStoreConfig('onepagecheckout/address_form/phone');
    $fax_r = Mage::getStoreConfig('onepagecheckout/address_form/fax');
    $celular = Mage::getStoreConfig('onepagecheckout/address_form/celular');
    ?&gt;

    &lt;?php if ($phone_r !== 'hidden' || $fax_r !== 'hidden' ) : ?&gt;
    &lt;div class=\"two_fields\"&gt;
    &lt;!--
    IF BLOCO TELEFOENE -----------------------------------------
    --&gt;
    &lt;?php if ($phone_r !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:telephone\"&lt;?php if($phone_r === 'required') { echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('Telephone') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($phone_r === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" name=\"billing&#91;telephone&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getTelephone()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Telephone') ?&gt;\" class=\"t1 required-entry\" id=\"billing:telephone\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    IF BLOCO FAX -----------------------------------------
    --&gt;
    &lt;?php if ($fax_r !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:fax\"&lt;?php if($fax_r === 'required') {echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('Fax') ?&gt;
    &lt;?php
    if($fax_r === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;/label&gt;

    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" name=\"billing&#91;fax&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getFax()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Fax') ?&gt;\" class=\"t1 required-entry\" id=\"billing:fax\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;!--
    IF BLOCO CELULAR -----------------------------------------
    --&gt;
    &lt;?php if ($celular !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:fax\"&lt;?php if($celular === 'required') {echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('Celular') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($celular === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" id=\"celular\" name=\"billing&#91;celular&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getCelular()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Celular') ?&gt;\" class=\"t1&lt;?php if($celular === 'required') {echo ' class=\" required-entry\" ';}?&gt;\" id=\"billing:fax\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;/div&gt;
    &lt;div class='clr'&gt;&lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;div class=\"clr\"&gt;&lt;/div&gt;




    &lt;!--
    BLOCO DADOS DO ENDEREÇO -----------------------------------------
    --&gt;
    &lt;!--
    IF BLOCO CEP -----------------------------------------
    --&gt;
    &lt;?php
    $tracoAtivo = Mage::getStoreConfig('onepagecheckout/general/tracoativo');
    $zip_r = Mage::getStoreConfig('onepagecheckout/address_form/zip');
    if ($zip_r !== 'hidden') :
    ?&gt;
    &lt;div class=\"full\"&gt;
    &lt;label for=\"billing:postcode\"&lt;?php if($zip_r === 'required'){echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('Zip Code') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($zip_r === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input maxlength=\"8\" type=\"text\" title=\"&lt;?php echo $this-&gt;__('Zip/Postal Code') ?&gt;\" name=\"billing&#91;postcode&#93;\" id=\"billing:postcode\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getPostcode()) ?&gt;\" class=\"t1 validate-zip-international&lt;?php if($zip_r === 'required'){echo ' required-entry ';}?&gt; &lt;?php if($tracoAtivo === '1'){ echo ' tracoAtivo';} ?&gt; \" onblur=\"buscarEndereco('&lt;?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)?&gt;','billing');\"/&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;div class=\"clr\"&gt;&lt;/div&gt;
    &lt;!--
    IF BLOCO ENDEREÇO -----------------------------------------
    --&gt;
    &lt;?php
    $endereco = Mage::getStoreConfig('onepagecheckout/address_form/address');
    if ($endereco !== 'hidden') : ?&gt;
    &lt;div class=\"full\"&gt;
    &lt;label for=\"endereco\" &lt;?php if ( $endereco === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;&lt;?php echo $this-&gt;__('Endere&ccedil;o') ?&gt;&lt;/label&gt;
    &lt;?php
    if($endereco === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" id=\"billing:street1\" name=\"billing&#91;street&#93;&#91;1&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getStreet(1)) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Endere&ccedil;o') ?&gt;\" class=\"input-text t1&lt;?php if($endereco === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    IF BLOCO NUMERO E COMPLEMENTO -----------------------------------------
    --&gt;
    &lt;?php
    $complemento = Mage::getStoreConfig('onepagecheckout/address_form/address3');
    $numero = Mage::getStoreConfig('onepagecheckout/address_form/address2');
    ?&gt;
    &lt;?php if ($numero !== 'hidden' || $complemento !== 'hidden' ) : ?&gt;
    &lt;div class=\"two_fields\"&gt;
    &lt;!--
    IF BLOCO NUMERO -----------------------------------------
    --&gt;
    &lt;?php if ($numero !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:street2\"&lt;?php if($numero === 'required') { echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('N&uacute;mero') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($numero === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" id=\"billing:street2\" name=\"billing&#91;street&#93;&#91;2&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getStreet(2)) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('N&uacute;mero') ?&gt;\" class=\"input-text t1&lt;?php if($numero === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    IF BLOCO COMPLEMENTO -----------------------------------------
    --&gt;
    &lt;?php if ($complemento !== 'hidden') : ?&gt;
    &lt;div class=\"short comp\"&gt;

    &lt;label for=\"billing:street3\"&lt;?php if($complemento === 'required') {echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('Complemento') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($complemento === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" id=\"billing:street3\" name=\"billing&#91;street&#93;&#91;3&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getStreet(3)) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Complemento') ?&gt;\" class=\"input-text t1&lt;?php if($complemento === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;/div&gt;
    &lt;div class='clr'&gt;&lt;/div&gt;
    &lt;?php endif ?&gt;
    &lt;!--
    IF BLOCO BAIRRO -----------------------------------------
    --&gt;
    &lt;?php
    $bairro = Mage::getStoreConfig('onepagecheckout/address_form/address4');
    if ($bairro !== 'hidden') : ?&gt;
    &lt;!-- endereco--&gt;
    &lt;div class=\"full\"&gt;
    &lt;label for=\"bairro\" &lt;?php if ( $bairro === 'required' ){ echo 'class=\"required\"'; }?&gt; &gt;&lt;?php echo $this-&gt;__('Bairro') ?&gt;&lt;/label&gt;
    &lt;?php
    if($bairro === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" id=\"billing:street4\" name=\"billing&#91;street&#93;&#91;4&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getStreet(4)) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('Bairro') ?&gt;\" class=\"input-text t1&lt;?php if($bairro === 'required'){ echo ' required-entry';} ?&gt;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    IF BLOCO CIDADE E ESTADO -----------------------------------------
    --&gt;
    &lt;!--
    IF BLOCO CIDADE -----------------------------------------
    --&gt;
    &lt;?php
    $city_r = Mage::getStoreConfig('onepagecheckout/address_form/city');
    $state_r= Mage::getStoreConfig('onepagecheckout/address_form/state');
    ?&gt;
    &lt;div class=\"two_fields\"&lt;?php if(($city_r === 'hidden' && $state_r === 'hidden')){echo ' style=\"display:none\"';}?&gt; &gt;
    &lt;?php if ($city_r !== 'hidden') : ?&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:city\"&lt;?php if ($city_r === 'required'){ echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('City') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($city_r === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"text\" title=\"&lt;?php echo $this-&gt;__('City') ?&gt;\" name=\"billing&#91;city&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getCity()) ?&gt;\" class=\"t1&lt;?php if ($city_r === 'required'){ echo ' required-entry ';}?&gt;\" id=\"billing:city\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;!--
    IF BLOCO ESTADO -----------------------------------------
    --&gt;
    &lt;div class=\"short\"&lt;?php if($state_r === 'hidden'){ echo ' style=\"display:none\" ';}?&gt;&gt;
    &lt;label for=\"billing:region_id\"&lt;?php if($state_r === 'required'){ echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('State / Province') ?&gt;
    &lt;/label&gt;
    &lt;?php
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;select id=\"billing:region_id\" name=\"billing&#91;region_id&#93;\" title=\"&lt;?php echo $this-&gt;__('State/Province') ?&gt;\" class=\"validate-select required-entry\" style=\"display:none;\"&gt;
    &lt;option value=\"\"&gt;&lt;?php echo $this-&gt;__('Select One') ?&gt;&lt;/option&gt;
    &lt;/select&gt;
    &lt;script type=\"text/javascript\"&gt;
    //&lt;!&#91;CDATA&#91;
    $('billing:region_id').setAttribute('defaultValue', \"&lt;?php echo $this-&gt;getBillAddress()-&gt;getRegionId() ?&gt;\");
    //&#93;&#93;&gt;
    &lt;/script&gt;
    &lt;input type=\"text\" id=\"billing:region\" name=\"billing&#91;region&#93;\" value=\"&lt;?php echo $this-&gt;htmlEscape($this-&gt;getBillAddress()-&gt;getRegion()) ?&gt;\" title=\"&lt;?php echo $this-&gt;__('State/Province') ?&gt;\" class=\"t1 required-entry\" style=\"display:none;\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class='clr'&gt;&lt;/div&gt;
    &lt;!--
    IF BLOCO PAIS -----------------------------------------
    --&gt;
    &lt;?php
    $country_r = Mage::getStoreConfig('onepagecheckout/address_form/country');
    ?&gt;
    &lt;div class=\"full\"&lt;?php if($country_r === 'hidden'){ echo ' style=\"display:none\" ';}?&gt;&gt;
    &lt;label for=\"billing:country_id\"&lt;?php if($country_r === 'required') { echo ' class=\"required\" ';}?&gt;&gt;
    &lt;?php echo $this-&gt;__('Country') ?&gt;
    &lt;/label&gt;
    &lt;?php
    if($country_r === 'required') {
    echo ' &lt;sup&gt;*&lt;/sup&gt; ';
    }else{
    echo ' &lt;sup&gt;&nbsp;&lt;/sup&gt; ';
    }
    ?&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;?php echo $this-&gt;getBillingCountriesSelectBox() ?&gt;
    &lt;/div&gt;
    &lt;/div&gt;






    &lt;?php
    if (!$logged) :
    $agc = Mage::helper('onepagecheckout')-&gt;isGuestCheckoutAllowed();
    $habilitarcad = Mage::getStoreConfig('onepagecheckout/general/habilitarcad');
    if ($agc) //$agc habilitarcad||
    {
    ?&gt;
    &lt;ul&gt;
    &lt;li class=\"options\"&gt;
    &lt;input type=\"checkbox\" name=\"billing&#91;register_account&#93;\" value=\"1\" title=\"&lt;?php echo $this-&gt;__('Create an account for later use') ?&gt;\" id=\"billing:register_account\" onclick=\"if(window.billing) billing.setCreateAccount(this.checked);\"&lt;?php if ($this-&gt;getBillAddress()-&gt;getRegisterAccount()):?&gt; checked=\"checked\"&lt;?php endif;?&gt; class=\"checkbox\" /&gt;
    &lt;label for=\"billing:register_account\"&gt;
    &lt;?php echo $this-&gt;__('Create an account for later use') ?&gt;
    &lt;/label&gt;
    &lt;/li&gt;
    &lt;/ul&gt;
    &lt;?php
    }
    else
    {
    ?&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;register_account&#93;\" value=\"1\"/&gt;
    &lt;?php
    }
    ?&gt;
    &lt;div class=\"two_fields\" id=\"register-customer-password\" &lt;?php if ($agc) { echo ' style=\"display: none;\" '; } ?&gt;&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:customer_password\" class=\"required\"&gt;
    &lt;?php echo $this-&gt;__('Password') ?&gt;
    &lt;/label&gt;
    &lt;sup&gt;*&lt;/sup&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"password\" name=\"billing&#91;customer_password&#93;\" id=\"billing:customer_password\" title=\"&lt;?php echo $this-&gt;__('Password') ?&gt;\" class=\"t1 required-entry validate-password\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=\"short\"&gt;
    &lt;label for=\"billing:confirm_password\" class=\"required\"&gt;
    &lt;?php echo $this-&gt;__('Confirm Password') ?&gt;
    &lt;/label&gt;
    &lt;sup&gt;*&lt;/sup&gt;
    &lt;div class=\"data_area\"&gt;
    &lt;input type=\"password\" name=\"billing&#91;confirm_password&#93;\" title=\"&lt;?php echo $this-&gt;__('Confirm Password') ?&gt;\" id=\"billing:confirm_password\" class=\"t1 required-entry validate-cpassword\" /&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class='clr'&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class='clr'&gt;&lt;/div&gt;
    &lt;?php
    endif;
    ?&gt;
    &lt;ul&gt;
    &lt;?php
    if ($logged && $has_addr){
    ?&gt;
    &lt;li class=\"options\"&gt;
    &lt;input type=\"checkbox\" class=\"checkbox\" name=\"billing&#91;save_in_address_book&#93;\" id=\"billing:save_in_address_book\" value=\"1\" title=\"&lt;?php echo $this-&gt;__('Save in address book') ?&gt;\" &lt;?php if ($this-&gt;getBillAddress()-&gt;getSaveInAddressBook()){ echo ' checked=\"checked\" ';}?&gt; /&gt;
    &lt;label&gt;
    &lt;?php echo $this-&gt;__('Save in address book'); ?&gt;
    &lt;/label&gt;
    &lt;/li&gt;
    &lt;?php
    }
    else
    {
    ?&gt;
    &lt;li class=\"no-display\"&gt;
    &lt;input type=\"hidden\" value=\"1\" name=\"billing&#91;save_in_address_book&#93;\" /&gt;
    &lt;/li&gt;
    &lt;?php
    }
    ?&gt;
    &lt;/ul&gt;
    &lt;/div&gt;

    &lt;?php
    if (Mage::helper('onepagecheckout')-&gt;isShippingAddressAllowed() && $this-&gt;canShip()){
    ?&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;use_for_shipping&#93;\" id=\"billing:use_for_shipping\" value=\"&lt;?php echo ($this-&gt;isUseBillingAddressForShipping())?'1':'0'; ?&gt;\" /&gt;
    &lt;?php
    }else{
    ?&gt;
    &lt;input type=\"hidden\" name=\"billing&#91;use_for_shipping&#93;\" value=\"1\" /&gt;
    &lt;?php
    }
    ?&gt;
    &lt;/div&gt;
    &lt;/div&gt;




    &lt;script type=\"text/javascript\"&gt;
    //&lt;!&#91;CDATA&#91;
    var billing = new BillingAddress();
    RegionUpdater.prototype.setMarkDisplay = function(){};
    ZipUpdater.prototype._setPostcodeOptional = function(){};
    var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');

    //&#93;&#93;&gt;
    &lt;/script&gt;




    &lt;script type=\"text/javascript\"&gt;
    //&lt;!&#91;CDATA&#91;

    /*One Step Checkout
    Verifica se tem value no cep
    */

    var temcep = $j('input&#91;name*=\"&#91;postcode&#93;\"&#93;').val();
    if(temcep != ''){
    buscarEndereco('&lt;?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)?&gt;','billing');
    }

    //&#93;&#93;&gt;
    &lt;/script&gt;




    &lt;script type=\"text/javascript\"&gt;
    //&lt;!&#91;CDATA&#91;
    // Adicionar validacao de cpf e cnpj ao campo Taxvat
    Validation.add('validar_cpf', 'O CPF informado \xE9 invalido', function(v){return validaCPF(v,0);});
    Validation.add('validar_cpf2', 'O CNPJ informado \xE9 invalido', function(v){return validaCPF(v,0);});
    Validation.add('validar_cpfcnpj', 'O CPF/CNPJ informado \xE9 invalido', function(v){return validaCPF(v,0);});
    //&#93;&#93;&gt;
    &lt;/script&gt;

  • Jonatan Machado Moderador Global, Administrador
    Tente assim primeiro tem uma parte no codigo assim
    if ($cpfcnpj) : ?&gt;

    Altere assim
    if ($cpfcnpj !== 'hidden') : ?&gt;
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Estou tendo muita instabilidade no servidor, já reclamei para eles... rsrsrs
    Amanhã dou continuidade aos teste...

    Por enquanto muuuuito obrigado pela forma que você está dando! Espero podermos achar uma solução para compartilharmos com outras pessoas!

    Abraços!
  • Jonatan,

    Alterei o billing.phtml conforme você me instruiu, porém continua se comportando da mesma forma...
  • Jonatan Machado Moderador Global, Administrador
    Sempre teve esse problema dez que voce instalou? tenta instalar novamente
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Jonatan Machado Moderador Global, Administrador
    Em sistema>Configuração>Clientes>configuração> "NA ABA" Opções ao criar nova conta
    Verifique se a opção
    Exibir CPF/CNPJ no Frontend: Nao
    Arsenal Web Design.com
    Desenvolvimento de Lojas Virtuais
    Magento | Zend Framework | HTML5 | CSS3 | Blogs
    image
    E-mail: contato@brockdev.com
  • Sim Jonatan,

    Sempre teve este problema, inclusive já reinstalei tudo ontem... Já li em outros forums pessoas relatando o mesmo problema, mas sem solução...
Entre ou Registre-se para fazer um comentário.