X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Color coded order status... (https://forum.x-cart.com/showthread.php?t=4949)

markwhoo 05-04-2008 06:20 PM

Re: Color coded order status...
 
Nothing on variants anyone?

No thoughts or attempts?

wayneherndon 05-21-2008 07:50 PM

Re: Color coded order status...
 
I just implemented this mod by uploading the templates in the zip file (after modifying them to preserve the links in the order number and date as shown above). This apparently overwrote the code in the template that prevented users from changing status on Google Checkout orders in X-cart. I can now change status on the order view of all orders, including Google Checkout orders. Of course, this doesn't work backwards and update on Google. As far as I can tell, everything else is working fine. But, someone smarter than me should probably check this to make sure and perhaps modify the templates to avoid this overwrite.

In a way, I sort of like being able to make the change here to fix those instances where Google and X-Cart didn't communicate. So, I'm not sure this is a bad thing as long as users don't think they are updating the status of the Google order in this manner.

WH

PS: My fulfillment staff loved the change!

manolodf 10-31-2008 10:50 AM

Re: Color coded order status...
 
Has anyone else had these google checkout issues? I am wanting to install this mod on 4.1.9 but I would not want to affect the google checkout integration functionality

manolodf 10-31-2008 11:36 AM

Re: Color coded order status...
 
I have figured out how to keep the Google Checkout Properties with the Color Coded Order Status, just use the following code instead of the one on page 12, or you can manually insert the color code using the original orders_list.tpl which is how I came up with this:

Code:

{* Colors modification MOD *}

<tr{cycle values=", class='TableSubHead'"}>
        <td width="5"><input type="checkbox" name="orderids[{$orders[oid].orderid}]" /></td>
        <td {include file="main/orders_colors.tpl"}><a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a></td>
        <td {include file="main/orders_colors.tpl"} nowrap="nowrap">
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode ne "")}
<input type="hidden" name="order_status_old[{$orders[oid].orderid}]" value="{$orders[oid].status}" />
{if $orders[oid].goid ne ""}
{assign var="is_gcheckout_orders" value="1"}
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]" extra="disabled='disabled'"}
{else}
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]"}
{/if}
{else}
<a href="order.php?orderid={$orders[oid].orderid}"><b>{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}</b></a>
{/if}
{if $active_modules.Stop_List ne '' && $orders[oid].blocked  eq 'Y'}
<img src="{$ImagesDir}/no_ip.gif" style="vertical-align: middle;" alt="{$lng.lbl_blocked}:{$orders[oid].ip}" title="{$lng.lbl_ip_blocked|substitute:"ip":$orders[oid].ip}" />
{/if}
        </td>
        <td {include file="main/orders_colors.tpl"}>{$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login})</td>
{if $usertype eq "A" and $single_mode eq ""}
        <td>{$orders[oid].provider}</td>
{/if}
        <td {include file="main/orders_colors.tpl"} nowrap="nowrap"><a href="order.php?orderid={$orders[oid].orderid}">{$orders[oid].date|date_format:$config.Appearance.datetime_format}</a></td>
        <td {include file="main/orders_colors.tpl"} nowrap="nowrap" align="right">
        <a href="order.php?orderid={$orders[oid].orderid}">{include file="currency.tpl" value=$orders[oid].total}</a>
        </td>
</tr>

{* Colors modification MOD *}


JWait 11-02-2008 08:25 AM

Re: Color coded order status...
 
Quote:

Originally Posted by equinetack
I not only want to add the color, I know how to do that in the order_colors.tpl. I need to know how to implement the new color into the other templates so that when I select the status in Admin, it actually shows the correct color. For example, I'd like to make "Preorder" the color #B7DB86.


Look in your skin1/main/order_status.tpl and find the code for what "pre-order" is. Lets assume that it is "A" (since "P" is already used by "processed").

Open the orders_colors.tpl and add
{if $orders[cat_num].status eq "A"} bgcolor="#B7DB86"} {/if}

You need to open skin1/main/orders_list.tpl and find
<tr{cycle values=", class='TableSubHead'"}>

Under that you will find several <td>'s. These are the various columns that make up the list.

Changing
<td><a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a></td>

to
<td {include file="main/orders_colors.tpl"}><a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a></td>

will make the column that has the order# highlighted to the color the order status is.
The next column is the one that has the status dropdown box, and it should be pretty simple to continue across the page.

delboy2028 02-09-2009 11:41 AM

Re: Color coded order status...
 
this mod is great but in the admin section i have no lost the links that use to be on the customer order so i could view the order with out having to look at the invoice (if that make's sense)

delboy2028 02-10-2009 03:16 AM

Re: Color coded order status...
 
any one?

delboy2028 02-10-2009 03:18 AM

Re: Color coded order status...
 
here is my 4.1.11 modded code for orders_list.tpl
Code:

{* $Id: orders_list.tpl,v 1.18.2.14 2008/05/16 13:57:44 zaa Exp $ *}

{assign var="total" value=0.00}
{assign var="total_paid" value=0.00}

<script type="text/javascript">
<!--
var txt_delete_selected_orders_warning = "{$lng.txt_delete_selected_orders_warning|escape:javascript|strip_tags}";
-->
</script>

{if $orders ne ""}

{capture name=dialog}

<div align="right">{include file="buttons/button.tpl" button_title=$lng.lbl_search_again href="orders.php"}</div>

{include file="customer/main/navigation.tpl"}

{* Colour Key: Begin *}
Colour Key:
 
<table width="100%" border="1">
  <tr>
      <td bgcolor="#FFCCFF" name="Pink" width="129" align="middle"><div align="center">Not Finished</div></td>
      <td bgcolor="#009999" name="Blue" width="97" align="middle"><div align="center">Queued</div></td>
      <td bgcolor="#CCFFFF" name="Blue" width="119" align="middle"><div align="center">Processed</div></td>     
      <td bgcolor="#FF0000" name="Red" width="113" align="middle"><div align="center">Failed</div></td>
      <td bgcolor="#CCCCCC" name="Grey" width="117" align="middle"><div align="center">Complete</div></td>
  </tr>
</table>
{* Colour Key: End *}

{include file="main/check_all_row.tpl" form="processorderform" prefix="orderids"}

<form action="process_order.php" method="post" name="processorderform">
<input type="hidden" name="mode" value="" />

<table cellpadding="2" cellspacing="1" width="100%">

{assign var="colspan" value=6}

<tr class="TableHead">
    <td width="5"> </td>
    <td width="5%" nowrap="nowrap">{if $search_prefilled.sort_field eq "orderid"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction} {/if}<a href="orders.php?mode=search&sort=orderid{if $search_prefilled.sort_field eq "orderid"}&sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">#</a></td>
    <td nowrap="nowrap">{if $search_prefilled.sort_field eq "status"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction} {/if}<a href="orders.php?mode=search&sort=status{if $search_prefilled.sort_field eq "status"}&sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_status}</a></td>
    <td width="30%" nowrap="nowrap">{if $search_prefilled.sort_field eq "customer"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction} {/if}<a href="orders.php?mode=search&sort=customer{if $search_prefilled.sort_field eq "customer"}&sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_customer}</a></td>
{if $usertype eq "A" and $single_mode eq ""}
{assign var="colspan" value=7}
    <td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "provider"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction} {/if}<a href="orders.php?mode=search&sort=provider{if $search_prefilled.sort_field eq "provider"}&sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_provider}</a></td>
{/if}
    <td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "date"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction} {/if}<a href="orders.php?mode=search&sort=date{if $search_prefilled.sort_field eq "date"}&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} {/if}<a href="orders.php?mode=search&sort=total{if $search_prefilled.sort_field eq "total"}&sort_direction={if $search_prefilled.sort_direction eq 1}0{else}1{/if}{/if}">{$lng.lbl_total}</a></td>
</tr>

{section name=oid loop=$orders}

{math equation="x + ordertotal" x=$total ordertotal=$orders[oid].total assign="total"}
{if $orders[oid].status eq "P" or $orders[oid].status eq "C"}
{math equation="x + ordertotal" x=$total_paid ordertotal=$orders[oid].total assign="total_paid"}
{/if}

{* Colors modification MOD *}

<tr{cycle values=", class='TableSubHead'"}>
    <td width="5"><INPUT type="checkbox" name="orderids[{$orders[oid].orderid}]"></td>
    <td {include file="main/orders_colors.tpl"}>#{$orders[oid].orderid}</td>
    <td nowrap>
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Module ne "")}
<INPUT type="hidden" name="order_status_old[{$orders[oid].orderid}]" value="{$orders[oid].status}">
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]"}
{else}
{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}
{/if}
{if $active_modules.Stop_List ne '' && $orders[oid].blocked  eq 'Y'}
[img]{$ImagesDir}/no_ip.gif[/img]
{/if}
</td>
<td {include file="main/orders_colors.tpl"}>{$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login})</td>
{if $usertype eq "A" and $single_mode eq ""}
<td>
{$orders[oid].provider}
</td>
{/if}
<td {include file="main/orders_colors.tpl"} nowrap>{$orders[oid].date|date_format:$config.Appearance.date_format}</td>
<td {include file="main/orders_colors.tpl"} nowrap align="right">
{include file="currency.tpl" value=$orders[oid].total}
</td>
</tr>

{* Colors modification MOD *}


{/section}

<tr>
    <td colspan="{$colspan}"><img src="{$ImagesDir}/spacer.gif" width="100%" height="1" alt="" /></td>
</tr>

<tr>
    <td colspan="{$colspan}" align="right">{$lng.lbl_gross_total}: <b>{include file="currency.tpl" value=$total}</b></td>
</tr>

<tr>
    <td colspan="{$colspan}" align="right">{$lng.lbl_total_paid}: <b>{include file="currency.tpl" value=$total_paid}</b></td>
</tr>

<tr>
    <td colspan="{$colspan}"><br />

{include file="customer/main/navigation.tpl"}

{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)}
{if $is_gcheckout_orders eq "1"}
{$lng.txt_gcheckout_order_list_status_note}
<br />
<br />
{/if}
<input type="button" value="{$lng.lbl_update_status|strip_tags:false|escape}" onclick="javascript: submitForm(this, 'update');" />
   
<br /><br />
{/if}

<input type="button" value="{$lng.lbl_invoices_for_selected|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.target='invoices'; submitForm(this, 'invoice'); document.processorderform.target=''; {rdelim}" />
   
{if $usertype ne "C"}
<input type="button" value="{$lng.lbl_labels_for_selected|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.target='labels'; submitForm(this, 'label'); document.processorderform.target=''; {rdelim}" />
   
{/if}
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)}
<input type="button" value="{$lng.lbl_delete_selected|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) if (confirm(txt_delete_selected_orders_warning)) submitForm(this, 'delete');" />
   
{/if}

{if $active_modules.Shipping_Label_Generator ne '' && ($usertype eq 'A' || $usertype eq 'P')}
<br />
<br />
<br />
{$lng.txt_shipping_labels_note}
<br />
<br />
<input type="button" value="{$lng.lbl_get_shipping_labels|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.action='generator.php'; submitForm(this, ''); {rdelim}" />
{/if}

{if $usertype ne "C"}
<br />
<br />
<br />
{include file="main/subheader.tpl" title=$lng.lbl_export_orders}
{$lng.txt_export_all_found_orders_text}
<br /><br />
{$lng.lbl_export_file_format}:<br />
<select id="export_fmt" name="export_fmt">
    <option value="std">{$lng.lbl_standart}</option>
    <option value="csv_tab">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_tab_delimiter}</option>
    <option value="csv_semi">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_semicolon_delimiter}</option>
    <option value="csv_comma">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_comma_delimiter}</option>
{if $active_modules.QuickBooks eq "Y"}
{include file="modules/QuickBooks/orders.tpl"}
{/if}
</select>
<br />
<br />
<input type="button" value="{$lng.lbl_export|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) submitForm(this, 'export');" /> 
<input type="button" value="{$lng.lbl_export_all_found|strip_tags:false|escape}" onclick="javascript: self.location='orders.php?mode=search&export=export_found&export_fmt='+document.getElementById('export_fmt').value;" />
{/if}
</td>
</tr>

</table>
</form>

{/capture}
{include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra='width="100%"'}
{/if}


JWait 02-10-2009 04:37 AM

Re: Color coded order status...
 
You don't have links because you removed them....

Code:

{* Colors modification MOD *}

<tr{cycle values=", class='TableSubHead'"}>
    <td width="5"><INPUT type="checkbox" name="orderids[{$orders[oid].orderid}]"></td>
    <td {include file="main/orders_colors.tpl"}>#{$orders[oid].orderid}</td>
    <td nowrap>
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Module ne "")}
<INPUT type="hidden" name="order_status_old[{$orders[oid].orderid}]" value="{$orders[oid].status}">
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]"}
{else}
{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}
{/if}
{if $active_modules.Stop_List ne '' && $orders[oid].blocked  eq 'Y'}
[img]{$ImagesDir}/no_ip.gif[/img]
{/if}
</td>
<td {include file="main/orders_colors.tpl"}>{$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login})</td>
{if $usertype eq "A" and $single_mode eq ""}
<td>
{$orders[oid].provider}
</td>
{/if}
<td {include file="main/orders_colors.tpl"} nowrap>{$orders[oid].date|date_format:$config.Appearance.date_format}</td>
<td {include file="main/orders_colors.tpl"} nowrap align="right">
{include file="currency.tpl" value=$orders[oid].total}
</td>
</tr>

{* Colors modification MOD *}


should include <a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a>

Code:

<tr{cycle values=", class='TableSubHead'"}>
        <td width="5"><input type="checkbox" name="orderids[{$orders[oid].orderid}]" /></td>
        <td {include file="main/orders_colors.tpl"}><a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a></td>
        <td {include file="main/orders_colors.tpl"} nowrap="nowrap">
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode ne "")}
<input type="hidden" name="order_status_old[{$orders[oid].orderid}]" value="{$orders[oid].status}" />
{if $orders[oid].goid ne ""}
{assign var="is_gcheckout_orders" value="1"}
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]" extra="disabled='disabled'"}
{else}
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]"}
{/if}
{else}
<a href="order.php?orderid={$orders[oid].orderid}"><b>{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}</b></a>
{/if}
{if $active_modules.Stop_List ne '' && $orders[oid].blocked  eq 'Y'}
<img src="{$ImagesDir}/no_ip.gif" style="vertical-align: middle;" alt="{$lng.lbl_blocked}:{$orders[oid].ip}" title="{$lng.lbl_ip_blocked|substitute:"ip":$orders[oid].ip}" />
{/if}
        </td>
        <td {include file="main/orders_colors.tpl"}>{$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login})</td>
{if $usertype eq "A" and $single_mode eq ""}
        <td {include file="main/orders_colors.tpl"}>{$orders[oid].provider}</td>
{/if}
        <td {include file="main/orders_colors.tpl"}nowrap="nowrap"><a href="order.php?orderid={$orders[oid].orderid}">{$orders[oid].date|date_format:$config.Appearance.datetime_format}</a></td>
        <td {include file="main/orders_colors.tpl"}nowrap="nowrap" align="right">
        <a href="order.php?orderid={$orders[oid].orderid}">{include file="currency.tpl" value=$orders[oid].total}</a>
        </td>
</tr>


delboy2028 02-10-2009 05:15 AM

Re: Color coded order status...
 
thanks


All times are GMT -8. The time now is 09:28 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.