View Full Version : JAVA for e mailing when product purchased
alexrpaul
15-Jan-2004, 01:32 PM
Hi all,
We manufacture and retail sports kit. on the side we also help the sport of fencing (with swords) by organising competitions. What i would like to do is set up a system so that we can have a section with 30 or so "products" the products would be the entrance to a competition. Once ordered we would send an invoice to the customer (competition entrant) we would also like the system to send an e mail copy of the invoice or packing list to the competition organiser. This e mail address would have to be different for each of the 30 or so competition "products". I hope this is clear, if not please ask for more info.
I have spoken to the helpdesk who suggested it would need a special java app and to see if anyone here could help give me an idea of who could do it/how much it might cost.
Thanks in advance.
Alex Paul
NormanRouxel
15-Jan-2004, 01:49 PM
Heyla Alex,
Norman the epeeist here.
This can probably be done automatically at the order time by sending an extra copy of the customer e-mail to the competition organiser. You could have different e-mail addresses by hiding them in the Extended Info Field of each relevant product.
As the e-mail is being generated a patch could extract each address and send the copy to the generated list.
That e-mail doesn't contain credit card details so is pretty safe.
Norman
alexrpaul
15-Jan-2004, 02:35 PM
Hi Norman,
Good to hear from you again. Hope that things are going well. Still Skiing lots I hope!
This sounds like a fairly neat solution as it would allow us to change the e mail addresses really easily ourselves.
Have you (or anyone else on the forums) any idea how I could go about getting this done?
Cheers,
Alex
Hi Alex,
If you do this online then your competition organisor would be sent emails for people that haven't paid. You could however do it offline by having a utility to email complete orders for specified items to a third party. As a workaround you could use the email option in quick orders to email orders to someone at Leon Paul who could then forward them onto the correct person.
Regards,
alexrpaul
15-Jan-2004, 03:54 PM
Hi Jan,
I don't think that we are that worried about wether they have actually paid. About 99% of our orders go through first time fine and for the ones that are refused we can always e mail the organiser and tell them to strike them off the list. What I am most worried about is not having to do any additional work!!! I think that an automated system that we occasionally had to correct would provide me with less to worry about.
If it was possible to do then I would be very interested.
Alex
NormanRouxel
15-Jan-2004, 03:57 PM
As Jan says, the supplier would get the e-mail when the customer places the order. Should you then deny that order (bad CCard, etc) what would happen?
As to the code involved I don't think it's too big a job. I'll have a look at its feasibility once you consider the above.
Norman
Although having read Norman's solution properly this sounds like quite a neat solution.
Regards,
NormanRouxel
15-Jan-2004, 04:08 PM
Just let all the entries go automatically. And then when the draw is made, check whether the customer was in fact a valid purchaser. If not, stick your hand in the hat again.
Norman
alexrpaul
15-Jan-2004, 04:11 PM
Not too woried about having to deny someone. Most fencers are minted and we rarely get declined cards!! If we do get one denyed then we will e mail the organiser manually and let them know that they need to be removed.
Norman, don't do any work on this as really I was just putting the feelers out to see if it could be done with actinic. I should have learnt by now that EVERYTHING can be done using it!!
It is good to know that you seem to think it would not be too hard.
Alex
NormanRouxel
15-Jan-2004, 04:16 PM
OK. Let me know if you need it and I'll have another look. I might anyway if I'm feeling insomniac one evening.
Norman
NormanRouxel
15-Jan-2004, 05:19 PM
It was easy. Did it while watching Neighbours.
V6 - Emailing a Supplier when a product is purchased (tested with 6.1.3)
SETUP
Go to Advanced / Custom Properties and create a Customvar called SUPPLIEREMAIL
Backup OrderScript.pl (your Site1 version). Now open OrderScript.pl in a
text editor (not a word processor - see www.editpadlite.com for one).
Search for "# Add components excluded" (without the quotes) and you'll find a block
of code like below:-
#
# Add components excluded
#
foreach $pComponent (@aComponentsSeparated)
{
#
# Add component line
Immediately above the
#
# Add components excluded
#
stick this bit of code
##### Start - Norman trying for Custom Property Email Address Patch
if (length $$pProduct{CUSTOMVARS}{SUPPLIEREMAIL} > 0)
{
push(@$paRecipients, $$pProduct{CUSTOMVARS}{SUPPLIEREMAIL});
}
##### End - Norman trying for Custom Property Email Address Patch
Update your site and test to destruction. Remember that Actinic don't
support patched scripts and you'll have to re-do this patch if you update or re-install Actinic.
OPERATION
For each product that you want to notify the supplier:-
Open the Product Details. Choose Properties. Click the "+" sign and select SUPPLIEREMAIL.
Set its Value to the email adrress.
(If using Business clear Searchable and check Use as CustomVar)
That's that.
Remember that the entire customer e-mail will be sent to all such suppliers so don't use this if you don't want them to know about other products being ordered.
Norman
Show off :-)
Hey this would be a poor mans drop shipping as well.
Cheers,
NormanRouxel
15-Jan-2004, 11:56 PM
Jan. I WAS in a hurry. "Home and Away" was on at 6 and that's important!
And so is Alex. I knew his granddad, dad and uncles in my fencing days. We were in the same team ocasionally but most of the time I was in the Scottish team doing our best to duff his lot up.
Norman
alexrpaul
16-Jan-2004, 11:44 AM
You the man Norman :)
Thanks for that,
I will give it a go as soon as I get a minute (thims take me a little longer than they seem to take you!)
Alex
alexrpaul
16-Jan-2004, 02:35 PM
Works like a charm.
Thanks again Norman
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.