Jump to content

[SOLVED] Guest Login and One-Page ChekOut payment redirection


Recommended Posts

Hi all,

 

I'm trying to properly configure PS to work with a brazilian payment module named PagSeguro.

First of all, there is no need to provide address because items will be downloadable and not delivered.

This allow me to have Guest Login with only a few fields to be filled (I hide the others unused).

 

The point is that PagSeguro was not built to work with GUEST LOGIN and One-Page CheckOut, because when you select it as payment option, it redirects the customer to [authentication.php?back=order.php] and this page demands a new form filling (and more complete).

 

Can somebody please tell me:

Using Guest Login and OPC, to which page should I redirect my module after clicking on it?

What is the "PLEASE CLICK CONFIRM BUTTON TO SEND YOUR ORDER" file on OPC?

 

;)

 

Thank you in advance.

 

========== EDIT ===========

SOLVED.

I changed the following code in payment.php (inside PAGSEGURO folder):

 

if (!$cookie->isLogged()) {

Tools::redirect('../modules/pagseguro/validation.php');

 

 

And also changed the order-opc.tpl on line 37:

 

var authenticationUrl = '{$link->getPageLink("authentication.php", true)}';

 

to:

 

var authenticationUrl = '{$link->getPageLink("payment.php", true)}';

 

 

Now it confirms the order and redirects to the desired PagSeguro's page!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Oi Joao, obrigado por seu aporte,eu tambem estou tentando solucionar esse problema, e estou seguindo suas instruções, mas nao funciona.

O arquivo order-opc.tpl que foi modificado onde posso encontrar?na pasta do tema atual instalado?

Pode adicionar a linha toda dos codigos para comparar?

 

Muito obrigado mesmo

Link to comment
Share on other sites

Para encerrar meu comentario anterior caso algum usuario tiver o mesmo problema. Ao utilizar o modulo pagseguro em prestashop e tentar fazer uma compra rapida ou compra como convidado, o modulo reenvia o cliente para a pagina de registro, isso não é legal, o que fiz foi modificar o modulo de pagseguro baseado na otima informação de joao marcello, so q com uma pequena mudança.

 

ele pidiu para modificar o arquivo order-opc.tpl mas ao fazer isso estaba gerando um erro diferente na loja....no meu caso eu não modifiquei esse arquivo e funcionou bem. so modifiquei o arquivo payment.php e pronto, ficou otimo!!

 

Valeu Joao!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...