View Full Version : Extra Fields In Customer Emails
netwalk
19-Nov-2003, 09:11 AM
Hi all. In the AUG there is a section for adding an extra field into the customer email. Before I spend lots of time trying this out, does anyone know if the same method works for other fields on the checkout e.g. purchase order number?
Also, is it possible to add extra line details, i.e. line level custom properties, to be included in the emails? I vaguely recall once reading that another description was available for the emails that I could just about use to hold custom properties. Any help?
Many thanks,
Julian
cdicken
20-Nov-2003, 03:16 PM
You may be remembering that this feature has been asked for before, but at the moment it is not possible to put custom property values into the emails.
This is because custom properties are never part of the shopping cart - they are only used in the HTML for displaying the product.
Sorry about that.
With regards to the purchase order number, there is a solution on the forums HERE (http://community.actinic.com/showthread.php?s=&threadid=2168).
netwalk
20-Nov-2003, 04:28 PM
Thanks Chris. Before I put too much effort in do you think something like this may work?
For each item have an identical component that is hidden for which the description contains a concatenation of the custom properties required (built and updated using an Access query). This component could then appear on the customer and buyer emails? I haven't had need to use components yet so this is all guesswork.
Another option that I like less would be for the site not to send customer confirmation emails but to automate the order downloads and run SQL queries against the Access database to build and send emails. This would however have to be running 24/7 and downloading often to get the confirmations out in a timely manner.
The requirement is that the store owner wants to keep the supplier name and part number against each item but not in the product description and wants these to be sent to the customer on the confirmation email. Anyone else with some ideas?
Thanks,
Julian
NormanRouxel
20-Nov-2003, 04:45 PM
You can use the Extended Product Description for Customer Reports to put extra text into the shopping cart. See View / Business Settings / Options regarding how to turn this on.
I've attached my readme on how to get this info into the customer e-mail.
Norman
netwalk
20-Nov-2003, 05:02 PM
Norman, you're a saviour. I thought I'd seen this somewhere in the forum but couldn't find it again. It looks as though it will do exactly what I need. I can easily write the SQL queries to update this report description to include exactly what my customer needs.
Many many thanks,
Julian
NormanRouxel
20-Nov-2003, 05:13 PM
Actually Chris saying "but at the moment it is not possible to put custom property values into the emails" got me going. So here's how to do exactly that (and only a few lines of patching).
v6 - Product Properties in Customer E-mail (tested with 6.1.3)
The example below is for a Customvar TESTPROPERTY defined at the product level.
Backup OrderScript.pl (your Site1 version). Now open OrderScript.pl in a
text editor (not a word processor - see www.editpadlite.com for one).
Search for "# Add components excluded" (without the quotes) and you'll find a block
of code like below:-
#
# Add components excluded
#
foreach $pComponent (@aComponentsSeparated)
{
#
# Add component line
Immediately above the
#
# Add components excluded
#
stick this bit of code
##### Start - Norman trying for Custom Property Patch
if (length $$pProduct{CUSTOMVARS}{TESTPROPERTY} > 0)
{
$ACTINIC::B2B->AppendXML('CART', "\r\n" . $$pProduct{CUSTOMVARS}{TESTPROPERTY} . "\r\n\r\n");
}
##### End - Norman trying for Custom Property Patch
Update your site and test to destruction. Remember that Actinic don't
support patched scripts and you'll have to re-do this patch if you update or re-install Actinic.
Also note that this text goes into the customers
confirmation e-mail and shouldn't contain html tags.
Norman
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.