wallchopz Posted August 13, 2014 Share Posted August 13, 2014 (edited) Hi, I enabled Cash On Delivery as payment for my customers. Let's say a customer places an order with a total amount of $230.28. But he chooses to pay through Cash On Delivery. Basically, he will be paying when the item he ordered will be delivered to him. But I notice on the order details on prestashop's admin interface under the payment table that there is already a payment of $230.28. It automatically puts it in after the customer places the order. (Please see attached photo to better understand what I'm trying to say.) Is there a way to set that to $0 for Cash On Delivery payments? Edited August 14, 2014 by wallchopz (see edit history) Link to comment Share on other sites More sharing options...
wallchopz Posted August 13, 2014 Author Share Posted August 13, 2014 BUMP. Link to comment Share on other sites More sharing options...
wallchopz Posted August 14, 2014 Author Share Posted August 14, 2014 Still no answer. Link to comment Share on other sites More sharing options...
bellini13 Posted August 14, 2014 Share Posted August 14, 2014 this requires a change to the COD module. I assume you are using v0.7.3 from Prestashop? In the module folder you will find \controllers\front\validation.php. Edit this and look for line 59 which should have this content $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); Change it to this... you are replacing $total with 0 $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), 0, $this->module->displayName, null, array(), null, false, $customer->secure_key); Be advised that the order status will be "Payment Error", as Prestashop expects the total to be equal to the order amount. In this case, the total will not equal the order amount, and there will be a problem. 1 Link to comment Share on other sites More sharing options...
wallchopz Posted August 14, 2014 Author Share Posted August 14, 2014 (edited) Hi bellini13, You saved my life. I am eternally grateful. I will mark this post as solved. Thank you! Edited August 14, 2014 by wallchopz (see edit history) Link to comment Share on other sites More sharing options...
[email protected] Posted February 22, 2017 Share Posted February 22, 2017 and how can we solve the payment error , I do not want en email going to the customer with payment error Link to comment Share on other sites More sharing options...
bellini13 Posted February 26, 2017 Share Posted February 26, 2017 and how can we solve the payment error , I do not want en email going to the customer with payment error but the customer did not pay for this item yet, so if you want the payment amount to reflect 0, and not match the order amount, then you should expect a payment error until they do pay. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now