PDA

View Full Version : Embedded HTML in customer email confirming order


June
03-Jun-2005, 04:32 PM
Hi,

I have embedded HTML in the many of my short product descriptions, which are downloaded as order lines in Actinic.

The embedded HTML is showing up in this (which is not a problem), but it is also in the order description line on the confirmatory email the customer receives to show the order is being processed (one customer was very confused by this and thought it was not a genuine product!) - he wanted to cancel until I explained.

Is there any way round this problem, please?? :confused:

Thanks

NormanRouxel
03-Jun-2005, 09:40 PM
This would probably need some Perl patching in Orderscript.pl. It may already be covered here or in the Knowledge Base. Try searching.

NormanRouxel
03-Jun-2005, 10:49 PM
I found a similar post I'd done earlier. Here it is modified to remove all embedded html tags.Edit OrderScript.pl (back it up first - use a text editor, not a word processor).

Look for the line

$objOrderBlob->AddString($$pProduct{"NAME"}); # the product description

Replace with

my $sNameTemp = $$pProduct{"NAME"}; # the product description
$sNameTemp =~ s/!!<|>!!//g; # strip HTML escapes
$sNameTemp =~ s/<.*?>//g; # replace everything between < and > (minimally)
$objOrderBlob->AddString($sNameTemp); # the tidied product description


Look for the 2 lines

MailOrderLine( $$pProduct{REFERENCE},
$$pProduct{NAME},

Replace these 2 lines with

my $sNameTemp = $$pProduct{"NAME"}; # the product description
$sNameTemp =~ s/!!<|>!!//g; # strip HTML escapes
$sNameTemp =~ s/<.*?>//g; # replace everything between < and > (minimally)
MailOrderLine( $$pProduct{REFERENCE},
$sNameTemp, # the tidied nameThis will also tidy up the Description in the Order and Printed Reports.