News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Order confirmation email sent before PayPal payment processed

Started by davidm, May 01, 2008, 12:57:41 PM

Previous topic - Next topic

sanjeewasam

Thanks all for the great work. I cannot see the final version posted by Datanoic with his post dated February 10, 2009, 04:13:32 am.
#####UPDATE#####

Due to sleepless nights and far too much coffee I've just noticed that I posted the wrong version on here.  The original zip had my version in it with a load of hacks.  This will break it for those without them.  So the new attachment has them without them and will work.  Really sorry!

###########
could u please direct me to the correct place
thank you!

Datatonic

Hi there, I updated the original post, with the new version.  So grab it from there.

sanjeewasam

Thank Dataonic. I checked your solution with my live site and it works well. Thanks again. I also changed the order type descriptions within virtuemart so it is much clear to customers. for instance "pending"-> "Accepted subject to payment", "confirmed"-> "payment confirmed" and "shipped"-> "order shipped/electronically delivered".

This is a cosmetic change but I guess it gives more clarity to a third party.

Was wondering whether someone could tell me where in ps_order.php the actual order printing begins. if we could add a conditional statement to check whether order status is P (pending) and make the output for status red and bold "pending" it would be clearly visible to anyone. Then I guess this is as good as any solution.

sanjeewasam

I managed to achieve what I wanted by making changes to /components/com_virtuemart/themes/default/templates/order_emails/invoice_email.tpl.php and order_email.tpl.php and /administrator/components/com_virtuemart/languages/common/english.php files. If anyone wants to know please let me know

lwheelr

Is there a way to suppress the initial Pending email for PayPal only?

Thanks,

Laura

Datatonic


DisgruntledGoat

I've been looking for a similar solution, so thanks for the hack!

Question: will this (with some extra coding on my part) allow for sending a separate email to another address as an order? The site I am developing requires an order email sent to a depot for the actual product to be sent out. The email can be the same format as for the admin, but the depot address may be different (depending on the location they picked). If you have any tips (which files to hack etc) I'd really appreciate it!

Datatonic

I'm at Joomla Day UK this weekend, I'll have a look when I'm back home Monday.  I'll need this myself soon, so I'm sure I can expand it to encompass this.  Will let you know mid next week.

Cheers

Ro.

lwheelr

The customer is receiving an email that is sent if the order is incomplete - I'm assuming that it is an order status email. My clients would like to suppress that email so that nothing is sent unless the payment is completed.

Laura

DisgruntledGoat

Yeah I've just uploaded the hack, and discovered that the emails are still being sent before the paypal payment is taken. I'll see if I can figure it out...

Datatonic

Yes they are pretty easy to supress - the call to the purchase order is in ps_checkout.php and the call to the pending order email is in ps_order.php.

Got my head firmly stuck in Joomla this weekend - will write up how to do it properly next week.

Ro.

lwheelr

Would appreciate that - because while I understand the theory of coding, and I can find and edit code if I know what I'm looking for, I can't read it or write it to save my life! :)

Laura

demsey

Hi

Datatonic thanks for that solution.

I have a few questions.

At this time I am testing VM 1.1.3 and Joomla 1.5.9 Everything looks all right but I had a few small problems.

- When I am receiving email after order, my links to specific orders were wrong. Instead of full link with domain address my link started from index.php or /administrator/index.php....

I have no idea why. What I did is:

That two lines in ps_send_invoice.php line 1803-4:
$shopper_order_link = $sess->url( SECUREURL ."index.php?page=account.order_details&order_id=$order_id", true, false );
$vendor_order_link = $sess->url( SECUREURL ."index2.php?page=order.order_print&order_id=$order_id&pshop_mode=admin", true, false );


Changed:
$shopper_order_link = $sess->url( SECUREURL ."index.php?page=account.order_details&order_id=$order_id", true, false, true);
        $vendor_order_link = $sess->url( SECUREURL ."http://www.mydomain.com/administrator/index2.php?page=order.order_print&order_id=$order_id&pshop_mode=admin", true, false, true );


And now everything is working correctly. I am receiving email with correct links. My question is why I have to do this. You don't have that problem.

My second question is: After order registered user is receiving three emails:
- Order with Pending status
- Invoice with Confirmed status
- and info about changed status from Pending to Confirmed

but non-registered user is receiving only one email:
- Info about changed status from Pending to Confirmed

I would like to send same emails to any type of user.

And last question is: When I try refund some orders from PayPal in my system status has been changed to Cancelled. I prefer to call that Refund. Just tell me where is the class or function responsible for that.

I hope you can help me to resolve those small problems.

Demsey

lwheelr

Anyone want to take pity on a Desperate web tech from Wyoming?

I really need a clue on how to suppress the email notice that goes out before the order is complete.

I have no idea what I'm looking for, or in which file. I have four websites that need it, and no budget for a coder.

Any help deeply appreciated.

Laura

jaddi01

Quote from: demsey on March 16, 2009, 09:41:51 AM
...
And now everything is working correctly. I am receiving email with correct links. My question is why I have to do this. You don't have that problem.

My second question is: After order registered user is receiving three emails:
- Order with Pending status
- Invoice with Confirmed status
- and info about changed status from Pending to Confirmed

but non-registered user is receiving only one email:
- Info about changed status from Pending to Confirmed

I would like to send same emails to any type of user

Demsey

I'd like to know how to stop the order status email from going out automatically.  I'm also getting the 3 mentioned above.  Any ideas?

Thanks

John