Order items in Cs-cart admin’s Order listing and Order search pages

This code modification will help you see order items on Order listing (Orders -> view orders) page itself.  The details will show up on order search results too.  See the image below.

order_details

I find it very useful to browse through orders and without having to click on each and every order.

This is a one page hook modification so you can edit any of your existing addon.  If you don’t have an existing addon, do the changes in my_changes addon just make sure you have it installed.  To illustrate I will do the changes in my_changes addon.

  1. Make sure you have the addon installed.  Verify from Administration->addons page.
    my_changes_installed
  2. Add template code, create folder and files if not present.
    skins\basic\admin\addons\my_changes\hooks\orders\order_row.post.tpl

    
    {assign var="order_info" value=$o.order_id|fn_get_order_info}
    {if $order_info}
    <td></td><td></td>
    <td colspan="6">
    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="table">
    {foreach from=$order_info.items item="product" key="key"}
    {if !$product.extra.parent}
    {cycle values=",class=\"table-row\"" name="class_cycle" assign="_class"}
     <tr>
     <td width="80%">
     {if $product.is_accessible}<a href="{"products.update?product_id=`$product.product_id`"|fn_url}" class="product-title">{/if}{$product.product|unescape}{if $product.is_accessible}</a>{/if}
     {if $product.extra.is_edp == "Y"}
     <div class="right"><a href="{"orders.order_downloads?order_id=`$order_info.order_id`"|fn_url}"><strong>[{$lang.download}]</strong></a></div>
     {/if}
     <p>{$lang.sku}:&nbsp;{$product.product_code}</p>
     </td>
     <td width="20%" >
     {$product.amount}
     {if $settings.General.use_shipments == "Y" && $product.shipped_amount > 0}
     &nbsp;<span class="small-note">(<span>{$product.shipped_amount}</span>&nbsp;{$lang.shipped})</span>
     {/if}
     </td>
     </tr>
    
    {/if}
    {/foreach}
     </table>
    </td>
    {/if} {*end if order_info*}
    
    
  3. That’s it, just clear cache with admin.php?cc and check Orders->View Orders page.
Posted in CS-Cart

Leave a Reply

Your email address will not be published. Required fields are marked *

*