Jump to content

[SOLVED] Remove order confirmation page


Recommended Posts

  Hy all,

 

   I am using prestashop 1.5.6.2 with a custom theme and as payment method Cash On Delivery module.

   I am also using One Page Checkout.

   I would like clients to skip order confirmation page ( .../module/cashondelivery/validation ) and when they click on the one page checkout the confirm button, the checkout process will be finished.

   I guess this way we will have a better conversion rate. 

Edited by Larry Baldwin (see edit history)
Link to comment
Share on other sites

SOLVED

 

I have edited /modules/cashondelivery/views/templates/hook/payment.tpl

 

I removed

	<a href="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" title="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" rel="nofollow">
		<img src="{$this_path_cod}cashondelivery.gif" alt="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" style="float:left;" />
		<br />{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}
		<br />{l s='You pay for the merchandise upon delivery' mod='cashondelivery'}
		<br style="clear:both;" />
	</a>

And i added ( confirm button with image )  after the  </p>

<form action="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" method="post">
	<input type="hidden" name="confirm" value="1" />
	<p class="cart_navigation" id="cart_navigation">
		<input type="image" value="submit" src="http://youtimagelink" style="height:48px; width:500px; margin-left:20%;">
	</p>
</form>
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

 

SOLVED

 

I have edited /modules/cashondelivery/views/templates/hook/payment.tpl

 

I removed

	<a href="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" title="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" rel="nofollow">
		<img src="{$this_path_cod}cashondelivery.gif" alt="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" style="float:left;" />
		<br />{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}
		<br />{l s='You pay for the merchandise upon delivery' mod='cashondelivery'}
		<br style="clear:both;" />
	</a>

And i added ( confirm button with image )  after the  </p>

<form action="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" method="post">
	<input type="hidden" name="confirm" value="1" />
	<p class="cart_navigation" id="cart_navigation">
		<input type="image" value="submit" src="http://youtimagelink" style="height:48px; width:500px; margin-left:20%;">
	</p>
</form>

Do not work for me :(

 

Link to comment
Share on other sites

  • 6 months later...

I have solved this case from other side:

 

from

modules/cashondelivery/controllers/front/validation.php

 

Remove 1 line:

if (Tools::getValue('confirm'))

After that all will work as it should.

 

Any similar tip for bankwire payment solution? :)

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

 

SOLVED

 

I have edited /modules/cashondelivery/views/templates/hook/payment.tpl

 

I removed

	<a href="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" title="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" rel="nofollow">
		<img src="{$this_path_cod}cashondelivery.gif" alt="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" style="float:left;" />
		<br />{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}
		<br />{l s='You pay for the merchandise upon delivery' mod='cashondelivery'}
		<br style="clear:both;" />
	</a>

And i added ( confirm button with image )  after the  </p>

<form action="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" method="post">
	<input type="hidden" name="confirm" value="1" />
	<p class="cart_navigation" id="cart_navigation">
		<input type="image" value="submit" src="http://youtimagelink" style="height:48px; width:500px; margin-left:20%;">
	</p>
</form>

 

Nice solution, it seems to be working fine our my site too. Been looking for this for a while... Thank  you.

Link to comment
Share on other sites

  • 2 weeks later...

Not yet...

for bankwire update this code in yourtheme/modules/bankwire/views/templates/hook/payment.tpl

 

<p class="payment_module">

    <form action="{$link->getModuleLink('bankwire', 'validation', [], true)|escape:'html'}" method="post">

        <input type="hidden" name="confirm" value="1" />

        <button id="confirmOrder" class="button btn btn-default button-medium">

        <span>I confirm my order.</span>

        </button>

</p>

 

check you css file for button class and add class with (class="button btn btn-default button-medium")

enjoy! ;)

Edited by ArsalanAnsari (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

 

SOLVED

 

I have edited /modules/cashondelivery/views/templates/hook/payment.tpl

 

I removed

	<a href="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" title="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" rel="nofollow">
		<img src="{$this_path_cod}cashondelivery.gif" alt="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" style="float:left;" />
		<br />{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}
		<br />{l s='You pay for the merchandise upon delivery' mod='cashondelivery'}
		<br style="clear:both;" />
	</a>

And i added ( confirm button with image )  after the  </p>

<form action="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" method="post">
	<input type="hidden" name="confirm" value="1" />
	<p class="cart_navigation" id="cart_navigation">
		<input type="image" value="submit" src="http://youtimagelink" style="height:48px; width:500px; margin-left:20%;">
	</p>
</form>

 

 

 

One word about this issue again: i tried to replace the image link with a standard large button (for design matters), but I cant convince it to work with the button. What would be the proper code to replace the image input type with button input type? I managed to add the button all right, but it doesnt confirm the order, cart stays full and cant go to "order successful" confirmation page.

 

Not true anymore, I managed to add a working button on a second try, there was a logical error - I`m not much of a coder ya know... But seems to be working now, thanks.

<form action="{$link->getModuleLink('cashondelivery', 'validation', [], true)|escape:'html'}" method="post">
<input type="hidden" name="confirm" value="1" />
<p class="cart_navigation" id="cart_navigation">
<input type="submit" id="final_gomb" name="final_gomb" class="button" value="Trimiteti comanda">
</p>
</form>
Edited by Salus (see edit history)
Link to comment
Share on other sites

Hello,

 

Any information why when "Bank Wire" is used, there is a blanc page, after customer push the Order confirmation button?

 

Further there is no Automatic mail sent to the customer...Any idea here also?

 

All my problems started when last week I updated OGONE/INGENICO module.

 

Please help, since many customers are frustrated to not getting a confirmation page & mail confirmation for their order...Not speaking for those who just left their order since my online shop looks not secure with all this confirmation page & mail errors...

 

Thanks for your quick feedback, since now I'm stuck. Using Prestashop 1.6.0.5. with default theme.

 

rgds,

Boris

Link to comment
Share on other sites

Hello,

 

Any information why when "Bank Wire" is used, there is a blanc page, after customer push the Order confirmation button?

 

Further there is no Automatic mail sent to the customer...Any idea here also?

 

All my problems started when last week I updated OGONE/INGENICO module.

 

Please help, since many customers are frustrated to not getting a confirmation page & mail confirmation for their order...Not speaking for those who just left their order since my online shop looks not secure with all this confirmation page & mail errors...

 

Thanks for your quick feedback, since now I'm stuck. Using Prestashop 1.6.0.5. with default theme.

 

rgds,

Boris

 

Welcome in prestashop :-) 

 

You can enable errors so you can check what is the problem.

Link to comment
Share on other sites

Thanks for the link, will do it.

 

Only one question before I do it...is this valid when the error is also in the Back Office page - like here no automatic confirmation of the order status is done and no email is send to the customer + Status Drop Down menu of the orders is full with several identical OGONE status messages...

 

OR

 

I have only to check for the error message on the online shop page (most probably the Order Confirmation Page)...

 

Thanks

rgds,

Boris

Link to comment
Share on other sites

The solution is very simple:

 

Just change in /web/modules/codfee/views/payment.tpl from:

 

{$link->getModuleLink('codfee', 'payment', [], true)}

TO

{$link->getModuleLink('codfee', 'validation', [], true)}

 

in bankwire /web/modules/bankwire/views/templates/hook/payment.tpl from:

{$link->getModuleLink('bankwire', 'payment')|escape:'html'}

TO

{$link->getModuleLink('bankwire', 'validation')|escape:'html'}

Edited by Gipielle (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

The solution is very simple

 

Hello Gipielle,

i followed your instruction to skip validation page and go directly to confirmation page (I use the same opc module), but nothing happen.

I changed the line of code you posted, but when click on the confirmation button it open the validation page instead of the confirmation page.

Link to comment
Share on other sites

in validation.php

Replace

public function initContent()

on

public function initContent()
{
	$this->display_column_left = false;
	parent::initContent();
	$customer = new Customer((int)$this->context->cart->id_customer);
	$total = $this->context->cart->getOrderTotal(true, Cart::BOTH);
	$this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key);
	Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder);
}

;)

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 2 months later...

Ok, to remove confirmation page on cashondelivery I've used DenisKey's tip ie, I've comented out the following line:

  1. if (Tools::getValue('confirm'))

in modules/cashondelivery/controllers/front/validation.php

 

 

And for bankwire I've used Gipielle's, ie change:

{$link->getModuleLink('bankwire', 'payment', [], true)}
TO
{$link->getModuleLink('bankwire', 'validation', [], true)}

 

but instead of: web/modules/bankwire/views/templates/hook/payment.tpl

 

I've edited in:

 

web/themes/*mycustomtheme*/modules/bankwire/views/templates/hook/payment.tpl

 

I've found that during this editing sometimes this would not work, probably because of cache so try recompile cache and clear browser cache at the same time.

 

 

I'm using PS 1.6.0.9 and OnePageCheckout module.

Thank you all for your contribution, especially DenisKey and Gipielle.

Edited by BlueMe (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

I have solved this case from other side:

 

from

modules/cashondelivery/controllers/front/validation.php

 

Remove 1 line:

if (Tools::getValue('confirm'))

After that all will work as it should.

Thanks you sooooo much DenisKey

It really works in seconds

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...