Jump to content

Cash on delivery (COD) 0.4 not working


Recommended Posts

Hello, after update to 1.5.6.1 Cash on delivery (COD) 0.4 is not working

The module is installed and enabled, but on chckout page I see "No payment modules have been installed."

Any idea?

 

Is there a new version of COD for presta 1.5.6.1 ?

 

The same problem facing in 1.5.6.1. 

But the payment method is installed - after customer enters every parameters on registration form and presses the payment method - white screen appears and nothing happens then.

Was searching at modules/cashondelivery every file but cannot understand the reason...

Link to comment
Share on other sites

  • 2 weeks later...

It looks like the develpment team is re-working the order payment / confirmation methods, and there is a patchwork of redirects inside the php files that control order validation. But here's a fix that worked for me to get COD up and running:

 

The file [baseurl]/modules/cashondelivery/controllers/front/validation.php is sending out the confirmation string in an order which is unacceptable to the new payment system. You can edit this file in the following manner:

 

1. Find and comment out this code (or I guess you could delete it):

 

/*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);*/

 

2. Now add this code in its place (which I adapted from the cheque module):

 

Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)($cart->id).'&id_module='.(int)$cashondelivery->id.'&id_order='.$cashondelivery->currentOrder.'&key='.$customer->secure_key);

 

You will see that the new code presents the cart ID etc. in a different order, and it works ...

 

 

So if anyone knows how to make all this work on https then this will really be solved. But it may be that we must wait until development of the new process (see the php files) is complete.

Link to comment
Share on other sites

The issue with SSL was fixed by adding :

 

public $ssl=true

 

to the file OrderConfirmationController.php

 

as discussed here:

http://www.prestashop.com/forums/topic/158889-solvedssl-problem-on-order-confirmation-page-after-paypal-redirect/

 

The web console still shows some 302 errors being thrown in the process, but it works and it stays on SSL for the customer data.

Link to comment
Share on other sites

×
×
  • Create New...