Help me modify code

```php {foreach from=$orders item=“o”}


#{$o.order_id}

{include file="common_templates/status.tpl" status=$o.status display="view"}



{$o.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}
{include file="common_templates/price.tpl" value=$o.total}

{foreachelse}

{$lang.text_no_orders}



{/foreach} ```


Would someone tell me if its possible to change {foreach from=$orders item="o"} in to forcing displaying orders only failed, declined, open?

What does it mean item="o" ?

Thank you

If I’m understanding you correctly you want to display only open, failed, and declined orders? I’ve altered your code to do that (It could be wrong, I’m not at a machine with access to my cs cart install).


```php

{foreach from=$orders item=“o”}

[COLOR=“Red”]{if (($o.status == “O”) || ($o.status == “F”) || ($o.status == “D”))}[/COLOR]


#{$o.order_id}

{include file="common_templates/status.tpl" status=$o.status display="view"}



{$o.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}
{include file="common_templates/price.tpl" value=$o.total}

[B][COLOR="Red"]{/if}[/COLOR][/B]
{foreachelse}

{$lang.text_no_orders}



{/foreach}
```

Thank you very much!



I am trying to make custom tpl that would be in front page of website below top.tpl asking buyer to enter incomplete order rather going to checkout page once again and making another open order.