nick_escu Posted December 4, 2010 Share Posted December 4, 2010 Hi,I need a tip on how to stop prestashop 1.3.2 from automatically sending "preparation" e-mail to customers, when COD is the method of payment (it automatically sends both "order confirmation" and "preparation" mails).The "order confirmation" is enough at first step, and for logistical purposes I want to send the "preparation" mail manually.Any help?Thank you, Link to comment Share on other sites More sharing options...
rocky Posted December 5, 2010 Share Posted December 5, 2010 It is line 16 (in PrestaShop v1.3.2) of modules/cashondelivery/cashondelivery.php that tells PrestaShop to change the state to "Preparation in progress" after the order has been validated: $cashOnDelivery->validateOrder(intval($cart->id), _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName); Change _PS_OS_PREPARATION_ to any of the order state variables defined on line 67 of config/defines.inc.php or go to Orders > Statuses to create your own order state and then change _PS_OS_PREPARATION_ above the new order state ID. Link to comment Share on other sites More sharing options...
safa Posted December 5, 2010 Share Posted December 5, 2010 It is line 16 (in PrestaShop v1.3.2) of modules/cashondelivery/cashondelivery.php that tells PrestaShop to change the state to "Preparation in progress" after the order has been validated: $cashOnDelivery->validateOrder(intval($cart->id), _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName); Change _PS_OS_PREPARATION_ to any of the order state variables defined on line 67 of config/defines.inc.php or go to Orders > Statuses to create your own order state and then change _PS_OS_PREPARATION_ above the new order state ID. yes tried to solve this problem for 2 days "_PS_OS_PREPARATION_ " replace sample "15,16,17..." Link to comment Share on other sites More sharing options...
nick_escu Posted December 5, 2010 Author Share Posted December 5, 2010 Thank you, Rocky, excellent as usual ! Link to comment Share on other sites More sharing options...
babyewok Posted June 28, 2011 Share Posted June 28, 2011 I have version 1.4 - where would I need to change the default order state for the cash on delivery module? Link to comment Share on other sites More sharing options...
rocky Posted June 29, 2011 Share Posted June 29, 2011 It's on line 46 of modules/cashondelivery/validation.php in PrestaShop v1.4.3: $cashOnDelivery->validateOrder((int)$cart->id, _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName, NULL, array(), NULL, false, $customer->secure_key); Link to comment Share on other sites More sharing options...
siberus Posted February 10, 2012 Share Posted February 10, 2012 Hi Sorry that I went back to that, but I have one problem with this. I have made cashondelivery.php file, downloaded and put it as new oder status, but when I changing $cashOnDelivery->validateOrder((int)$cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $cashOnDelivery->displayName, NULL, array(), NULL, false, $customer->secure_key); On $cashOnDelivery->validateOrder((int)$cart->id, Configuration::get('PS_OS_CASHONDELIVERY'), $total, $cashOnDelivery->displayName, NULL, array(), NULL, false, $customer->secure_key); and make order on my website, getting blank site just with working header. And order is not confirmed. Any idea what i have made wrong? I'm not good at this stuff, so I'm sure it is something easy. Link to comment Share on other sites More sharing options...
Akyla Posted July 10, 2012 Share Posted July 10, 2012 I have 20 statuses but the file config.inc.php there´s only 12 how can i set the status number 20 for my module? Link to comment Share on other sites More sharing options...
sdi4x4 Posted April 28, 2014 Share Posted April 28, 2014 I am using prestashop 1.5.4.1, and I think I have to modifiy cod.php but don't know how. Would apreciate your help It's on line 46 of modules/cashondelivery/validation.php in PrestaShop v1.4.3: $cashOnDelivery->validateOrder((int)$cart->id, _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName, NULL, array(), NULL, false, $customer->secure_key); Link to comment Share on other sites More sharing options...
PrestaShark Posted October 16, 2014 Share Posted October 16, 2014 (edited) I am using prestashop 1.5.4.1, and I think I have to modifiy cod.php but don't know how. Would apreciate your help Hi. In PS 1.5/1.6 You need to replace "Configuration::get('PS_OS_PREPARATION')" with "ID of Your new Order Status" that You make in Back Office. So in validation.php file placed on modules/cashondelivery/controllers/front find Configuration::get('PS_OS_PREPARATION') and replace it with Your status ID example $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); to $this->module->validateOrder((int)$this->context->cart->id, 14, $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); Edited October 16, 2014 by PrestaShark (see edit history) 2 Link to comment Share on other sites More sharing options...
Eutanasio Posted July 27, 2022 Share Posted July 27, 2022 On 10/16/2014 at 9:22 AM, PrestaShark said: Hi. In PS 1.5/1.6 You need to replace "Configuration::get('PS_OS_PREPARATION')" with "ID of Your new Order Status" that You make in Back Office. So in validation.php file placed on modules/cashondelivery/controllers/front find Configuration::get('PS_OS_PREPARATION') and replace it with Your status ID example $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); to $this->module->validateOrder((int)$this->context->cart->id, 14, $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); I used to to this but after the last update of COD module to v2.0.1 it seems that's not working anymore, it gives me "Fatal error". This is how the code looks like in the module now: $this->module->validateOrder( (int) $this->context->cart->id, (int) Configuration::getGlobalValue(Ps_Cashondelivery::CONFIG_OS_CASH_ON_DELIVERY), (float) $this->context->cart->getOrderTotal(true, Cart::BOTH), $this->module->displayName, null, [], (int) $this->context->currency->id, false, $customer->secure_key ); Thanks! 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