Print Page | Close Window

Order confirmation & contact.asp Email

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=1484
Printed Date: 06-October-2024 at 9:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Order confirmation & contact.asp Email
Posted By: kimmyecoist
Subject: Order confirmation & contact.asp Email
Date Posted: 27-March-2008 at 11:41pm
Hi!

I'm looking for some help with an issue I'm having with our ProductCart.

The situation is - under email settings -> Store Manager, I've assigned it
to our sales email address. (sales@example.com) However, that affects
our contact.asp page. Ideally, I am looking for a way to get the
contact.asp page to send to our info email address (info@example.com),
yet still receive New Order Confirmations to sales@example.com.

Does anyone have a solution or any guidance?

I greatly appreciate it.



Replies:
Posted By: Greg Dinger
Date Posted: 28-March-2008 at 12:23am

Well, it's a custom code solution that I would propose, but you just go find the common mail-handler script that physically sends the mail and override the behaviour.

This code is in the upper section of contact.asp:
MsgBody=MsgBody & dictLanguage.Item(Session("language")&"_Contact_5") & vbcrlf & vbcrlf
MsgBody=MsgBody & Session("pcSFMsgBody")
MsgBody=replace(MsgBody,"''","'")
  
call sendmail (CustName,CustEmail,scFrmEmail,MsgTitle,MsgBody)

There is logic that retrieves the value of "scFrmEmail" which occurs in the scripting above that block of code.

There are more elegant solutions (like adding another address field to the admin page and database), but if you were to place the following statement directly above the sendmail command, it's likely to get the job done.  I've not actually tested this so there may be a hiccup that needs to be dealt with, but that is where I'd consider starting if faced with the requirement.

scFrmEmail = " mailto:someotheraddress@yourdomain.com - someotheraddress@yourdomain.com "



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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: kimmyecoist
Date Posted: 28-March-2008 at 10:12am
Hi Greg -

Thank you for your response!
I looked at my code in contact.asp and it did not have
MsgBody=MsgBody &
dictLanguage.Item(Session("language")&"_Contact_5") & vbcrlf & vbcrlf
MsgBody=MsgBody & Session("pcSFMsgBody")
MsgBody=replace(MsgBody,"''","'")

but it did have
call sendmail (CustName,CustEmail,scFrmEmail,MsgTitle,MsgBody)

so I put in the
scFrmEmail = "someotheraddress@yourdomain.com"
as you suggested; however, it did not do anything.

So I went into the sendmail.asp and changed
the rcpt = "info@ecoist.com"

That worked in sending the contact information form to the intended
address; however, it also sent any confirmation emails to the customers
to "info@ecoist.com"

Any suggestions to aid the problem?


Posted By: Greg Dinger
Date Posted: 28-March-2008 at 10:29am

Well, it looks like I was referring to an altered contact.asp script, but to accomplish what you want you cannot be editing the sendmail script.  You are trying to alter the behavior of the contact.asp page and that's were you need to make this edit.

MsgBody=MsgBody & dictLanguage.Item(Session("language")&"_Contact_5") & vbcrlf & vbcrlf
MsgBody=MsgBody & Session("pcSFMsgBody")
MsgBody=replace(MsgBody,"''","'")
<--------------put that new line here!  
call sendmail (CustName,CustEmail,scFrmEmail,MsgTitle,MsgBody)



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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: Greg Dinger
Date Posted: 28-March-2008 at 10:31am

Now that I compare the two block of text I don't think I was looking at altered code.  Looks like you just didn't find what I was directing you to.

Open the file in a text editor, and search (find if you are using notepad) for the sendmail.asp reference in the page.



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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: kimmyecoist
Date Posted: 28-March-2008 at 10:45am
I think it may be altered code you're referring to, because it does not find
that block of text.

I do have the

call sendmail (CustName,CustEmail,scFrmEmail,MsgTitle,MsgBody)

so I put
scFrmEmail = "info@ecoist.com"
before it and it did not work. I then put that block of text with the
scFrmEmail line, and it still is sending to sales@ecoist.com.




Posted By: Greg Dinger
Date Posted: 28-March-2008 at 10:52am

From my initial post:

I've not actually tested this so there may be a hiccup that needs to be dealt with, but that is where I'd consider starting if faced with the requirement.

Unless you have the skills to debug and identify the issue, you may need a programmer to assist you.



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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: Hamish
Date Posted: 28-March-2008 at 10:55am
Hi,
    The lines Greg refers to appear in my copy of contact.asp - lines 97-101.
I'm running V3.11 - Which version of the code are you running? If you are on a different version that may be the reason you cannot find the lines.


Posted By: kimmyecoist
Date Posted: 28-March-2008 at 11:05am
We're running version 3.03, so that's why we don't have the updated
contact.asp code.




Posted By: Hamish
Date Posted: 28-March-2008 at 11:13am
OK - Your BEST option is to upgrade  !
it's worth keeping on up to date versions for both securtity and functionality. That said, if you have done much in the way of customisation then there is the overhead of re-applying the changes.
Other than that, I suspect, if you post, say, the 20 lines above the call to sendmail  then someone (Greg?   ) will be able to point you in the right direction.



Posted By: Greg Dinger
Date Posted: 28-March-2008 at 11:15am
I just looked at a 2.x store.  Contact.asp worked largely the way it does on v3 and I would have approached it the same way on that code base.  There must be something else going on here because after reviewing sendmail.asp, it really ought to work.

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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: kimmyecoist
Date Posted: 28-March-2008 at 11:32am
We have not yet updated, because of a few customizations, but we plan to
after getting our new products on the site.

In the current code I have -
                CustName=Session("pcSFFromName")    &nbs p;
           CustEmail=Session("pcSFFromEmail")
           MsgTitle=Session("pcSFMsgTitle")
           MsgBody=Session("pcSFMsgBody")
           scFrmEmail="info@ecoist.com"
           call sendmail
(CustName,CustEmail,scFrmEmail,MsgTitle,MsgBody)
           msg=dictLanguage.Item(Session("language")&"_Contact_10")

All I did was add the line of scFrmEmail="info@ecoist.com"
before the call sendmail statement.


Posted By: Greg Dinger
Date Posted: 28-March-2008 at 11:40am
Just wondering...  Did you reverse the changes you made in sendmail.asp?

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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: kimmyecoist
Date Posted: 28-March-2008 at 11:43am
Yes - we kept getting emails there were meant to be sent to the customers
in addition to the Contact Us form submissions.

I really appreciate your help btw
Thanks!



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