Failed/Declined checkout solution

I know this has been discussed in many places and I can’t find my original post from a year ago complaining about this issue.



Okay, I finally got sick enough of my customers complaining that I made the changes I think should be done for the orders.detailed page (the page shown after checkout and ANYTIME a customer views a failed or declined order.



I have made this change for all of my customers (auto updates). If there is enough interest, I would consider packaging it up for general distribution as an addon. People would have to be willing to pay $50 for it to be worth my while to spend the time to package it up.



A screenshot of the results is attached (actually forum doesn’t like the size so screenshot is here: [url]http://www.ez-ms.com/private/repay_top.png[/url]). It is all done through hooks and language variables.



Summary:

When a customer places an order that gets a failed (F) or declined (D) status, the following occurs when the checkout is (erroneously) complete.


  1. if the status is F or D then a pop-up is displayed telling them of the problem and giving them advice on how to rectify it. Company contact info (email and phone) is also displayed. For other statuses there is no change to the current layout or design.


  2. The “repay” box is placed at the top of the screen so it is NOT out of view.


  3. The “reorder” and “print invoice” buttons are NOT displayed.



    This behavior will occur ANY TIME a failed or declined order is viewed by the customer. Not just immediately following checkout.



    Technical Description:
  4. Add a hook to views/orders/details.tpl named ‘repay_top’ around the button code in orders/details.tpl.


  5. Add override template hook that looks at the status and if it’s D or F, it includes the repay.tpl template instead of the ‘reorder’ and ‘print invoice’ buttons.


  6. Add override hook code for the ‘repay’ hook at the bottom of the page that looks at the order status. If F or D, it disables the ‘repay’ at the bottom of the screen. Otherwise it calls the repay.tpl file.


  7. Add a “post controller” to addons//controllers/customer/orders.post.php which also checks the status and generates the appropriate fn_set_notification() call. The controller also calls a function that generates the appropriate content for the notification box nicely formatted. It takes about 4 new language variables to do this properly.



    So what happens is this:

    addons//controllers/customer/orders.post.php is invoked after the standard orders controller is run. It checks the status and if F or D calls the function to format the message to be displayed. It then calls fn_set_notofication(). The controller returns and the “view” is called. It first encounters the ‘repay_top’ hook at the top of the page and the associated override file replaces the button code with the repay.tpl template. When it gets to the bottom of the page, the status is looked at again and the repay is only displayed if the status is NOT F or D (and allow repay is set).



    Not too difficult of logic. It also requires a css change to change the height of the notification box from 165 to auto.



    Let me know if anyone is interested in this and that it can be worth my while to package it up in a portable manner.



    tony

You got my vote :stuck_out_tongue:

Tony,



So would this show the errors like if the address provided doesn’t match what is on file with the credit card used?



The other day I had to email a customer telling them that the address provided didn’t match. Luckily they had just recently moved and were able to reorder using the correct information. This was fine and all, but if your addon can do this without me having to email the person than that would be a whole lot better.



Brandon

This sounds like a great idea.



Count me in

If it stops customer calls by showing them exactly what went wrong with the payment, then I am in.

I’m in to review functionality :slight_smile:

Well, this particular version does NOT provide the “reason text”, but there’s certainly no reason why it couldn’t. It’s a good idea.

I’m right there with everyone else than. If this could provide the customer with the reason why their order was declined than I would happily purchase this mod.



Brandon

I had a very similar mod programmed for PayPal a few months ago. It captures the PayPal error code and passes the detailed long message from PayPal to the order page and to the AJAX pop up boxes.



[url]https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_errorcodes[/url]



I can also override these messages on a case by case basis to provide custom text or set a different status for the order. (see attached). So far has worked really well.

pperror.jpg

Okay, I added the failure messages (payment_info area for all fields that start with ‘desc_’. I have also packaged this up into an addon. As of right now, it only works on 2.0.12 unless you want to add the new hook manuall (like 2 lines of code).



I need one good beta tester whom I’m willing to provide this to for free for helping test/validate it. After it’s validated, I’ll make it available on my site.



Who wants to test? Send me a private message. Tell me who you host with, how many orders/day you process and approimately how many order failures/declined you see.

[quote]

I can also override these messages on a case by case basis to provide custom text or set a different status for the order. (see attached). So far has worked really well.

[/quote]



If I’m not mistaken, this is the admin side of the equation. The change being discussed is intended to resolve the issue of re-ordering failed orders, customer not knowing why their transaction failed and also to have it show whenever a failed or declined status exists when the customer is viewing the order details, and, last but not least, the “Pay order” repay is moved to the top of the screen, ahead of the actual invoice.



Goal is to NOT have the admin have to know anything because the customer can resolve it themselves.

[quote]

So would this show the errors like if the address provided doesn’t match what is on file with the credit card used?

[/quote]



This final version shows the “reason_text” that is returned into the ‘payment_info’ section of the order (I believe this message is generated by cs-cart, not the provider). It also displays any non-empty fields in the ‘payment_info’ section that begin with ‘descr_’. I.e. for Anet they are ‘desc_avs’, desc_cvv’ and ‘desc_cavv’. The ‘desc_’ is stripped and the remaineder is converted to upper case and a colon is suffixed. So you get something like:

AVS: Address matches, 5 digit Zip does not

CVV: Matches

Why charge for this? Modules like this benefit the community. I realize it takes work but free addon’s and fixes really move a cart forward. I have released several modules for carts that required a lot of work for the betterment of the community. This fix really should be in the base build of cs-cart…sorry to complain but I hate seeing people get nickled and dimed for things that should already exist. I blame the makers of this cart…

[quote name=‘Ion_Cannon’]Why charge for this? Modules like this benefit the community. I realize it takes work but free addon’s and fixes really move a cart forward. I have released several modules for carts that required a lot of work for the betterment of the community. This fix really should be in the base build of cs-cart…sorry to complain but I hate seeing people get nickled and dimed for things that should already exist. I blame the makers of this cart…[/QUOTE]

Yes, I agree this should be built into the cart. CS-Cart claims they are working on this. In the mean time, I see nothing wrong with developers stepping forward to “fix” things that aren’t quite right. I wish there were more of that going on because I would happily pay $50 to not have to wait months and months to get the functionality I need. I think it’s great when people are willing to donate their time as well, but at the same time, things don’t always get done if people aren’t getting paid for their time.

Tony,



That sounds cool by me. Let us know when it is available. Will it be on your site?



@Ion_Cannon



Yes, it would be nice if every addon or mod was free, but I totally understand Tony’s position on this. I’m sure that he spent a bunch of time on this and wants to recoupe his efforts.



Tony is in the business of coding his cart and for CS-Cart and this is how he makes his money. Unlike us who sell aquarium supplies or decorative glassware.



The $50.00 price tag isn’t to bad in my opinion. Sure it would be a heck of a lot nicer if it were free, but it is sure a lot better than what other people whould charge for this.



Brandon

Yeah I have nothing against charging for it but it’s the principle. Nothing against Tony at all. I have bought several modules for cs-cart already and will continue to do so but when something is released that is basic functionality for most carts it tells me the developers of CS-Cart aren’t doing their jobs. Sub-standard if you ask me…

I totally understand what you are saying. CS-Cart definitely dropped the ball here.

[quote]

Why charge for this?

[/quote]



Because it takes work and effort. Sorry, but my time/experience is not free. No one is requiiring anyone to buy anything.

[quote]

CS-Cart claims they are working on this.

[/quote]



I brought this up in the very first beta a year ago. I expressed concern that it is not only a big usability issue but a major source of cart-abandonment. So after loosing a few customers and/or having clients be unwilling to go forward because of this, I simply decided to implement what my customers wanted.



My wish is that they would quit adding new functionality for a couple of releases and make what they have work effectively and completely. My other hot-button is that products with options are not supported in the product configurator nor in product features. Again, the simple case is handled but the real world isn’t.

[quote]

Will it be on your site?

[/quote]



Yes, after testing is complete, I will post a link here.