hurtownialalill Posted May 15, 2014 Share Posted May 15, 2014 Hi, I need to allow user to change order status from sent to delivered.I searched about module but found nothing.How can I do this? Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted May 15, 2014 Share Posted May 15, 2014 In which place the customer has to change the order status.. Link to comment Share on other sites More sharing options...
hurtownialalill Posted May 15, 2014 Author Share Posted May 15, 2014 (edited) Button in input @ order detail would be great or I have better idea, link with input can be send with /sent/ message would be AWESOME Edited May 15, 2014 by hurtownialalill (see edit history) Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted May 16, 2014 Share Posted May 16, 2014 you can have a link button in customer order details, you need to add the button in order-detail.tpl file in theme directory and on the order-detail controller you need to add the code so that the customer clicks the button the stautus of the particular order can be changed to delivered. Link to comment Share on other sites More sharing options...
hurtownialalill Posted May 16, 2014 Author Share Posted May 16, 2014 But where in presta I can find that code to use?Maybe somewhere in cashondelivery or bankwire files? Link to comment Share on other sites More sharing options...
bellini13 Posted May 16, 2014 Share Posted May 16, 2014 Well, the most common sense place would be to look at the AdminOrdersController.php, since that is what handles the order status change in the back office. There is a function called postProcess, which handles a submit type called 'submitState'. This is the code that deals with updating the order status. You would need to 2 do things 1) You need to include your front office code that would allow the customer to say "delivered". You could update the theme file directly, or you create a module that hooks "order detail displayed". The module would be better so that you don't have to maintain the theme changes whenever you upgrade PS or change to a new theme. 2) Then you need to include coding to handle when the customer clicks that button. If you build a module, then you would handle the status change in the module. If you don't build a module, then you need to figure out the best place to put this code. Perhaps an override of the OrderDetailController.php Just keep in mind that you should protect your code so that only a logged in customer associated to this order can change the status. Link to comment Share on other sites More sharing options...
Mickeel Posted November 19, 2014 Share Posted November 19, 2014 (edited) Any update on this? sharing some code would have a lot EDIT: I got this tutorial btw http://nemops.com/order-received-button-prestashop/#.VGw_e5OUfWo Edited November 19, 2014 by Mickeel (see edit history) 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