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)

bobbyftk 08-25-2009 11:42 AM

Re: Color coded order status...
 
easy enough. thanks again!

bobbyftk 08-28-2009 12:33 PM

Re: Color coded order status...
 
i just realized that after installing this mod, I'm not able to click on the order number and see the details anymore. did I miss a line in the mod?

JWait 08-29-2009 07:09 AM

Re: Color coded order status...
 
You probably left out the code to link the order number. Compare the original file to the new one in the area where the order number is called.

bobbyftk 08-31-2009 01:36 PM

Re: Color coded order status...
 
found this

old code

Code:

{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}


and added it right after this line in the new mod code.
Code:

{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}
{/if}


that area now looks exactly like the old code, but i get an error

Code:

Parse error: syntax error, unexpected T_ELSE in /home/ftkonlin/public_html/var/templates_c/%%8B^8B4^8B45DCD5%%orders_list.tpl.php on line 132

JWait 09-07-2009 03:26 PM

Re: Color coded order status...
 
What your error is telling you is that a erroneous "else" statement was found.. probably the one you added. Every "if" needs a "/if" to close it. You can make a "else" in between..

If "this" then do "that" /if
if "this" then do "that" else do "this" /if

bobbyftk 09-07-2009 04:27 PM

Re: Color coded order status...
 
I just can't seem to figure it out...

Here is the code

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 *}


and I know it needs a line similar to this in there.

Code:

<A href="order.php?orderid={$orders[oid].orderid}"><B>{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}</B></A>

I'm pulling my hair out and I just can't figure it out. if anyone can just tell me what to do, to get the order number to be a link to the details, I would really appreciate it.

JWait 09-08-2009 04:19 AM

Re: Color coded order status...
 
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>


Should be
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">


bobbyftk 09-08-2009 07:05 AM

Re: Color coded order status...
 
thank you very much!

delboy2028 09-10-2009 11:35 PM

Re: Color coded order status...
 
ok so i put this code in my orders_list.tpl

Code:

{*
$Id: orders_list.tpl,v 1.30 2008/11/26 14:29:26 joy Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{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|wm_remove|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="main/navigation.tpl"}
{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 *}
        {if (($usertype eq 'A' && $current_membership_flag ne 'FS') || ($usertype eq 'P' && $active_modules.Simple_Mode))
      && ($orders[oid].existing_login eq $orders[oid].login)}
            <a href="user_modify.php?user={$orders[oid].login|escape:"url"}&usertype=C" title="{$lng.lbl_modify_profile|escape}" target="_blank">{$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login})</a>
        {else}
            {$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login}){if $orders[oid].existing_login ne $orders[oid].login}<font class="Star"> {$lng.lbl_deleted}</font>{/if}
        {/if}
    </td>
{if $usertype eq "A" and $single_mode eq ""}
    <td>{$orders[oid].provider}</td>
{/if}
    <td nowrap="nowrap"><a href="order.php?orderid={$orders[oid].orderid}">{$orders[oid].date|date_format:$config.Appearance.datetime_format}</a></td>
    <td nowrap="nowrap" align="right">
    <a href="order.php?orderid={$orders[oid].orderid}">{include file="currency.tpl" value=$orders[oid].total}</a>
    </td>
</tr>
{/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="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_selected|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}


and this is my order orders_colors.tpl

Code:

{* $Id: orders_colors.tpl,v 1.0 2003/10/26 13:07:50 pipercub Exp $ *}
{if $orders[cat_num].status eq "C"} bgcolor="#00CCFF"} {/if}
{if $orders[cat_num].status eq "P"} bgcolor="#00FF66"} {/if}
{if $orders[cat_num].status eq "Q"} bgcolor="#FFFF99"} {/if}
{if $orders[cat_num].status eq "F"} bgcolor="#FF3333"} {/if}
{if $orders[cat_num].status eq "I"} bgcolor="#CCCCCC"} {/if}



now my order section looks like this

http://img406.imageshack.us/img406/4012/ordersg.th.jpg

delboy2028 09-11-2009 11:10 AM

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


All times are GMT -8. The time now is 04:07 AM.

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