Order Confirmation after Payment

Order Confirmation after Payment

Postby admin » Thu Apr 28, 2011 12:24 pm

NOTE: Our only method of payment is Paypal. We have a Paypal business account.

1. When a customer fills out the order and hits submit, it takes them to Paypal. Currently, it sends the customer an email at this point for their sale...we don't want that.
2. The customer then does their thing with Paypal and the payment is made.

What we want is a set up so that they don't get an email until they compete their paypal payment and it is confirmed as a successful payment.

I see all the configuration stuff in the One Page Checkout piece, but I don't understand what I need to be clicking and enabling. Can you help me with this?

Thank you,


Chris


Hello Chris,
you need to do this:
- enable extended classes in virtuemart configuration right under "Generally Prevent SSL"
- go to the configurator's Email tab and click install ps_order.php as extended class (you cannot install it into main class in VM dir as this file calls your original functions and does not work standalone)
- tick [EMAIL_AFTER]: if you want to send your emails only after the payment
- tick [EMAIL_ONLY_POK]: for sending order confirmation/summary email with status confirmed, ALL OTHER STATUSES WILL BE IGNORED AND THE EMAIL WILL NOT BE SENT
- test with a live order (create a small product of a price of 0.01 or similarly and buy it with a real paypal account)

This cannot be checked:
- [NOT RECOMMENDED] as this would you use original ps_checkout->email_receipt function which is buggy

The bottom section of the emails tab is not implemented yet:
Save order and send emails ONLY AFTER PAYMENT :: NOT IMPLEMENTED YET

Let us know if any problems,
Regards,
Stan Scholtz
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Order Confirmation after Payment

Postby ta@.....dk » Fri Jun 10, 2011 10:28 am

Hi Stan
We are working on a VM shop for one of our many clients, but the client dont want mail to be sent if order is not confirmed.
I have installed OPC and followed your detailed guide for disabling all other mail confirmation than for "confirmed" order...but it doesnt work at all...please help.
We are using VM vers. 1.1.6 on Joomla 1.5.22 and we are using the EPAY payment modules as payment-method...
This is a bit urgent, so I hope you can assist us...

PS. we have modyfied VM a bit, so that orders will be sent to different mail-addresses according to shipping method (the client sells bagels, and they have 3 shop, so they wanted the order mail to be redirected to the actual shop)

/administrator/components/com_virtuemart/classes/ps_checkout.php

Line 2236:

/* MAIL HACK. */
$ship_id_splt = explode("|", $ship_method_id);

switch($ship_id_splt[count($ship_id_splt)-1]) {
case 1: $vendor_email = "mail1@mail.dk"; break;
case 2: $vendor_email = "mail2@mail.dk"; break;
case 3: $vendor_email = "mail3@mail.dk"; break;
}


dont know if this can affect your mod...???

Kind Regards
Thomas Ahrnberg
http://www.networkmedia.dk
ta@.....dk
 
Posts: 1
Joined: Fri Jun 10, 2011 10:15 am

Re: Order Confirmation after Payment

Postby admin » Fri Jun 10, 2011 7:06 pm

Email sending is managed (within OPC) in addOrder function in ps_onepage or in add function in ps_checkout (when outside OPC). The actual function to send the confirmation email is email_receipt function in ps_checkout, which is also overriden by ps_onepage when OPC is installed and [NOT RECOMMEDED] checkbox in the configurator is NOT CHECKED.

To send emails after order confirmation i create ps_order override which can be installed into extended classes structure (click install ps_order in the configurator). This will catch ps_order->order_update function and if it has a certain status it will send the email with ps_checkout->email_receipt function.

For all of this to work automatially you have to have extended classes turned on within VM config and ps_order at the right place. Don't try to copy ps_order.php into your classes directory as it will not work standalone (it uses calls to original VM functions).

I can't help more at the moment, but please write me an email at info@rupostel.sk and i will be avaiable online from this sunday.

Best Regards,
Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 1.1.x