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

Highlight Product Quantity on Invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-25-2008, 09:36 AM
 
spacetoast spacetoast is offline
 

Member
  
Join Date: May 2005
Posts: 29
 

Default Highlight Product Quantity on Invoice

Hi!

When we print out our invoices to make orders, we have to carefully examine each invoice to verify the quantity because there have been times where we've just missed the fact that there were 2 items ordered rather than 1.

To avoid these errors, we would use a highlighter to highlight any product that had more than 1 item. I finally got tired of doing this and decided to figure out how to have x-cart do it.

This is for 4.0.17, but I'm sure it is pretty similar for other versions.

In skin1/mail/html/order_data.tpl

Near line 50, Find:
Code:
<TD align="center">{$product.amount}</TD>

Replace with:
Code:
<TD align="center"> {if $product.amount eq 1} {$product.amount} {else} <FONT style="BACKGROUND-COLOR: yellow">&nbsp {$product.amount} &nbsp</FONT> {/if} </TD>

This will highlight a quantity greater than 1.

I haven't tried yet, but if I were to throw in an if statement to filter the user type for Admin only, would that make it so that the emails sent to customers were not highlighted?

I hope this can help someone!


Edit: If you aren't printing on a color printer, you might want to change the background color to something that works better with black and white if the yellow isn't doing it for you.

Edit2: You also have to make sure that in your browser options you have it set to print background color otherwise it won't work.
__________________
Curtis Durham
4.6.4
www.bathnation.com
Reply With Quote
  #2  
Old 04-28-2008, 07:25 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default Re: Highlight Product Quantity on Invoice

If you really want to make a change to allow customers to see plain invoice while keeping your highlighted values over one, just tweak your code to this:

Code:
<td align="center"> {if $usertype eq "P" or $usertype eq "A"} {if $product.amount eq 1} {$product.amount} {else} <FONT style="BACKGROUND-COLOR: yellow">&nbsp {$product.amount} &nbsp</FONT> {/if} {else} {$product.amount}{/if} </td>

Just food for thought if interested...
__________________
vs 4.1.12
Reply With Quote
  #3  
Old 04-29-2008, 07:22 AM
 
spacetoast spacetoast is offline
 

Member
  
Join Date: May 2005
Posts: 29
 

Default Re: Highlight Product Quantity on Invoice

That worked exactly how I hoped it would. I just made the change and tested it.

Highlighted when logged in as Admin, not highlighted when logged in as customer. Also, the confirmation email to the customer is not highlighted.

Thanks, markwhoo!

I know this is a very simple mod, but since I made the change several days ago, it has saved us a lot of time since we would have to go through orders every morning and look for multiple items. This in combination with the "Printing 'Customer Notes' on invoices" mod (for pre 4.1.x carts) has eliminated the need to look through the orders on the screen. Now we just print the invoices off and look directly at them for all the info we need to know to make the orders.
__________________
Curtis Durham
4.6.4
www.bathnation.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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:25 AM.

   

 
X-Cart forums © 2001-2020