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

Adding shipping option in orders list

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-27-2013, 08:33 AM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default Adding shipping option in orders list

Does anyone know how to add a shipping option column to the orders list and highlight them in different colors?

This will make it much easier to see orders that have selected expedited shipping options like next day service

Xcart 4.6.0
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote
  #2  
Old 08-27-2013, 10:02 AM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default Re: Adding shipping option in orders list

http://forum.x-cart.com/showpost.php?p=313758&postcount=183

.
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
Reply With Quote
  #3  
Old 08-27-2013, 10:23 AM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default Re: Adding shipping option in orders list

Thank you for the reply - this simply adds a color code to the customers name

I need a column with the shipping method name listed - we have many many shipping methods - thanks
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote
  #4  
Old 09-07-2016, 03:44 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: Adding shipping option in orders list

Quote:
Originally Posted by Raptor
I need a column with the shipping method name listed - we have many many shipping methods - thanks

I know this is an old thread but here's a patch for 4.7.6. It adds a "shipping" column to the order list with the shipping method per order. We use this to easily see in the order list which orders have expedited shipping. Those orders get priority over ground shipping.

skin/common_files/main/orders_list.tpl

find
Code:
<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%" align="right" 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>

Replace with:

Code:
<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="10%" nowrap>{$lng.lbl_shipping}</td> <td width="15%" align="right" 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>

Find:
Code:
<td nowrap="nowrap"><a href="order.php?orderid={$orders[oid].orderid}">{$orders[oid].date|date_format:$config.Appearance.datetime_format}</a></td>

After it, add:
Code:
<td nowrap="nowrap">{$orders[oid].shipping|regex_replace:"/\(.*\)|#.*#/":""}</td>
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote

The following 3 users thank nfc5382 for this useful post:
qualiteam (09-12-2016), Raptor (09-08-2016), Thomasb134 (09-12-2016)
  #5  
Old 09-08-2016, 06:39 PM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default Re: Adding shipping option in orders list

Many thanks !!

__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote

The following 2 users thank Raptor for this useful post:
nfc5382 (09-08-2016), qualiteam (09-12-2016)
  #6  
Old 09-12-2016, 01:59 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Adding shipping option in orders list

We did something similar but just truncated the shipping to a suitable length to help the column from becoming too long:

PHP Code:
{$orders[oid].shipping|truncate:"5":""
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
  #7  
Old 09-12-2016, 03:54 PM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default Re: Adding shipping option in orders list

Thanks for sharing the mod. Just to add my twist to it (for my V4.4.5 cart), I altered the last line of code so that the USPS's <sup> tags are removed from the displayed shipping text. This shortens the text and looks better too.

Code is as follows:
Code:
<td nowrap="nowrap">{$orders[oid].shipping|regex_replace:"/\&lt;|\&gt;|sup|\/|\(.*\)|#.*#/":""}</td>
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
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 09:12 PM.

   

 
X-Cart forums © 2001-2020