Jump to content

Checkout Flow: Order Is Generated Before Payment?


Guest philoye

Recommended Posts

Guest philoye

I've been building my skin for a while and I just now discovered this. The check out flow goes like this:

1. Shopping cart, user clicks "checkout"

2. Login (enter username + password) or click "Register"

3. User registers (skip this step if user is registered)

4. Shopping cart now has shipping options, billing address, and shipping address. User clicks "Place order"

[ At this point, the order is created and a "Order Acknowledged" email is sent to the customer and to the admin. ]

5. Payment screen offers a list of list of payment options (even if there is only one) and a comments box. User selects method and clicks "Make Payment".

6. User is sent to gateway page, internal or external, depending on the gateway. User enters payment info.

7. A confirmation page is shown.

[ At this point, the order is marked as payment received and another email is sent. ]

I have a a few questions:

Why is the order created before payment is received?

Any number of things can occur which prevent the user from making payment. This results in abandoned orders, rather than abandoned carts. An order should not be considered an "order" until payment has been made.

Why is payment split over two steps?

The user clicks "Place Order", then gets a page which lists payment options, and then the user goes to the payment page. This happens even if there is only one payment method configured? Is there a way to skip this step is this latter case?

Is it possible to list the payment methods on Step 4 (the logged in version of the cart)? Perhaps hard code a link(s) to the final payment page? This would enable the payment screen to be a single step.

And preferably the order wouldn't be created until AFTER this step.

The customer receives two emails during checkout

The standard flow, assuming they make it through checkout, results in two emails to the customer when placing an order. Is there a way to suppress the acknowledgement email? And instead send a single email after payment is received?

This flow seems to follow the eBay checkout model, rather than the Amazon model. The eBay flow only works because bidding or buy it now is a binding agreement. You can complete payment as your leisure, but you must do it. Amazon, would seem to be the appropriate model to follow.

I would love to get some insight from either the developer or any long standing CC users and what, if anything, can be done about it.

Link to comment
Share on other sites

Guest EverythingWeb

...And as this is a Version 4 topic, I'd also add that there is a feature in V4 which will automatically cancel orders after X amount of secs/minutes/hours/days/weeks that it was placed, if no payment has been received.

(You set the time limit in General Settings)

Also, on a more technical note, I believe the reason it's generated 'earlier' in the flow is a) for the Alternative checkouts (PayPal & Google) and because the logic in v3 didn't allow people to 'go back and pay' if they couldn't pay first time time. This new version allows the checkout process to be opened up at the payment process stage, in the future.

Link to comment
Share on other sites

Guest philoye

The order is stored as Pending once the customer is transferred to the payment gateway, this ensures that if anything goes wrong that you as the store owner are able to check if the payment was received. More details can be found at http://www.cubecart.com/site/forums/index....showtopic=29387

That link is helpful, but frankly, I don't buy it. All those options presume that the customer believes that he/she has placed an order. Who would? And whose computer crashes so much anyway?

Again, I look to Amazon as the gold standard. Payment is but a single step, you get a chance to review your order after payment has been entered, billto/shipto, etc. Then you click "Place Order".

Also, on a more technical note, I believe the reason it's generated 'earlier' in the flow is a) for the Alternative checkouts (PayPal & Google) and because the logic in v3 didn't allow people to 'go back and pay' if they couldn't pay first time time. This new version allows the checkout process to be opened up at the payment process stage, in the future.

I guess the design of CC is biased towards PayPal. For a normal, integrated payment gateway, this flow is needless long and confusing.

Link to comment
Share on other sites

  • 2 months later...
Guest nhankla

I have been looking for a way to skip this step.

It is a very confusing and a little archaic if you ask me. How often has my comp crashed while making an order in the last year? zero maybe once.

As for my client they want this removed instantly because it is confusing and also kind of bad business. We did a very soft launch of the store and so far we have severla pending orders and it looks like these people closed out the window/hit back before they dropped the info in. So now we have all these useless emails getting sent out aggravating not only the admins of the store but i'm also guessing the potential customer who was debating to buy something or not. The store is tied to authorize.net so the payment gateway has sent back confirmation in under 5 min usually. I have moved the remove pending orders to under 15 min but that still sends out emails to the admins and potential clients reminding them that didnt just make a sale/purchase.

Is there anyway to bypass this pending status or at least remove the email confirms?

If worst comes to worse ill delve into the core and remove the send options.

Thanks

Link to comment
Share on other sites

You cannot compare CubeCart or ANY user-configured e-commerce package to Amazon, NewEgg, TigerDirect, etc. The difference is the multitude of shipping configurations and the multitude of payment processors. These things require added flexibility.

If Devellion could specify that you ONLY do things one way and that was that, then we could really tighten up the entire process because there would never be variety that would have to be dealt with. You could do most everything on one or two screens if you wanted to. But how many people do you think would complain about that?

Face it, there is NO WAY to make everybody happy. And no matter what, functionality must trump personal preference if the latter would complicate and/or limit the flexibility for others.

:errm:

Link to comment
Share on other sites

Guest nhankla

It would be amazing if there was a hack to make it so an email wasnt sent out or just point me the right direction on how to turn off the pending email.

Thank you in advance

Link to comment
Share on other sites

Guest nhankla

Ok so i found out where these emails are being sent if anyone else needs to stop the pending emails from getting sent out.

it is in the file classes/orders.php

line 669 sends email to admin

$mail->send(array($config['masterEmail']), $config['mailMethod']);

i commented it out to

##$mail->send(array($config['masterEmail']), $config['mailMethod']);

and 687 gets sent to customer

$mail->send(array($this->orderSum['email']), $config['mailMethod']);

commented it out to

##$mail->send(array($this->orderSum['email']), $config['mailMethod']);

hope that helps someone

admins

will this hinder anything else besides pending emails?

thanks

Link to comment
Share on other sites

Guest mhilliard

Ok so i found out where these emails are being sent if anyone else needs to stop the pending emails from getting sent out.

it is in the file classes/orders.php

line 669 sends email to admin

$mail->send(array($config['masterEmail']), $config['mailMethod']);

i commented it out to

##$mail->send(array($config['masterEmail']), $config['mailMethod']);

and 687 gets sent to customer

$mail->send(array($this->orderSum['email']), $config['mailMethod']);

commented it out to

##$mail->send(array($this->orderSum['email']), $config['mailMethod']);

hope that helps someone

admins

will this hinder anything else besides pending emails?

thanks

I want to be sure I'm looking in the right place... I've opened classes/cart/order.php but only have 574 lines of code in the document. I don't have the same path or document you're using it would seem... Can you shed light?

Link to comment
Share on other sites

Guest nhankla

the one i have has

691 according to dreamweaver

are you in Cubecart 4?

The path for mine is

classes/cart/order.php

the full code base for the area that i changed was

## email to storekeeper

if ($config['disable_alert_email'] != true) {

$mail = new htmlMimeMail();

$macroArray = array(

"CUSTOMER_NAME" => $this->orderSum['name'],

"ORDER_ID" => $this->orderSum['cart_order_id'],

"ADMIN_ORDER_URL" => $glob['storeURL']."/".$glob['adminFile']."?_g=orders/orderBuilder&edit=".$this->orderSum['cart_order_id'],

"SENDER_ID" => get_ip_address(),

);

$text = macroSub($lang['email']['admin_pending_order_body'],$macroArray);

unset($macroArray);

$mail->setText($text);

$mail->setReturnPath($config['masterEmail']);

$mail->setFrom($this->orderSum['name'].' <'.$this->orderSum['email'].'>');

$mail->setSubject(macroSub($lang['email']['admin_pending_order_subject'],array("ORDER_ID" => $this->orderSum['cart_order_id'])));

$mail->setHeader('X-Mailer', 'CubeCart Mailer');

##$mail->send(array($config['masterEmail']), $config['mailMethod']);

}

## email to customer

$mail = new htmlMimeMail();

$macroArray = array(

"CUSTOMER_NAME" => $this->orderSum['name'],

"ORDER_ID" => $this->orderSum['cart_order_id'],

"ORDER_URL" => $glob['storeURL']."/index.php?_g=co&_a=viewOrder&cart_order_id=".$this->orderSum['cart_order_id']

);

$text = macroSub($lang['email']['order_acknowledgement_body'],$macroArray);

unset($macroArray);

$mail->setText($text);

$mail->setReturnPath($this->orderSum['email']);

$mail->setFrom($config['masterName'].' <'.$config['masterEmail'].'>');

$mail->setSubject(macroSub($lang['email']['order_acknowledgement_subject'],array("ORDER_ID" => $this->orderSum['cart_order_id'])));

$mail->setHeader('X-Mailer', 'CubeCart Mailer');

##$mail->send(array($this->orderSum['email']), $config['mailMethod']);

you can see the two lines i commented out

Hope this helps

Link to comment
Share on other sites

  • 2 weeks later...
Guest philoye

You cannot compare CubeCart or ANY user-configured e-commerce package to Amazon, NewEgg, TigerDirect, etc. The difference is the multitude of shipping configurations and the multitude of payment processors. These things require added flexibility.

If Devellion could specify that you ONLY do things one way and that was that, then we could really tighten up the entire process because there would never be variety that would have to be dealt with. You could do most everything on one or two screens if you wanted to. But how many people do you think would complain about that?

Face it, there is NO WAY to make everybody happy. And no matter what, functionality must trump personal preference if the latter would complicate and/or limit the flexibility for others.

Ok, how about comparing to osCommerce, X-Cart, Zen Cart, etc.? I am aware of NO cart that has this bizarre definition of an order, nor has a separate "choose payment method" screen.

And comparing against the "big" stores is absolutely appropriate when it comes to checkout flow. I'm not asking for multiple-ship-to's or anything exotic. We're talking about a simple checkout flow which takes WAY too many steps.

What is this "functionality must trump personal preference" business? What is this great functionality that we're talking about? What is good about having payment methods on a separate screen? What is good about a new customer getting three emails during checkout? What is good about a customer "placing an order" before they've paid (when using an inline payment method)?

Of course, Devellion has made decisions that provide constraints for customisation. On the whole, they've made excellent decisions. However, no one is perfect. And when you deviate from established design patterns for how a store should work, you had better be sure you're right. And in these cases, they are not right.

I've exchanged a lot of emails with Al and Martin on this topic, so they know where I stand. I fear that it'll never change, which is a shame.

Link to comment
Share on other sites

Guest Ohhh My

I am also looking for an answer for the opening posters 2 questions. I think they are VERY valid.

#1. The confirmation order e-mail this sounds a little tricky "This email confirms that you have successfully placed a new order "

#2. Skipping of choosing payment method and linking it directly to my gateway instead of having to highlight the radio button then clicking next.

Link to comment
Share on other sites

Guest philoye

I am also looking for an answer for the opening posters 2 questions. I think they are VERY valid.

#1. The confirmation order e-mail this sounds a little tricky "This email confirms that you have successfully placed a new order "

#2. Skipping of choosing payment method and linking it directly to my gateway instead of having to highlight the radio button then clicking next.

Well, I can confirm that #1 is possible. I have hacked the core files to suppress the "pending" order email and moved the order details to the "processing" email (meaning payment received). I also suppressed emails for auto-cancelled orders (if the customer abandons their cart, getting a cancellation email would be odd). It was a non-trivial hack, but it can be done.

I haven't looked into #2 as I have two payment gateways configured (eway and paypal). The two payment steps should still be combined, but it isn't AS weird when there are two gateways.

Link to comment
Share on other sites

Guest Ohhh My

I am also looking for an answer for the opening posters 2 questions. I think they are VERY valid.

#1. The confirmation order e-mail this sounds a little tricky "This email confirms that you have successfully placed a new order "

#2. Skipping of choosing payment method and linking it directly to my gateway instead of having to highlight the radio button then clicking next.

Well, I can confirm that #1 is possible. I have hacked the core files to suppress the "pending" order email and moved the order details to the "processing" email (meaning payment received). I also suppressed emails for auto-cancelled orders (if the customer abandons their cart, getting a cancellation email would be odd). It was a non-trivial hack, but it can be done.

I haven't looked into #2 as I have two payment gateways configured (eway and paypal). The two payment steps should still be combined, but it isn't AS weird when there are two gateways.

Do you mind do the #1 hack for me? Shoot me an e-mail if you don't mind. I would really really appreciate it.

Thanks

Link to comment
Share on other sites

Guest philoye

Do you mind do the #1 hack for me? Shoot me an e-mail if you don't mind. I would really really appreciate it. [email protected]

Thanks

Alas, I'm not in the business of doing CC mods for others. However, if you are brave (and have backed up your files, you can attempt this yourself).

Simply skipping the new order email

In includes > content > gateway.inc.php (around line 280 in my file, but probably not yours)

Add this line:

$skipEmail = true; // my mod to prevent new pending order emails.




Right before:

	
$order->createOrder($orderInv, $orderSum, $skipEmail);




Disable the email when an order is auto-cancelled (i.e., an abandoned cart)

In classes > cart > order.php Look for the function called cancelOldOrders(). It is around line 477 in mine, but probably not yours.



Change this line:

	
$this->orderStatus(6, $expiredOrders[$i]['cart_order_id']);




to this:

	
$this->orderStatus(6, $expiredOrders[$i]['cart_order_id'],false,true);

Changing the "processing" and "order complete" emails to include order details

This is pretty hairy, so it isn't as simple as a one line change. Plus, I don't remember exactly what the original file had before I messed with it.

But the idea is that in classes > cart > order.php there is a function called orderStatus(). There are six cases for this function (one per order status), the bulk of which creates the emails necessary for each order status.

You can copy/move stuff from one case to another to create whichever email you want when you want. That's a bit vague, but like I said I don't remember exactly what I did.

Good luck. If you aren't comfortable making these changes, put in a request over at cubecartforums.org. I'm sure one of those guys/girls can make it happen for you.

Cheers,

p.

Link to comment
Share on other sites

Guest Ohhh My

Do you mind do the #1 hack for me? Shoot me an e-mail if you don't mind. I would really really appreciate it. [email protected]

Thanks

Alas, I'm not in the business of doing CC mods for others. However, if you are brave (and have backed up your files, you can attempt this yourself).

Simply skipping the new order email

In includes > content > gateway.inc.php (around line 280 in my file, but probably not yours)

Add this line:

$skipEmail = true; // my mod to prevent new pending order emails.




Right before:

	
$order->createOrder($orderInv, $orderSum, $skipEmail);




Disable the email when an order is auto-cancelled (i.e., an abandoned cart)

In classes > cart > order.php Look for the function called cancelOldOrders(). It is around line 477 in mine, but probably not yours.



Change this line:

	
$this->orderStatus(6, $expiredOrders[$i]['cart_order_id']);




to this:

	
$this->orderStatus(6, $expiredOrders[$i]['cart_order_id'],false,true);

Changing the "processing" and "order complete" emails to include order details

This is pretty hairy, so it isn't as simple as a one line change. Plus, I don't remember exactly what the original file had before I messed with it.

But the idea is that in classes > cart > order.php there is a function called orderStatus(). There are six cases for this function (one per order status), the bulk of which creates the emails necessary for each order status.

You can copy/move stuff from one case to another to create whichever email you want when you want. That's a bit vague, but like I said I don't remember exactly what I did.

Good luck. If you aren't comfortable making these changes, put in a request over at cubecartforums.org. I'm sure one of those guys/girls can make it happen for you.

Cheers,

p.

I'm still looking for answer for #2, on why payment is split in 2 steps. I only have 1 payment option and its annoying. Thanks.

Link to comment
Share on other sites

Guest philoye

I'm still looking for answer for #2, on why payment is split in 2 steps. I only have 1 payment option and its annoying. Thanks.

That's it? No "thank you"? Best of luck getting help from anyone else.

Link to comment
Share on other sites

Guest Ohhh My

I'm still looking for answer for #2, on why payment is split in 2 steps. I only have 1 payment option and its annoying. Thanks.

That's it? No "thank you"? Best of luck getting help from anyone else.

Sorry, didn't mean to skim over your long post of instructions.

Much appreciated on the instructions. I have passed them to my web developer to try it out on the store! =) THANK YOU!!

Link to comment
Share on other sites

Guest philoye

Sorry, didn't mean to skim over your long post of instructions.

Much appreciated on the instructions. I have passed them to my web developer to try it out on the store! =) THANK YOU!!

Cheers. If you do find a way to figure out #2 please do post back to this forum.

Link to comment
Share on other sites

Guest Ohhh My

Sorry, didn't mean to skim over your long post of instructions.

Much appreciated on the instructions. I have passed them to my web developer to try it out on the store! =) THANK YOU!!

Cheers. If you do find a way to figure out #2 please do post back to this forum.

I will. I find that posting on the forums is best to share idea's. But submitting tickets to helpdesk is the fastest way to get help on error messages or problems. This isn't a problem or an error. hahaha. Cheers!

Link to comment
Share on other sites

Guest nhankla

Hello all,

I have found a way to sudo skip the payment gateway select.

This thread has a way to make the gateway page auto select and move on.

You do get a small flash as the page loads but nothing major on a fast connection

http://www.cubecart.com/site/forums/index....showtopic=13555

Hope this helps.

I also did get the email to get sent on processing with all the information by moving the send email commands from the orders section up to the processing step in orders.php

On a side note does anyone know if there is a way to only have delivery to certain zip codes? We are doing only local delivery and I am having some major issues getting it to work properly.

Thanks

Link to comment
Share on other sites

Guest Ohhh My

Hello all,

I have found a way to sudo skip the payment gateway select.

This thread has a way to make the gateway page auto select and move on.

You do get a small flash as the page loads but nothing major on a fast connection

http://www.cubecart.com/site/forums/index....showtopic=13555

Hope this helps.

I also did get the email to get sent on processing with all the information by moving the send email commands from the orders section up to the processing step in orders.php

On a side note does anyone know if there is a way to only have delivery to certain zip codes? We are doing only local delivery and I am having some major issues getting it to work properly.

Thanks

Hey Nhankla,

Can I see your webpage to see the flash you are experiencing before I try this?

Thanks.

Link to comment
Share on other sites

Guest Ohhh My

This is a live site just so you know

https://blueprintcleanse.com/store/

thanks

wow very cool website.

Because it is live, do you mind if i register a user name and try the checkout(without entering cc info) then e-mail you afterwards to have you delete the account so that it won't confuse you and it won't be a "fake" customer? I wanted to ask first before I do this. Or if you have an account already made up I would love to use it to see(not to order.)

Thanks.

Link to comment
Share on other sites

Guest Ohhh My

Quick question I have. My store is getting ready to launch and i'm working out all the kinks.

For some reason as soon as a payment is made on my webpage it goes to "complete and shipped" instead of Processing. Any way to fix this? This is confusing for me to find orders i need to package and confuses customers making them think orders are shipped. Please help!

Link to comment
Share on other sites

Guest nhankla

Quick question I have. My store is getting ready to launch and i'm working out all the kinks.

For some reason as soon as a payment is made on my webpage it goes to "complete and shipped" instead of Processing. Any way to fix this? This is confusing for me to find orders i need to package and confuses customers making them think orders are shipped. Please help!

Im not sure what is going on with that mine goes to processing what type of products are you selling?

is your gateway set up and working?

i can delete the profile that isnt a problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...