Universer Posted April 1, 2016 Share Posted April 1, 2016 Hello. I understand that from security reasons I am not allowed to delete a order status. But I want to hide iti from being set as a status by a employer which has access to the orders sections. I want to not have to choose from something that's not used. Any ideas ? Using prestashop 1.6.1.3 Regards. Link to comment Share on other sites More sharing options...
NemoPS Posted April 1, 2016 Share Posted April 1, 2016 Do you want to add specific ones?Once you know the id, you can hide them here {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/foreach}Just don't return the option if the id equals the one you want to hideThe file is admin folder \themes\default\template\controllers\orders\helpers\view view.tpl 1 Link to comment Share on other sites More sharing options...
rempaddesign Posted November 25, 2016 Share Posted November 25, 2016 Hi, can you please be a little more specific? Let's say for example we would like to hide the Status with the Id 10. How should the code look for this? Thank you in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted November 26, 2016 Share Posted November 26, 2016 {if $state['id_order_state'] == 10} {continue} {else} ... code...{/if} 1 Link to comment Share on other sites More sharing options...
rempaddesign Posted November 28, 2016 Share Posted November 28, 2016 (edited) {if $state['id_order_state'] == 10} {continue} {else} ... code... {/if} Thanks for your answer. I will post here the explicit and full code for other people that will need to hide the Order status from the select option list in edit Order page. Step 1. Go to Orders --> Statuses (in the left side menu of the administraton pannel) to find out the ID of the statuses you wish to hide Step 2. Go to Admin Folder/themes/default/template/controllers/orders/helpers/view view.tpl Step 3. Add the following code instead of the existing one: CHANGE THIS: {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/foreach} TO THIS: {foreach from=$states item=state} {if $state['id_order_state'] == 11 || $state['id_order_state'] == 1 || $state['id_order_state'] == 10 || $state['id_order_state'] == 14 || $state['id_order_state'] == 12 || $state['id_order_state'] == 13 || $state['id_order_state'] == 8} <!--for multiple values--> {else} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/if} {/foreach} Note: The values entered there are for my own use. You will change those values with yours. If you only need to hide one Status, let the if clause like this: {if $state['id_order_state'] == 11} I'm using this with succes in Prestashop 1.6.1.0 with no reported issues. Thanks again for the answer that helped me solve this issue NemoPS Hope this detailed answer is not a problem, but I think the newbies will use this with more ease. Thanks. Edited November 28, 2016 by rempaddesign (see edit history) 3 Link to comment Share on other sites More sharing options...
lordshop Posted January 19, 2017 Share Posted January 19, 2017 I am working on prestashop 1.6.11. I went to table "ps_order_state" and I have update the "deleted" from 0 to 1 for the ID status I don't want to show up on Order update. 1 Link to comment Share on other sites More sharing options...
Grindelf Posted February 21, 2018 Share Posted February 21, 2018 (edited) On 1/19/2017 at 8:56 PM, lordshop said: I am working on prestashop 1.6.11. I went to table "ps_order_state" and I have update the "deleted" from 0 to 1 for the ID status I don't want to show up on Order update. For me just work when delete all line of the status, via sql. Thank you Edited February 21, 2018 by Grindelf (see edit history) Link to comment Share on other sites More sharing options...
Yves Posted February 14, 2019 Share Posted February 14, 2019 Op 28/11/2016 om 1:10 PM, rempaddesign zei: Thanks for your answer. I will post here the explicit and full code for other people that will need to hide the Order status from the select option list in edit Order page. Step 1. Go to Orders --> Statuses (in the left side menu of the administraton pannel) to find out the ID of the statuses you wish to hide Step 2. Go to Admin Folder/themes/default/template/controllers/orders/helpers/view view.tpl Step 3. Add the following code instead of the existing one: CHANGE THIS: {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/foreach} TO THIS: {foreach from=$states item=state} {if $state['id_order_state'] == 11 || $state['id_order_state'] == 1 || $state['id_order_state'] == 10 || $state['id_order_state'] == 14 || $state['id_order_state'] == 12 || $state['id_order_state'] == 13 || $state['id_order_state'] == 8} <!--for multiple values--> {else} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/if} {/foreach} Note: The values entered there are for my own use. You will change those values with yours. If you only need to hide one Status, let the if clause like this: {if $state['id_order_state'] == 11} I'm using this with succes in Prestashop 1.6.1.0 with no reported issues. Thanks again for the answer that helped me solve this issue NemoPS Hope this detailed answer is not a problem, but I think the newbies will use this with more ease. Thanks. It works also in 1.7.5 🙂 And where do I have to make those changes to hide the order status from order dropdown in the general orders page and for bulk actions on the same page? Link to comment Share on other sites More sharing options...
rempaddesign Posted February 15, 2019 Share Posted February 15, 2019 18 hours ago, Yves said: It works also in 1.7.5 🙂 And where do I have to make those changes to hide the order status from order dropdown in the general orders page and for bulk actions on the same page? Hi. Sorry for the late answer. You can find infos about Activate or Deactivate the order status and changes to those here: https://zemez.io/prestashop/support/how-to/prestashop-1-7-manage-order-statuses/ Hope it helps. Cheers. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted August 31, 2021 Share Posted August 31, 2021 Did anyone managed to hide statuses on PS1.7? Link to comment Share on other sites More sharing options...
Eutanasio Posted October 1, 2021 Share Posted October 1, 2021 (edited) On 11/28/2016 at 12:10 PM, rempaddesign said: Thanks for your answer. I will post here the explicit and full code for other people that will need to hide the Order status from the select option list in edit Order page. Step 1. Go to Orders --> Statuses (in the left side menu of the administraton pannel) to find out the ID of the statuses you wish to hide Step 2. Go to Admin Folder/themes/default/template/controllers/orders/helpers/view view.tpl Step 3. Add the following code instead of the existing one: CHANGE THIS: {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/foreach} TO THIS: {foreach from=$states item=state} {if $state['id_order_state'] == 11 || $state['id_order_state'] == 1 || $state['id_order_state'] == 10 || $state['id_order_state'] == 14 || $state['id_order_state'] == 12 || $state['id_order_state'] == 13 || $state['id_order_state'] == 8} <!--for multiple values--> {else} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/if} {/foreach} Note: The values entered there are for my own use. You will change those values with yours. If you only need to hide one Status, let the if clause like this: {if $state['id_order_state'] == 11} I'm using this with succes in Prestashop 1.6.1.0 with no reported issues. Thanks again for the answer that helped me solve this issue NemoPS Hope this detailed answer is not a problem, but I think the newbies will use this with more ease. Thanks. Thanks! but I've implemented this on Ps 1.7 and can't see the change, is there any cache I need to clear somehow? Also where to do this exact same thing also inside an order? for when you want to change an order status within an order details page? Edited October 1, 2021 by omar2886 (see edit history) Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 1, 2021 Share Posted October 1, 2021 To clear cache you can remove or rename folder into this path: /var/cache Link to comment Share on other sites More sharing options...
Eutanasio Posted October 1, 2021 Share Posted October 1, 2021 (edited) 1 hour ago, DARKF3D3 said: To clear cache you can remove or rename folder into this path: /var/cache Ook now I see, thich change has affected orders.tpl but not in the orders-list page, so only when you open an order and whant to change the status (which was my second question! so this is partially solved for me already) Edited October 1, 2021 by omar2886 (see edit history) Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 1, 2021 Share Posted October 1, 2021 Probably that's because you're using PS1.7 while the modify posted by rempaddesign it's for PS.16. Link to comment Share on other sites More sharing options...
Mardok Posted October 3, 2021 Share Posted October 3, 2021 hello , I would like to know if it is possible to make sure that when the order status changes to "payment accepted" the "canceled" item is not visible. ex: {if $state['id_order_state'] == 2} code that causes the "canceled" status to no longer be selected in the drop-down menu {/if} please help me! <select id="id_order_state" class="chosen form-control" name="id_order_state" > {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} { selected="selected"{/if} {if $state['id_order_state'] == 2} HERE {/if} >{$state['name']|escape}</option> {/foreach} Link to comment Share on other sites More sharing options...
GoPure Kratom Posted October 4, 2021 Share Posted October 4, 2021 Hi, I have an issue (Presta 1.7.5) where my fulfilment partner cannot push the order status changes to my shop (shipped,delivered etc). I created an excel which constructs SQL to update the order status (and tracking numbers, but that's another story): I then run these SQL queries every now and then to bring the statuses up to date. I just noticed something weird, the statuses show as updated in the Orders view. For example the order with id 984 shows correctly Shipped in the orders view: But in the Order page, the status is still Payment Accepted AND the status Shipped is grayed out. And if I choose it and try to update the status to Shipped here, I get an error "The new order status is invalid". I guess part of the backoffice is correctly figuring out the status is already shipped, but why is the status not updating here...? 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