Print Page | Close Window

Problem editing the customer registration email.

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=2282
Printed Date: 01-July-2024 at 5:01am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem editing the customer registration email.
Posted By: JWL
Subject: Problem editing the customer registration email.
Date Posted: 26-December-2008 at 11:58am
I followed the instructions on which lines to edit in the languages.asp file - but when I go to the my account pages like custpref.asp - I get this error:

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/boutique/includes/languages.asp, line 1256

dictLanguage.Add "english_storeEmail_20",

All I edited was the text in the 20-23 lines. I don't understand how that would create an error.




Replies:
Posted By: netprofits
Date Posted: 26-December-2008 at 12:04pm
after the comma, you need to have your text in quotes. If you don't want to display any text, you still need to have the quotes, i.e.:
dictLanguage.Add "english_storeEmail_20", ""


-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: Greg Dinger
Date Posted: 26-December-2008 at 12:04pm
You probably missed a quote, or have a quote in the string that's not being handled correctly.  Please paste the 20-23 lines here.
 
 
on edit, ok - looks like Dan has identified your issue.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: JWL
Date Posted: 26-December-2008 at 1:00pm
Thanks for the quick replies... no, that's the first thing I thought of.  I had a list <ul> at the end of this line:
dictLanguage.Add "english_storeEmail_20"

I just removed the <ul> list and kept everything else the same... and now the error has went away. I can't use a list in the email?

Edit: I put the list text back at the end, except I replaced the <ul><li> with just line breaks <br> and the error came back. Is there a character limit or something?


Posted By: ProductCart
Date Posted: 26-December-2008 at 1:11pm
You certainly can have HTML code in language.asp as long as there are no double quotes or line breaks. In this particular case. make sure that there are no line breaks in your code. The entire Unordered List code must reside on the same line. That is:
<ul><li>My first item list</li><li>My second item list</li></ul>

... and not:
<ul>
<li>My first item list</li>
<li>My second item list</li>
</ul>

Also, remember that if the e-mail is sent as text, the HTML will not be parsed. E-mails in ProductCart are normally sent as text, unless you edit "sendmail.asp" to force HTML in all cases.


-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: JWL
Date Posted: 26-December-2008 at 1:16pm
"Also, remember that if the e-mail is sent as text, the HTML will not be parsed. E-mails in ProductCart are normally sent as text, unless you edit "sendmail.asp" to force HTML in all cases."

Yea... I got the email to send... but I think there is a character limit to each line, because I moved the <ul> list to the english_storeEmail_21 line, and I don't get the same error as before.

What code do I change in the sendemail.asp to make the registration emails html instead of plain text.


Posted By: Greg Dinger
Date Posted: 26-December-2008 at 1:22pm
Some mail components may not like HTML emails.  When I install my HTML Drop Ship PO mod, I occasionally have to run tests until I find a mail component that will produce the correct results.
 
Try changing to another component and you may be successful with that.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: JWL
Date Posted: 26-December-2008 at 5:54pm
I don't know what you mean by components.


Posted By: Greg Dinger
Date Posted: 26-December-2008 at 6:19pm
In settings, email settings, see:
Select a Component


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: JWL
Date Posted: 26-December-2008 at 7:38pm
I think the CPO is the only one I could get to work with godaddy smtp... how do you change the html/text setting in the sendemail.asp.


Posted By: Greg Dinger
Date Posted: 26-December-2008 at 8:46pm
At the beginning of /includes/sendmail.asp, you will see this statement.
if session("News_MsgType")="1" Then
 
That is the indicator that designates the need for an HTML e-mail to be issued.
 
You may find it wise to capture the value of that setting before you force a value into it, then restore the value after using it, in order to prevent having adverse affects elsewhere.
 
So, something like this:
dim saveMsgTyle
saveMsgType = session("News_MsgType")
session("News_MsgType")="1"
call sendmail (parameters here)
session("News_MsgType")=saveMsgType
 
Hope that helps.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: JWL
Date Posted: 27-December-2008 at 10:11am
All the email components have a line like that "session("News_MsgType")="1" except the If CDO section.

if scEmailComObj="CDO" then
    'on error resume next %>
    <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows Library" -->
    <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
    <%
    Const cdoSendUsingPort = 2
    Set objMail = Server.CreateObject("CDO.Message")
    Set iConf = Server.CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields
    With Flds
        .Item(cdoSendUsingMethod) = cdoSendUsingPort
        if scSMTP<>"" then
            .Item(cdoSMTPServer) = scSMTP
        else
            .Item(cdoSMTPServer) = "mail-fwd"
        end if
        .Item(cdoSMTPServerPort) = 25
        .Item(cdoSMTPconnectiontimeout) = 10
        'Only used if SMTP server requires Authentication
        if scSMTPAuthentication="Y" then
            .Item(cdoSMTPAuthenticate) = cdoBasic
            .Item(cdoSendUserName) = scSMTPUID
            .Item(cdoSendPassword) = scSMTPPWD
        end if


Posted By: Greg Dinger
Date Posted: 27-December-2008 at 10:31am

Ask EI for an updated version of your script.  I'm looking at a 3.5 version of the code and it does appear to support HTML mode.



-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net