Jump to content

Edit History

Eutanasio

Eutanasio

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?

Eutanasio

Eutanasio

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?

×
×
  • Create New...