Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding fields to Search display results in Orders Management

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-18-2015, 03:58 PM
 
Rodney Rodney is offline
 

Newbie
  
Join Date: Jul 2010
Posts: 8
 

Default Adding fields to Search display results in Orders Management

Adding fields can help with bookkeeping. I'd like to modify the PHP code to display a few more fields in an Orders Management search result. Currently the search displays Order #, Status, Customer, Date, and Total.

I'd like to also add Country, Subtotal, Taxes, and Shipping Cost too. Does anyone know what files and what code changes could easily add these to search results? Any help is greatly appreciated.

BTW, I'm using X-cart 4.4.5 (Unix).
__________________
4.4.5
Reply With Quote
  #2  
Old 06-22-2015, 06:47 PM
 
Rodney Rodney is offline
 

Newbie
  
Join Date: Jul 2010
Posts: 8
 

Default Re: Adding fields to Search display results in Orders Management

Managed to solve this on my own tonight. For anyone else trying to do this, the code can be added to the orders_list.tpl file under the skin/common_files/main folder. It is beautiful now, I still have the columns as before, but have added columns for shipping country, shipper choice, coupon, discount (sum of discount and coupon discount), discounted subtotal, shipping cost, and tax, plus I summed the dollar totals at the bottom. Monthly bookkeeping is now just a few quick entries of totals for all the orders in a month.
__________________
4.4.5
Reply With Quote
  #3  
Old 09-10-2015, 05:00 AM
  Keys Care's Avatar 
Keys Care Keys Care is offline
 

eXpert
  
Join Date: Feb 2007
Location: Cheyenne - Santa Monica - Oregon
Posts: 214
 

Default Re: Adding fields to Search display results in Orders Management

Hi, Thanks for the post. I am trying to add the "company name" to the summary. Can you explain how you added the items of show a screen shot of the code changes. I am a bit lost of how to do this minor change.

Many of our wholesale customers have different locations but the same buyer at a single billing address.

Bob
__________________
All-Natural Healing Skin and Pet Care Products
4.6.0 Gold, ShipWorks 3
Reply With Quote
  #4  
Old 09-12-2015, 06:31 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Adding fields to Search display results in Orders Management

Quote:
Originally Posted by Keys Care
Hi, Thanks for the post. I am trying to add the "company name" to the summary. Can you explain how you added the items of show a screen shot of the code changes. I am a bit lost of how to do this minor change.

Many of our wholesale customers have different locations but the same buyer at a single billing address.

Bob
Hi Bob.
As the topicstarter mentioned earlier, you will need to customize the /common_files/main/orders_list.tpl file.
Here is the basic code change you should make ('-' means to remove the loc, '+' means to add one):
Code:
- <td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "provider"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&amp;sort=provider{if $search_prefilled.sort_field eq "provider"}&amp;sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_provider}</a></td> - <td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "date"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&amp;sort=date{if $search_prefilled.sort_field eq "date"}&amp;sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_date}</a></td> - <td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "total"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&amp;sort=total{if $search_prefilled.sort_field eq "total"}&amp;sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_total}</a></td> + <td width="15%" nowrap="nowrap">{if $search_prefilled.sort_field eq "provider"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&amp;sort=provider{if $search_prefilled.sort_field eq "provider"}&amp;sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_provider}</a></td> + <td width="15%" nowrap="nowrap">{if $search_prefilled.sort_field eq "date"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&amp;sort=date{if $search_prefilled.sort_field eq "date"}&amp;sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_date}</a></td> + <td width="15%" nowrap="nowrap">{if $search_prefilled.sort_field eq "total"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&amp;sort=total{if $search_prefilled.sort_field eq "total"}&amp;sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_total}</a></td> + <td width="15%" align="right" nowrap="nowrap">{$lng.lbl_company}</td>
Then add this
Code:
<td nowrap="nowrap" align="right">{$orders[oid].company}</td>
after this
Code:
<td nowrap="nowrap"> <a href="order.php?orderid={$orders[oid].orderid}">{currency value=$orders[oid].total}</a> </td>
This is just a basic change, you can customize this columns any way you want, make it sortable, and so on.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #5  
Old 09-12-2015, 08:59 AM
  Keys Care's Avatar 
Keys Care Keys Care is offline
 

eXpert
  
Join Date: Feb 2007
Location: Cheyenne - Santa Monica - Oregon
Posts: 214
 

Default Re: Adding fields to Search display results in Orders Management

Thank You! Worked perfectly

Bob
__________________
All-Natural Healing Skin and Pet Care Products
4.6.0 Gold, ShipWorks 3
Reply With Quote
  #6  
Old 09-12-2015, 09:06 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Adding fields to Search display results in Orders Management

Quote:
Originally Posted by Keys Care
Thank You! Worked perfectly

Bob
You're welcome!
Glad that you sorted it out
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:23 PM.

   

 
X-Cart forums © 2001-2020