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

Color coded order status...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #121  
Old 08-24-2007, 07:55 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Color coded order status...

Quote:
Originally Posted by newattraction
I just installed both color coded order status mod and color coded product list mod on version 4.1.5 - both mods work perfectly!

Thanks a lot!

Guosheng
www.vonbell.com


Could you share the code you did for the Product List? I have not been able to get this part working correctly yet.
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #122  
Old 08-26-2007, 08:43 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Color coded order status...

Vacman,

This is the code I worked on for v4.1.8
It seems to be working O.K., I haven't had any problems.
There are two color codes. One color is for when the quantity hits the low available limit that you set in admin, and the other color is for when your quantity level reaches zero.

This is the full code for skin1/main/products.tpl

Code:
{* $Id: products.tpl,v 1.42.2.3 2007/05/14 10:03:56 max Exp $ *} {if $products ne ""} {include file="main/check_all_row.tpl" style="line-height: 170%;" form="processproductform" prefix="productids"} <script type="text/javascript"> <!-- var txt_pvariant_edit_note_list = "{$lng.txt_pvariant_edit_note_list|escape:javascript}"; {literal} function pvAlert(obj) { if (obj.pvAlertFlag) return false; alert(txt_pvariant_edit_note_list); obj.pvAlertFlag = true; return true; } {/literal} --> </script> <table cellpadding="2" cellspacing="1" width="100%"> {if $main eq "category_products"} {assign var="url_to" value="category_products.php?cat=`$cat`&page=`$navpage`"} {else} {assign var="url_to" value="search.php?mode=search&page=`$navpage`"} {/if} <tr class="TableHead"> <td width="5">&nbsp;</td> <td nowrap="nowrap">{if $search_prefilled.sort_field eq "productcode"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="{$url_to|amp}&amp;sort=productcode&amp;sort_direction={if $search_prefilled.sort_field eq "productcode"}{if $search_prefilled.sort_direction eq 1}0{else}1{/if}{else}{$search_prefilled.sort_direction}{/if}">{$lng.lbl_sku}</a></td> <td width="100%" nowrap="nowrap">{if $search_prefilled.sort_field eq "title"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="{$url_to|amp}&amp;sort=title&amp;sort_direction={if $search_prefilled.sort_field eq "title"}{if $search_prefilled.sort_direction eq 1}0{else}1{/if}{else}{$search_prefilled.sort_direction}{/if}">{$lng.lbl_product}</a></td> {if $main eq "category_products"} <td nowrap="nowrap">{if $search_prefilled.sort_field eq "orderby"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="{$url_to|amp}&amp;sort=orderby&amp;sort_direction={if $search_prefilled.sort_field eq "orderby"}{if $search_prefilled.sort_direction eq 1}0{else}1{/if}{else}{$search_prefilled.sort_direction}{/if}">{$lng.lbl_pos}</a></td> {/if} <td nowrap="nowrap">{if $search_prefilled.sort_field eq "quantity"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="{$url_to|amp}&amp;sort=quantity&amp;sort_direction={if $search_prefilled.sort_field eq "quantity"}{if $search_prefilled.sort_direction eq 1}0{else}1{/if}{else}{$search_prefilled.sort_direction}{/if}">{$lng.lbl_in_stock}</a></td> <td nowrap="nowrap">{if $search_prefilled.sort_field eq "price"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="{$url_to|amp}&amp;sort=price&amp;sort_direction={if $search_prefilled.sort_field eq "price"}{if $search_prefilled.sort_direction eq 1}0{else}1{/if}{else}{$search_prefilled.sort_direction}{/if}">{$lng.lbl_price} ({$config.General.currency_symbol})</a></td> </tr> {section name=prod loop=$products} <tr{cycle values=', class="TableSubHead"'}> <td {include file="main/products_colors.tpl"}> <width="5"><input type="checkbox" name="productids[{$products[prod].productid}]" /></td> <td {include file="main/products_colors.tpl"}><a href="product_modify.php?productid={$products[prod].productid}{if $navpage}&page={$navpage}{/if}">{$products[prod].productcode}</a></td> <td {include file="main/products_colors.tpl"}> <width="100%">{if $products[prod].main eq "Y" or $main ne "category_products"}<b>{/if}<a href="product_modify.php?productid={$products[prod].productid}{if $navpage}&page={$navpage}{/if}">{$products[prod].product|truncate:35:"...":false}</a>{if $products[prod].main eq "Y" or $main ne "category_products"}</b>{/if}</td> {if $main eq "category_products"} <td {include file="main/products_colors.tpl"}><input type="text" size="9" maxlength="10" name="posted_data[{$products[prod].productid}][orderby]" value="{$products[prod].orderby}" /></td> {/if} <td {include file="main/products_colors.tpl"}><align="center"> {if $products[prod].product_type ne 'C'} <input type="text" size="9" maxlength="10" name="posted_data[{$products[prod].productid}][avail]" value="{$products[prod].avail}"{if $products[prod].is_variants eq 'Y'} readonly="readonly" onclick="javascript: pvAlert(this);"{/if} /> {/if} </td> <td {include file="main/products_colors.tpl"}> {if $products[prod].product_type ne 'C'} <input type="text" size="9" maxlength="15" name="posted_data[{$products[prod].productid}][price]" value="{$products[prod].price|formatprice}"{if $products[prod].is_variants eq 'Y'} readonly="readonly" onclick="javascript: pvAlert(this);"{/if} /> {/if} </td> </tr> {/section} </table> {/if}

And this is the code for skin1/main/products_colors.tpl

Code:
{* $Id: products_colors.tpl,v 2.0 2004/10/31 01:44:16 ADPBoss Exp $ *} {if $products[prod].forsale eq "N"} td bgcolor="#CCCCCC" {elseif $products[prod].forsale eq "Y" and $products[prod].avail eq "0"} td bgcolor="#FFD2D2" {elseif $products[prod].forsale eq "Y" and $products[prod].avail < $products[prod].low_avail_limit} td bgcolor="#FFCC99" {/if}

Just change the colors to whatever fits you site layout.

I also adjusted the alternating colors from a medium gray to a lighter grey on the main product search result page.
I changed this in the skin1_admin.css file. I changed the original #EEEEEE color to #FAFAFA to give it a very, very light grey color.

Code:
.TableSubHead { BACKGROUND-COLOR: #FAFAFA; FONT-WEIGHT: normal; }

And that's it.

- MoonDog -
Attached Thumbnails
Click image for larger version

Name:	Product_Status_Color.gif
Views:	300
Size:	38.2 KB
ID:	540  
__________________
X-CART Gold v4.1.8
Reply With Quote
  #123  
Old 08-26-2007, 10:26 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Color coded order status...

Well - I am not sure what I am doing wrong. I copied your exact code(s) but I still only get the image shown below. I will have to put this on my to do list for later. I am sure there is something obvious that I am over looking.
Attached Thumbnails
Click image for larger version

Name:	products.JPG
Views:	237
Size:	42.9 KB
ID:	541  
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #124  
Old 08-27-2007, 02:54 AM
 
DaveB DaveB is offline
 

Senior Member
  
Join Date: May 2004
Location: UK
Posts: 121
 

Default Re: Color coded order status...

Got the Product colour mod working a treat in 4.0.19 Pro, but only in Provider mode. Any ideas how to implement it in Admin?
__________________
Xcart 4.0.19 Pro
mySQL 5.5.44
PHP 5.3.27
Reply With Quote
  #125  
Old 08-27-2007, 07:07 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Color coded order status...

Quote:
Got the Product colour mod working a treat in 4.0.19 Pro, but only in Provider mode. Any ideas how to implement it in Admin?

Unfortunately I'm unable to help with this one. I'm using X-Cart Gold and it only has one mode, the Admin mode. And it seems to be working O.K. in Gold. Hopefully, someone with X-Cart Pro can help you out.


Quote:

Well - I am not sure what I am doing wrong. I copied your exact code(s) but I still only get the image shown below. I will have to put this on my to do list for later. I am sure there is something obvious that I am over looking.

Make sure that you change the products.tpl file and not the product.tpl file. One has the letter "s" after product and the other doesn't.

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #126  
Old 08-28-2007, 03:41 AM
 
DaveB DaveB is offline
 

Senior Member
  
Join Date: May 2004
Location: UK
Posts: 121
 

Default Re: Color coded order status...

Quote:
Originally Posted by Vacman
Well - I am not sure what I am doing wrong. I copied your exact code(s) but I still only get the image shown below. I will have to put this on my to do list for later. I am sure there is something obvious that I am over looking.

Not sure if it made any difference or not, but I cleared out the compiled templates after implementing.
__________________
Xcart 4.0.19 Pro
mySQL 5.5.44
PHP 5.3.27
Reply With Quote
  #127  
Old 08-28-2007, 06:59 AM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Color coded order status...

Quote:
Originally Posted by DaveB
Not sure if it made any difference or not, but I cleared out the compiled templates after implementing.


Yeah - first thing I did a couple of days ago. Did not work.
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #128  
Old 01-24-2008, 08:00 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

Senior Member
  
Join Date: Nov 2007
Location: Australia
Posts: 118
 

Talking Re: Color coded order status...

For those that never put the code on 4.1.9 here gos the code from the fist step AGAIN.

Create a tpl call "orders_colors.tpl" with the code below provide by adpboss

Code:
{* $Id: orders_colors.tpl,v 2.0 2004/10/31 01:27:28 ADPBoss Exp $ *} {if $orders[oid].status eq "C"} bgcolor="#00CCFF"} {/if} {if $orders[oid].status eq "P"} bgcolor="#00FF66"} {/if} {if $orders[oid].status eq "Q"} bgcolor="#FFFF99"} {/if} {if $orders[oid].status eq "F"} bgcolor="#FF3333"} {/if} {if $orders[oid].status eq "I"} bgcolor="#CCCCCC"} {/if}

change the code below...

Code:
<tr{cycle values=", class='TableSubHead'"}> <td width="5"><input type="checkbox" name="orderids[{$orders[oid].orderid}]" /></td> <td><a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a></td> <td 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>{$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 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>

for this one...

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

As long as i know this modification will be good for any 4.x.x X-Cart versions but i install on 4.0.1, 4.1.0, 4.1.1, 4.1.7, 4.1.9 (I use this one).

If you never modified the code on "orders_list.tpl", just download the files "READY" and upload on your server OVERWRITING the old files.

Making sure everybody understand.... from the fist post says to modified the file "orders.tpl" but if you using the 4.x.x and higher you will not need that. You only will work with the "orders_colors.tpl" and "orders_list.tpl" nothing more.

DOWNLAOD HERE


The original forum page where you can find full discussion about this MODULE is: http://forum.x-cart.com/showthread.php?t=4949


Enjoy!

__________________
Pedro
digitalnotions.i2u.shop
shop.modestclassy.com.au4.1.9 X-Cart
X-Cart
Business 5.3.6.0
Multi-vendor 5.3.6.0


Reply With Quote
  #129  
Old 01-27-2008, 06:50 PM
 
david@WSS david@WSS is offline
 

Newbie
  
Join Date: Dec 2007
Location: Los Angeles
Posts: 8
 

Question Re: Color coded order status...

I am using 4.1.9 developing a site, not live yet.

I have been trying to add the Orders Status mod without much luck. I have gone over all the posts dozens of times. I have replaced all the files in question and downloaded and installed the files that Pedro posted. Still the same problem.

Colors are not applied but the color code is printed in the table.

Same thing happens with the Products color code.

See the image below.

Help?



Thanks,
David

http://forum.x-cart.com/images/attach/jpg.gif
Attached Thumbnails
Click image for larger version

Name:	xcart_colorMod_prob.jpg
Views:	200
Size:	18.3 KB
ID:	748  
__________________
David
Wide Screen Software LLC
============
X-Cart Gold v4.1.9
in development

PHP 5.2.5
MySQL 5.0.45
Apache 2.2.6

Last edited by david@WSS : 01-27-2008 at 06:58 PM. Reason: want to attach image
Reply With Quote
  #130  
Old 01-28-2008, 09:11 AM
 
david@WSS david@WSS is offline
 

Newbie
  
Join Date: Dec 2007
Location: Los Angeles
Posts: 8
 

Default Re: Color coded order status...

Problem solved....

Some mod had me change some code in the Smarty files.

This was the source of my problem. I reinstalled the original Smarty code and the color mod works great.

Lesson learned, do not mess with Smarty. Payment: hours lost and much frustration.

Moving on in the dev of my store, more trial and error and hopefully easier lessons.
__________________
David
Wide Screen Software LLC
============
X-Cart Gold v4.1.9
in development

PHP 5.2.5
MySQL 5.0.45
Apache 2.2.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:42 PM.

   

 
X-Cart forums © 2001-2020