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

Show Referrer Information on Order Details Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 06-12-2005, 11:39 PM
 
TJ Stephens TJ Stephens is offline
 

Advanced Member
  
Join Date: May 2005
Location: California
Posts: 94
 

Default Show Referrer Information on Order Details Page

This is a real simple template edit that I have found very useful. It shows how the customer was referred to your site on the order details page in the admin section so when you are processing the order you can see how they got to your site. You can also click on the referrer link to see exactly where they came from.

I am using 4.0.13 gold which stores the referrer information in the customers table. Being new to xcart, I am not sure at what version xcart started keeping this data but in order for this to work you would have to check your customers table to see if you have a referrer field (the field name is actually spelled "referer"). Also, xcart already displays this information when you search for users in the admin section so this is really just a modified cut and paste. I just think that this information is more useful when displayed with the order details.

Edit /main/order_info.tpl and add the following language towards the end just after the last "{/foreach}"

Code:
{if $usertype eq "A" or $usertype eq "P"} <TR> <TD valign="top">{$lng.lbl_referred_by}</TD> <TD> {if $customer.referer} {$customer.referer} {else} {$lng.lbl_unknown} {/if} </TD> </TR> {/if}

This places the referrer information just under "customer comments" in the "additional information" section of the order details page. You could probably place it anywhere you like. It also only displays it to the admin or provider and not the customer. I believe that the referrer information is customer specific and not order specific. This means that it displays how the customer was originally referred to your site. If that same customer where to order again from your site then the referrer information would not change.

I realize this is hardly worthy of being in the custom mods section but, as a newby to xcart, it was something I was searching this forum trying to figure out how to do for a long time. So I post this for those other rookies out there like me.

T.J.
__________________
X-Cart Pro 4.1.11 (Live)
XRMA
XAFF
XAOM
DSEFU Pro
XGift Reg
Firetank Feed Manager
BCSE Shipping Calculator
XcartMod Dynamic Images
Reply With Quote

The following user thanks TJ Stephens for this useful post:
donavichi (10-25-2009)
  #2  
Old 07-19-2005, 03:57 PM
 
pavant pavant is offline
 

Advanced Member
  
Join Date: Oct 2004
Location: Chicago, Illinois
Posts: 84
 

Default

Loved your mod. I have been thinking about adding something like this. It was very easy to implement. Thanks!
__________________
X-Cart Gold v 4.1.10
PHP 5.2.4
MySQL 5.0.45 standard
Apache/2.2.6
OS - Linux
Reply With Quote
  #3  
Old 07-19-2005, 04:18 PM
 
PremiumPonyParts PremiumPonyParts is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 114
 

Default

Good job. Saves me time from finding the orders usersname, then searchign for him.
__________________
Version 4.0.8
Reply With Quote
  #4  
Old 07-31-2005, 11:52 PM
 
Jim K. Jim K. is offline
 

Advanced Member
  
Join Date: Mar 2003
Location: USA
Posts: 35
 

Default

Thanks for the tip. This also works great in 3.5.7.

Jim K.
__________________
3.5.7
Reply With Quote
  #5  
Old 08-01-2005, 02:46 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

Thank you. Excellent addition.
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #6  
Old 08-21-2005, 10:24 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default

Thank you very much...very nice
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #7  
Old 08-28-2006, 04:26 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: Show Referrer Information on Order Details Page

This is a very good mod. It puts the referral information where it is most useful.

Many thanks!
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #8  
Old 03-02-2007, 02:12 PM
 
gargonzo gargonzo is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 171
 

Default Re: Show Referrer Information on Order Details Page

thanks this is cool. is there a way to include this in the ADMIN emails, we get when registration notification? TIA

will it work?
garz
4.07 php
__________________
xcart ver 4.xx/linux/php
Reply With Quote
  #9  
Old 03-31-2007, 11:03 AM
 
craven craven is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 50
 

Default Re: Show Referrer Information on Order Details Page

Wow, this is really helpful and works perfect on 4.1.6
__________________
Version 4.3.2
Reply With Quote
  #10  
Old 04-24-2007, 04:57 AM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default Re: Show Referrer Information on Order Details Page

thanks works perfectly on 4.1.6 i would suggest though having the code just after:

{include file="main/subheader.tpl" title=$lng.lbl_products_info}
<table cellspacing="0" cellpadding="0" width="100%">


Reason being is i rely quite alot on being able to view this data, and if its at the top of the order then it makes it quicker to check. just a suggestion.
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
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 11:08 PM.

   

 
X-Cart forums © 2001-2020