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.


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.
  2. Add template code, create folder and files if not present.

    {assign var="order_info" value=$o.order_id|fn_get_order_info}
    {if $order_info}
    <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"}
     <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>
     <td width="20%" >
     {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} {*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 *