Pound symbol in order and confirmation emails

Problems installing or using the NOP Design Free Shopping Cart that do not fit into one of the above categories.

Moderators: Koibito, Stefko, Randy

Pound symbol in order and confirmation emails

Postby davski13 » Fri Mar 04, 2011 4:31 pm

Hi,
I see reference made to this all over the forum but no real solution. My order notification and confirmation emails summarise the orders perfectly until it gets to the sub total and total whereupon the £ symbols are replaced with £ instead of £ sign. I've changed the document encoding to Unicode 4.0 UTF-8 in the nopcart.js, language-en.js, checkout.html and managecart.html (which has meant that the checkout page now displays the £ symbol instead of a question mark). I don't really need to know why any of this is happening, just a solution please in easy to understand language (ie: go gentle with me!).

Thanks
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby Koibito » Fri Mar 04, 2011 4:50 pm

I assume that you are using the Perl version?

Sometimes this will help. Add a MIME type and a content type to the mail headers.

Code: Select all
 print MAIL "Subject: New Online Order\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/plain; charset=utf-8\n";
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: Pound symbol in order and confirmation emails

Postby davski13 » Fri Mar 04, 2011 6:52 pm

Thanks John, would that be in the checkout.pl script in my CGI-bin?
Cheers,
David
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby Koibito » Fri Mar 04, 2011 7:30 pm

davski13 wrote: would that be in the checkout.pl script in my CGI-bin?


Yes, that would be in checkout.pl.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: Pound symbol in order and confirmation emails

Postby davski13 » Mon Mar 07, 2011 9:15 am

Hi,
Sadly that didn't appear to work - any further advice would be appreciated! I don't think that it is a major problem for the emails but when we link up to World Pay I'm concerned that the payment will be contaminated.

CODE in checkout.pl:

##############################################################
##############################################################
### MAIN ###
##############################################################
##############################################################

# process the form input.
&processCGI;
&populateDateVar;

foreach $check(@required) {
unless ($check) {
doFormError("It appears that you forgot to fill in the <strong>$check</strong> field.");
exit;
}
}

# checks for valid email address
if( &invalidE($b_email) ){
doFormError('You submitted an invalid email address.');
}


if( $mode eq "BOTH" || $mode eq "EMAIL") {
# Send email order to you...
open (MAIL,"|$mailprogram");
print MAIL "To: $youremail\n";
print MAIL "From: $b_email\n";
print MAIL "Subject: New Online Order\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/plain; charset=utf-8\n";

print MAIL "\n\n";
print MAIL "A new order has been received. A summary of this order appears below.\n";

Email appears like this:

Qty Price(£) Product ID - Product Name
=====================================================================
1 £1600.00 MARC_DIN_C1 - XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX
=====================================================================
SUBTOTAL: £1600.00
TOTAL: £1600.00

FREIGHT: £0.00
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby Koibito » Mon Mar 07, 2011 5:24 pm

You have two characters there: Â and £. I don't understand where the first one comes from. It does display the Pound sign, but, in addition, it shows you the 'Â'. Try to remove the space in front of the Pound sign, and then add that space again using a decent editor.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: Pound symbol in order and confirmation emails

Postby davski13 » Mon Mar 07, 2011 6:31 pm

Hi,
Where should I remove the space from? In the HTML there is no space, just a numeric price assigned to the PRICE invisible field. There's no space in the Javascript either:

//Options for Everyone:
MonetarySymbol = '£';
DisplayNotice = true;
DisplayShippingColumn = false;
DisplayShippingRow = true;
DisplayTaxRow = false;
TaxRate = false;
TaxByRegion = false;
TaxPrompt = 'For tax purposes, please select if you are an Arizona resident before continuing';
TaxablePrompt = 'Arizona Residents';
NonTaxablePrompt = 'Other States';
MinimumOrder = 0.00;
MinimumOrderPrompt = 'Your order is below our minimum order, please order more before checking out.';
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby Koibito » Mon Mar 07, 2011 6:45 pm

davski13 wrote:Where should I remove the space from?


In the checkout script.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: Pound symbol in order and confirmation emails

Postby davski13 » Mon Mar 07, 2011 6:54 pm

In this bit? I don't know if it is significant but I've just noticed that in the PRICE column below it shows \£$PRICE but in the subtotal and total it just says $SUBTOTAL and $TOTAL (and not £$SUBTOTAL and £$TOTAL)...?

print MAIL "Qty Price(\£) Product ID - Product Name\n";
print MAIL "===================================================================== \n";
print MAIL "$QUANTITY_1 \£$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 \n";
if( $NAME_2 ) {print MAIL "$QUANTITY_2 \£$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 \n";}
if( $NAME_3 ) {print MAIL "$QUANTITY_3 \£$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 \n";}
if( $NAME_4 ) {print MAIL "$QUANTITY_4 \£$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 \n";}
if( $NAME_5 ) {print MAIL "$QUANTITY_5 \£$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 \n";}
if( $NAME_6 ) {print MAIL "$QUANTITY_6 \£$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 \n";}
if( $NAME_7 ) {print MAIL "$QUANTITY_7 \£$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 \n";}
if( $NAME_8 ) {print MAIL "$QUANTITY_8 \£$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 \n";}
if( $NAME_9 ) {print MAIL "$QUANTITY_9 \£$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 \n";}
if( $NAME_10 ){print MAIL "$QUANTITY_10 \£$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 \n";}
if( $NAME_11 ){print MAIL "$QUANTITY_11 \£$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 \n";}
if( $NAME_12 ){print MAIL "$QUANTITY_12 \£$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 \n";}
if( $NAME_13 ){print MAIL "$QUANTITY_13 \£$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 \n";}
print MAIL "===================================================================== \n";
print MAIL "SUBTOTAL: $SUBTOTAL \n";
print MAIL "TOTAL: $TOTAL \n";
print MAIL "\n";
print MAIL "FREIGHT: $SHIPPING \n";
print MAIL "\n\n";
print MAIL "Comments: \n";
print MAIL "--------- \n";
print MAIL "$comment \n";
print MAIL " \n";
close MAIL;
}
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby davski13 » Mon Mar 07, 2011 7:06 pm

Oddly enough, adding the extra £ sign as referred to in my above post gave me the following:

Qty Price(£) Product ID - Product Name
=====================================================================
2 £1600.00 MARC_DIN_C1 - Marcello Dining Table Travertine Classico
=====================================================================
SUBTOTAL: £Â£3200.00
TOTAL: £Â£3200.00

FREIGHT: £Â£0.00

An additional '£' - I think I'm getting closer but no cigar just yet!!
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby davski13 » Tue Mar 08, 2011 10:15 am

Hi,
More plugging away - the problem seems to lie with Mac Mail which is adding the Â, checking emails using Outlook Express is fine. What I have discovered in the Outlook Express emails however is that the £ symbol in brackets at the top of the pricing column is now missing, only the brackets are visible, and in the summary the item has no monetary symbol (on the Mac these are in place).

It's doing my head in but we're getting there!

David
davski13
WebMaster
 
Posts: 9
Joined: Tue Oct 26, 2010 9:16 am

Re: Pound symbol in order and confirmation emails

Postby opa » Thu Mar 10, 2011 11:22 pm

Using the Notepad edittor helps sometime

Or use the html code for the Pound symbol in Perl
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands


Return to Help: Cart / General

Who is online

Users browsing this forum: No registered users and 1 guest