eManager Posted January 5, 2014 Share Posted January 5, 2014 On the order view the delete (trash icon) and the edit (pencil) icon and functionality is missing. I am logged in as SuperAdmin. This functionality was there yesterday. I need to edit quantities or be able to delete a product from an order. Any ideas? Link to comment Share on other sites More sharing options...
PascalVG Posted January 6, 2014 Share Posted January 6, 2014 Did you change the order status? Some statuses cause the order to be non-editable anymore (like shipped, as the order is sent already). Not fully sure if status 'payment accepted' is 'enough' to make it non-editable already... Should probably hack into the database to put some validation values to 0 :-(( Maybe easier to create a new order for the customer, and cancel this old one? My 2 cents, pascal Link to comment Share on other sites More sharing options...
eManager Posted January 7, 2014 Author Share Posted January 7, 2014 Thanks. This is what we were thinking, but a better Prestashop feature would be to allow order editing to be controllable from an option where statuses are created/edited. Just like choosing if a Delivery PDF should be shown or an email sent to the customer for the status I would like to choose if an order can be edited. We have many orders that are submitted by customers who then need to change a size or color or add an item. Creating a new order should not be necessary. I would prefer to change the order to "On Hold" status or something and then edit it before move it back to a fully paid status. Can someone point me to the file where I can fix this? Link to comment Share on other sites More sharing options...
PascalVG Posted January 7, 2014 Share Posted January 7, 2014 Never tried it, but you can probably play with the statuses and the options that are set when selecting them. For example, when you change the status "Payment Accepted" to not yet validate and not yet set as Paid yet, I expect that you can still edit the order after the client created the order (and maybe even already paid with PayPal or so). When you then add a new status type, like 'order checked' or so where you change the order's status to the old status 'paid' and 'validated', and set this status manually after checking the order, then it might work. Give it a try, and let us know. pascal. Link to comment Share on other sites More sharing options...
eManager Posted January 8, 2014 Author Share Posted January 8, 2014 This is still not working. Nothing we do will allow us to edit items on an order. Prestashop is really coming up short on some very basic functions. Why is this not possible??? I don't understand why such simple features are missing or not working. Link to comment Share on other sites More sharing options...
gkorolkov Posted January 13, 2014 Share Posted January 13, 2014 I had the same issue. After playing around with order statuses Edit Quantity and Delete Product icons on order page disappeared. It turned out that it was a result of enabling delivery slip pdfs for a particular status. Once I disabled delivery slip pdfs for the status icons came back. 1 Link to comment Share on other sites More sharing options...
eManager Posted January 13, 2014 Author Share Posted January 13, 2014 Except that Presta Shop seems to have a feature that prevents an order from being editable once it has gone into a paid order state. Kind of a stupid rule that should really be left up to the eCommerce store. Link to comment Share on other sites More sharing options...
gkorolkov Posted January 13, 2014 Share Posted January 13, 2014 My understanding is that one an order has been paid one should use the partial refund button at the top of the page instead of directly editing the order. Link to comment Share on other sites More sharing options...
eManager Posted January 13, 2014 Author Share Posted January 13, 2014 With this issue Prestashop has not been designed for flexibility. We have many customers that want to change a size or color. Making such a simple update is very difficult with Presta. Link to comment Share on other sites More sharing options...
kingislief Posted February 4, 2014 Share Posted February 4, 2014 In admin click on order, change in URL 'vieworder' in 'deleteorder' and press enter.But why? Deleting orders is not good, better is to put it on 'canceled'. regards Link to comment Share on other sites More sharing options...
janthemanson Posted October 28, 2014 Share Posted October 28, 2014 I've struggled today into a similar problem. Our employee was editing a order, where 2 products should be deleted and two new should be added. Our workflow is to first add the products, then delete the old. The first product was deleted successfully, but the second isn't deleteable. The link exists but nothing happens after confirming the browser message. Any Ideas? Link to comment Share on other sites More sharing options...
shkurkin Posted December 11, 2014 Share Posted December 11, 2014 I just ran into this problem, here was my solution (note: I am working with PS 1.5.6)-- If the order had the "Preparation in Progress" status added in the order history the products would be uneditable. This was because the "Preparation in Progress" status was considered to be related to delivery and the order should be uneditable in the delivery phase. To remove a status from the delivery phase (and allow orders to be editable with the status added) 1. go to the order_state table in the DB 2. change the order_state "delivery" field to 0 for the order state you would like (you can find the name corresponding to the id_order_state in the order_state_lang table) After this change was made the products were editable. 3 Link to comment Share on other sites More sharing options...
cercamon Posted December 18, 2014 Share Posted December 18, 2014 Man, you saved my day. Much appreciated!! Link to comment Share on other sites More sharing options...
gkorolkov Posted December 20, 2014 Share Posted December 20, 2014 shkurkin's solution does indeed work. One needs to uncheck Delivery setting for Preparation in Progress order state in BO->Orders->Order states. It has a drawback though - you will lose ability to print a delivery slip if the order is in Preparation in Progress state. In my case I modified the delivery slip to serve as a picking list and wanted it to be printable before the order is actually shipped. So I slightly changed the view.tpl file in /admin/themes/default/template/controllers/orders/helpers/view. I commented out the following line inside button-command div: {if (($currentState && $currentState->delivery) || $order->delivery_number)} and replaced it with {if (count($invoices_collection))} Now the delivery slip can be printed and the order can be edited in Preparation in Progress state. Note that the above solution is for PS 1.5 and is not upgrade-proof. Link to comment Share on other sites More sharing options...
Zitty Posted October 10, 2015 Share Posted October 10, 2015 You know how to adjust views.tpl for pretashop 1.6.0.14? I have the same problem as gkorolkov. I need to edit the order and still generate a delivery slip. The delivery slip is used to prepare the goods from the warehouse. Regards Link to comment Share on other sites More sharing options...
ernexus Posted May 4, 2016 Share Posted May 4, 2016 (edited) We manged to achieve it on 1.6.1.4. You can edit the order and have delivery slip. Not all files can have overrides, because you must edit the admin template files. After this mod you will be able to edit even delivered orders. 1. Change the admin orders template (attached). File location: admindir/themes/default/template/controllers/orders/helpers/view/view.tpl 1.1 Adding additional table header. {if !$order->hasBeenDelivered()} <th></th> {/if} Change to: <th></th> 1.2 Enabling the add product button. {if !$order->hasBeenDelivered()} <button type="button" id="add_product" class="btn btn-default"> <i class="icon-plus-sign"></i> {l s='Add a product'} </button> {/if} Change to: <button type="button" id="add_product" class="btn btn-default"> <i class="icon-plus-sign"></i> {l s='Add a product'} </button> 1.3 Optional. If too many columns mess your table layout. Remove refund and return columns. {if ($order->hasBeenPaid())}<th class="text-center"><span class="title_box ">{l s='Refunded'}</span></th>{/if} {if ($order->hasBeenDelivered() || $order->hasProductReturned())} <th class="text-center"><span class="title_box ">{l s='Returned'}</span></th> {/if} Change to: {if $order->hasProductReturned()} <th class="text-center"><span class="title_box ">{l s='Returned'}</span></th> {/if} 2. Change the admin orders product line template (attached). File location: admindir/themes/default/template/controllers/orders/_product_line.tpl. 2.1 Enabling the edit button on right. {if ($can_edit && !$order->hasBeenDelivered())} Change to: {if ($can_edit)} 2.2 Optional. If too many columns mess your table layout. Remove refund and return columns. Delete the following lines: {if ($order->hasBeenPaid())} <td class="productQuantity text-center"> {if !empty($product['amount_refund'])} {l s='%s (%s refund)' sprintf=[$product['product_quantity_refunded'], $product['amount_refund']]} {/if} <input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" /> <input type="hidden" value="{(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal']))}" class="partialRefundProductAmount" /> {if count($product['refund_history'])} <span class="tooltip"> <span class="tooltip_label tooltip_button">+</span> <span class="tooltip_content"> <span class="title">{l s='Refund history'}</span> {foreach $product['refund_history'] as $refund} {l s='%1s - %2s' sprintf=[{dateFormat date=$refund.date_add}, {displayPrice price=$refund.amount_tax_incl}]}<br /> {/foreach} </span> </span> {/if} </td> {/if} {if $order->hasBeenDelivered() || $order->hasProductReturned()} <td class="productQuantity text-center"> {$product['product_quantity_return']} {if count($product['return_history'])} <span class="tooltip"> <span class="tooltip_label tooltip_button">+</span> <span class="tooltip_content"> <span class="title">{l s='Return history'}</span> {foreach $product['return_history'] as $return} {l s='%1s - %2s - %3s' sprintf=[{dateFormat date=$return.date_add}, $return.product_quantity, $return.state]}<br /> {/foreach} </span> </span> {/if} </td> {/if} 3. Lastly change the validation controller. Better practice to use override (attached). File location: controllers/admin/AdminOrdersController.php Remove the following lines: // We can't edit a delivered order if ($order->hasBeenDelivered()) { die(Tools::jsonEncode(array( 'result' => false, 'error' => Tools::displayError('You cannot edit a delivered order.') ))); } // We can't edit a delivered order if ($order->hasBeenDelivered()) { die(Tools::jsonEncode(array( 'result' => false, 'error' => Tools::displayError('You cannot edit a delivered order.') ))); } edit_mod_reviver.zip Edited May 4, 2016 by ernexus (see edit history) 4 Link to comment Share on other sites More sharing options...
Christiaan_01 Posted July 11, 2016 Share Posted July 11, 2016 Thanks ernexus, it works great! Link to comment Share on other sites More sharing options...
sylarlocke Posted January 4, 2019 Share Posted January 4, 2019 Great job, just add to work in the states you have to deactivate delivery, if not click on edit does not work. Link to comment Share on other sites More sharing options...
damianwasser Posted June 28, 2019 Share Posted June 28, 2019 shkurkin's solution worked for me. Thanks man! Link to comment Share on other sites More sharing options...
franky.martin Posted April 30, 2020 Share Posted April 30, 2020 Hi, in my case after delete a product in an order the price of the order change well but the product is still there and in the invoice. Any help? I am working in PS 1.7.4.4 Link to comment Share on other sites More sharing options...
kokosmin Posted June 29 Share Posted June 29 Also having this problem, at version 1.7.7.8 Just tested that when stock is negative, -1 in my case, you cannot delete. But if you change it to zero, then you can delete it! 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