Post moved, please be aware of where you post...as the name implies, the Completed Custom Mods forum is for posting Completed code only.
Also, if you could please read the forum rules and put your X-Cart version in your signature, that would be great
Now, on to your question, you will find the answer here:
http://forum.x-cart.com/viewtopic.php?t=17333