Is there not a template for the confirmation email?

General ShopSite user discussion

Is there not a template for the confirmation email?

Postby kirbyglad » Mon Dec 28, 2009 9:39 am

I need to send an attachment with the confirmation email. The name of the attachement file will be different for each order.

I suppose I could use the Order API but if so I need to pass a parameter to the CGI that is calculated by javascript, not one of the ShopCart Variables, and I'm not sure I can do this with the setup screen provided.
kirbyglad
 
Posts: 10
Joined: Mon Dec 07, 2009 2:21 pm
Location: Orem, Utah

Postby Jim » Mon Dec 28, 2009 10:48 am

There is no built in function to allow attachments to confirmation emails. So you would need to use the OrderAPI functionality and send the email from your app. I don't know what you need to pass from one cgi to the other but you would probably need to put it in a cookie and then read that cookie from your app.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Cookie Confusion

Postby kirbyglad » Mon Dec 28, 2009 12:56 pm

Maybe I'm confused - the order API script is called and runs on the server, but the cookie would be on the host, so how would I get it?

What am I missing?
kirbyglad
 
Posts: 10
Joined: Mon Dec 07, 2009 2:21 pm
Location: Orem, Utah

Postby robm » Mon Dec 28, 2009 1:39 pm

You can read cookies with PHP or perl code, so you can set a cookie in a cusotmer's browser, and then read it via the API. The only requirement is the domain you set the cookie on must match the domain of the thank you page.

PHP read cookies:
http://www.w3schools.com/PHP/php_cookies.asp

Perl read cookies:
http://devdaily.com/perl/edu/articles/pl010012/
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Postby PatG » Thu Feb 18, 2010 12:31 pm

you can also post and read cookies using javascript, which you said you're already using in your code.

in the html email, the code from the thankyou email template runs on the user's machine, where the cookie resides.

i use php for some dynamic features on my pages and had to switch it over to javascript for the cart pages, which included reading cookies and such. i didn't happen to use any dynamic features in the thankyou email, but i have inspected the properties of the email and can see the html code that is embedded in the emails message. a quick test might tell you javascriot there would function properly.

see the last panel here for the template code, where you can customize the html (with javascript):
http://shopsite.com/templates/cookbook/ ... cart.shtml
PatG
 
Posts: 34
Joined: Sat Feb 06, 2010 1:03 pm
Location: Winter Park, FL


Return to User Forum

Who is online

Users browsing this forum: No registered users and 127 guests