I can't understand the logic of why you would allow a customer to create a returns request before the order has completed, maybe I am missing something?
Anyway I have changed my code to only display the returns request box for orders with a status of 'Complete' and thought I would post it here in case anyone else would like it.
You need to change the skin1/main/history_order.tpl file remember to BACK UP your file first!!
Find this code about a quarter of the way down:
Code:
{if $active_modules.RMA ne '' && ($usertype eq 'C' || $usertype eq 'A' || ($usertype eq 'P' && $active_modules.Simple_Mode)) && $return_products ne ''}
{include file="buttons/button.tpl" button_title=$lng.lbl_returns href="#returns"}
{/if}
And change it to this:
Code:
{if $active_modules.RMA ne '' && ($usertype eq 'C' || $usertype eq 'A' || ($usertype eq 'P' && $active_modules.Simple_Mode)) && $return_products ne ''}
{* Only show return request to customer if order is completed *}
{if $usertype eq 'A' || $usertype eq 'P' || ($usertype eq 'C' && $order.status eq "C")}
{include file="buttons/button.tpl" button_title=$lng.lbl_returns href="#returns"}
{/if}
{/if}
Then find this code right down the bottom:
Code:
{if $active_modules.RMA ne '' && ($usertype eq 'C' || $usertype eq 'A' || ($usertype eq 'P' && $active_modules.Simple_Mode))}
<A name="returns"></A>
{include file="modules/RMA/add_returns.tpl"}
{/if}
And change it to this:
Code:
{if $active_modules.RMA ne '' && ($usertype eq 'C' || $usertype eq 'A' || ($usertype eq 'P' && $active_modules.Simple_Mode))}
{* Only show return request to customer if order is completed *}
{if $usertype eq 'A' || $usertype eq 'P' || ($usertype eq 'C' && $order.status eq "C")}
<A name="returns"></A>
{include file="modules/RMA/add_returns.tpl"}
{/if}
{/if}