Author |
Topic |
|
FolkDude
Starting Member
USA
10 Posts |
Posted - January 08 2013 : 15:06:28
|
My client, using VP-ASP 7.0, wants to send nicely formatted HTML order confirmation emails to his customers. He's given me a mockup showing what he wants, and I've almost got everything figured out, with one exception: he wants the list of ordered items to include images of the items, with each image linked to the item's shopexid page on the website.
I think the problem is that the imageurl is not included in the oitems table, and therefore I can't include it in the email template.
Do I need to modify the structure of the oitems table to include the imageurl field? If so, how do I do that? Am I on the right track here? Or is there another way to accomplish what I'm trying to do?
Otto
FolkDude Creative Services - www.folkdude.com |
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - January 10 2013 : 11:46:50
|
Hi Otto,
sounds as though it would be relatively easy but unfortunately it's not. You would have to add the image field to oitems and you would have to add code to bring the image link right through the cart pages and the order processing, checkout, email formatting etc. A custom job for the support guys if it's really necessary, which in my opinion it's not. Your client's customers don't need product images on the order confimation email. As long as the info is clear, accurate and easy to read, that is all that is needed.
Regards, Carrol www.deanston-electrical.co.uk |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - January 10 2013 : 16:57:30
|
We've got a packing slip (confirmation email for customers, and/or merchants, and the order print screens) which optionally uses thumbnails: PackingSlip for VP-ASP - BYZ001: http://www.bigyellowkey.com/packing-slip-for-vpasp-from-bigyellowzone-byz001.asp
When it comes to adding thumbnails, the basic idea we used was that we created a new template field which had a catalogid argument, and then used that in the oitems email to find the corresponding value for the oitems.catalogid's products.cimageurl, and then it automatically checks/adds the full site url at the front if it's not already there, and then outputs it to the template processing stuff.
ie we don't store/use extra data, we just use the existing data to find the url using oitems and products, and call that function as a template field in the oitems templates.
Remember that for emails, the url needs to include the full site url (ie "http://www......" etc, not just the raw image url), hence the template field turns a virtual or relative image url that's in cimageurl, and outputs it as a full site url to the template. so, again, you don't need to change the cimageurl data to add the full site to the front, instead you do that on the template function; no data is effected/changed in any way from standard vpasp.
Simon Barnaby Developer [email protected] www.BigYellowZone.com www.BigYellowKey.com Follow us on Twitter: http://twitter.com/bigyellowzone Web Design, Online Marketing and VPASP addons |
Edited by - devshb on January 10 2013 17:04:50 |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - January 11 2013 : 06:47:24
|
I had a feeling BYZ might have done this already :)
Any word on our Quick Order issue Simon? or did my email get blocked again?
Cheers,
Carrol www.deanston-electrical.co.uk |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
|
bradrob
Starting Member
United Kingdom
14 Posts |
Posted - April 10 2013 : 06:19:19
|
Hi FolkDude
Just thought i would reply to try and help any other looking at how to do this modification.
what i have one in the past is under sub FormatItemDetails in shopformatorder.asp i have created an sql query which will return my product information for the catalogid of the item in the cart.
so you would use something like the following
CatalogId=items("CatalogId")
tempsql="* from products where catalogid ="&CatalogId
Set ProdInfo = Server.CreateObject("ADODB.Recordset")
ProdInfo.open tempsql, dbc, adopenkeyset, adlockoptimistic
if (ProdInfo.BOF and ProdInfo.EOF) then
else
image = ProdInfo("cimageurl")
end if
now that you have the url for the image in the variable you need to append this to the end of the website address by either hard coding the website domain to the beginning of the file or requesting the xmysite system setting, you can then use this string further down the file in the formatting section to insert a html <img> using the new variable as the source.
I know i shouldn''t really be requesting * from the database when i only need one field but i use this function for other information too, but you can change this to the field that you want to request such as cimageurl.
Thanks Brad
quote: Originally posted by FolkDude
My client, using VP-ASP 7.0, wants to send nicely formatted HTML order confirmation emails to his customers. He''s given me a mockup showing what he wants, and I''ve almost got everything figured out, with one exception: he wants the list of ordered items to include images of the items, with each image linked to the item''s shopexid page on the website.
I think the problem is that the imageurl is not included in the oitems table, and therefore I can''t include it in the email template.
Do I need to modify the structure of the oitems table to include the imageurl field? If so, how do I do that? Am I on the right track here? Or is there another way to accomplish what I''m trying to do?
Otto
FolkDude Creative Services - www.folkdude.com
------------------------------------------------ You can''t wait for inspiration, you have to go after it with a club. - Jack London
http://designersite.info http://twopenneth.co.uk |
Edited by - bradrob on April 10 2013 06:23:42 |
|
|
|
Topic |
|