RabbitZzZ Posted November 19, 2016 Share Posted November 19, 2016 Hi, I rund PS 1.6.1.9 (recently updated from 1.6.0.14). When I want to add a negative percentage reduction (so to say a percentage fee) to an order from the backoffice, I get the following error thrown: [PrestaShopException] Property CartRule->reduction_percent is not valid at line 909 in file classes/ObjectModel.php 904. } 905. 906. $message = $this->validateField($field, $this->$field); 907. if ($message !== true) { 908. if ($die) { 909. throw new PrestaShopException($message); 910. } 911. return $error_return ? $message : false; 912. } 913. } 914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 487 - classes/ObjectModel.php] ObjectModelCore->add - [line 129 - classes/CartRule.php] - [2 Arguments] CartRuleCore->add - [line 1459 - controllers/admin/AdminOrdersController.php] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] If it's a fixed amount (also negative) it works. Is there a way to fix this in the code? Thanks a lot! Link to comment Share on other sites More sharing options...
RabbitZzZ Posted November 22, 2016 Author Share Posted November 22, 2016 (edited) Now I also get the error message with fixed amounts! Please help, this is really bad! [PrestaShopException] Property Order->total_discounts is not valid at line 909 in file classes/ObjectModel.php 904. } 905. 906. $message = $this->validateField($field, $this->$field); 907. if ($message !== true) { 908. if ($die) { 909. throw new PrestaShopException($message); 910. } 911. return $error_return ? $message : false; 912. } 913. } 914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 304 - classes/order/Order.php] OrderCore->getFields - [line 652 - classes/ObjectModel.php] ObjectModelCore->update - [line 1487 - controllers/admin/AdminOrdersController.php] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] Edited November 22, 2016 by RabbitZzZ (see edit history) Link to comment Share on other sites More sharing options...
fedesib Posted November 23, 2016 Share Posted November 23, 2016 Hi there, sorry to tell you that what you would like to do is not possible with core PS code. You will need a custom module for this (check out in the Addons, there are some). Have a nice day, Federica Link to comment Share on other sites More sharing options...
RabbitZzZ Posted November 24, 2016 Author Share Posted November 24, 2016 Hm, ok, thanks! I thought it worked on previous versions... Can you recommend a module for this? Link to comment Share on other sites More sharing options...
fedesib Posted November 24, 2016 Share Posted November 24, 2016 Hi there, I don't know about previous version, but I'm pretty sure it does not work on PS 1.6. As for a module that does this, I can suggest this one: http://addons.prestashop.com/en/12794-fees-and-reductions-shipping-surcharge.html But I also suggest you to check if there is something that better fits your needs in the Addons. I hope this helps, have a nice day, Federica 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