Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Email Problems in Purchase Without Account


kelagedart

Recommended Posts

Posted

I am using the Purchase Without Account addon in OSC 2.2rc2.

 

 

I am looking for a method to email me whenever a customer has started the checkout process.

 

Due wide variations in postage I am giving customers the option of emailing me for a Paypal invoice so that i can customize the postage for the exact item (books) as well as provide discounts .

 

I have also added 'INVOICE' as a payment module.

 

The Pending Order Email addon works - but *ONLY* if the customer creates an account.

Which is what i am trying to avoid. .

 

in catalog/checkout_confirmation.php

// lets start the pending email

if ($order->info['payment_method'] == "Paypal") {

require(DIR_WS_FUNCTIONS . 'pending_order_email.php');

}

Is added to the code.

 

I have removed the IF clause so it should work with all payment methods.

 

If I put the line in CHECKOUT_SUCCESS.PHP it will generate an error.

 

Perhaps another addon can do this better if I cant get the pending order email addon to work.

What i basically need is something that the customer can click on as part of the checkout process, and just email me with the backet contents and their email address, so that i can apply a discount, and give actual shipping rates, especially for International and Priority which simply cannot be automated for multiple orders without *somebody* losing alot of money.

Posted

@@kelagedart

 

The purpose of the PWA contribution is that the customers information is NEVER posted to the database. What you want to do REQUIRES the information to be posted. You can't have it both ways.

 

 

 

 

Chris

  • 2 weeks later...
Posted

Actually, I am only looking for a simple method for which a customer can email me for a Paypal invoice with no other info other than email and item number. I'd prefer it be done with HTML and avoid the database.

 

in lieu of that i just need SOMETHING to email me when *anybody* is in the checkout process.

Posted

thats the key:

What would be the coding to get that to work?

 

1. Something, anyything to autogenerate an email to me when someone enters checkpout or reaches a certain point in it.

and/or

2. i can create HTML headers in a simple email link but I do not know how to yank the SKU of the intem(s) in their shopping cart out and into the subject or body of the message. .

 

One of the problems also i am having is that also when they DO go direct to paypal checkout that I am not receiving mails from them. paypal emails have always been a major problem and I do NOT want to use gmail for them. I cant survive without spam filtering here, and unfortunately services like spamassassin hate paypal.

 

So i would be happy with just the basics for autogenerating an email wherver anyone enters checkout.

I would be even happier if I can use the 'request invoice' module without having the user sign in.

Utter joy If i can have the user click an HTML link and have the SKU inserted into the message.

Posted

Hi

 

This maybe get you started

 

In checkout_shipping.php find

 

require(DIR_WS_CLASSES . 'order.php');
$order = new order;

 

Add in after that

//let's try and add a wee email here using the $order-> stuff
$new_email_content=$order->customer['firstname'] . ' ' . $order->customer['lastname'];
$new_email_content.='/n';
$new_email_content.=$order->customer['email_address'];
$new_email_content.='/n';
$new_email_content.='is currently at the shipping page.';
$new_email_content.='/n';
$new_email_content.='Their cart consists of:';
$new_email_content.='/n';
//next bit pinched from checkout_process.php
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '/n';
}
//OK now bung that into the string
$new_email_content.=$products_ordered;
//now sent that someplace again stolen from checkout_process
// send emails to other people
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'New customer in the checkout', $new_email_content, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
//end

 

Most of that is lifted from the checkout_process file - it does not include any product attributes or shipping choices (move it to checkout_payment or checkout_confirmation and you could code those in too) and I've not tested the actual tep_mail as this laptop is not running a mail server.

 

You need to have your email address set in 'send extra order emails to' in the admin>configuration.

 

TTFN

 

Bob

Posted

Many , many thanks.

I'm sure that code will be helpful to many, especially as Paypal notices are notorios for being spammed.....

 

In testing, I found a bug that wasnt there last week though.

(and its NOT from your code!)

 

Somehow I can email directly OK from OSC to customer.

 

But... Any site generated emails get putzed up by having websitewelcome

[email protected]

 

Where it should be

 

[email protected]

 

 

Must take some time tomorrow and grep all the dirs for that nasty websitewelcome string....

Posted

The bug was temporary, and generated by hostgator....

 

The added code works great!!!

i even added the country so i can check the postal rates.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...