Zen Cart Logo
Forums / Features Wish List / suggestion for order process step

suggestion for order process step

Views: 149

Results 1 to 11 of 11
29 Mar 2021, 6:22 AM
#1
sloan avatar

sloan

New Zenner

Join Date:
Jul 2016
Location:
China
Posts:
23
Plugin Contributions:
0

suggestion for order process step

I have used zencart for several years (now on v157), and found that some customers never came back after chechout confirm page (not sure what caused the unsuccessful payment).
The order proces of zencart like this:

  1. Shopping cart
  2. Shipping method
  3. Payment method
  4. Order confirmation
  5. Payment website(PayPal)
  6. Checkout success

If the customer has a problem in step 5, the information about the customer's order cannot be found on the website.
The store owner even did NOT know their clients had tried to make order but go away on payment step, if unpaid clients and orders records on the admin page, the store owener can use this information to contact the clients to slove the problem if possible.
I suggest to generating order information (unpaid) in step 4 and verifying the payment info in step 6.
Also it maybe need add paynow button on some pages like: account, account_history,account_history_info, that will help the clients to found their unpaid order and complete the payment when they back.
In China, most websites generate an order first and then pay to complete the order.

29 Mar 2021, 9:45 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: suggestion for order process step

I would suggest that you make sure you are using 1.5.7C first.

Then, investigate lat9's One Page Checkout at https://www.zen-cart.com/downloads.php?do=file&id=2095

30 Mar 2021, 7:01 AM
#3
sloan avatar

sloan

New Zenner

Join Date:
Jul 2016
Location:
China
Posts:
23
Plugin Contributions:
0

Re: suggestion for order process step

Thank you.
Yes, I am using 1.5.7C.
I just tried One page checkout, but it is not exact what I mean.
My point is the store owner could have the record/information of unsuccessful order on admin page, so we can send email to clients and assist them to complete the order.
I find some people add code to create order on checkout_confirm page like this:

<div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '<br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; 

// bof order record
 
if ($_SESSION['payment'] == 'paypalwpp' and !isset($_SESSION['order_number_created'])) { 

// create the order record
$insert_id = $order->create($order_totals, 2);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE', $insert_id);
$payment_modules->after_order_create($insert_id);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE', $insert_id);
// store the product info to the order
$order->create_add_products($insert_id);
$_SESSION['order_number_created'] = $insert_id;

} 

// eof order record
?></div>

It will create a unpaid order before payment step. but it will duplicate order if the clients complete the payment.

30 Mar 2021, 8:47 AM
#4
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: suggestion for order process step

I think what you are asking for is logging from the payment module.

I implemented this for our credit card payment module, due to so many unrecorded orders/crappy TPV comms.
When the customer clicks on Confirm/leaves for the payment gateway, order info is recorded to a new table in the database.
I have an admin stats screen that shows these payment attempts.
When customer complains about no order info, I can see their payment attempts, check with the TPV admin that it's paid, log into their account, and complete it as a bank transfer to record it.

30 Mar 2021, 1:39 PM
#5
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,954
Plugin Contributions:
8

Re: suggestion for order process step

torvista:

I think what you are asking for is logging from the payment module.

I implemented this for our credit card payment module, due to so many unrecorded orders/crappy TPV comms.
When the customer clicks on Confirm/leaves for the payment gateway, order info is recorded to a new table in the database.
I have an admin stats screen that shows these payment attempts.
When customer complains about no order info, I can see their payment attempts, check with the TPV admin that it's paid, log into their account, and complete it as a bank transfer to record it.

i would suggest to you that your order payment module needs some work. the payments recorded in ZC should exactly reflect what is recorded on the payment gateway.

i suppose building additional infrastructure to handle inconsistencies between those 2 sources is not a bad idea; but if that infrastructure is needed on a frequent basis, i would suggest more trouble shooting or implementing a different payment module.

just MO.

best.

30 Mar 2021, 6:29 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: suggestion for order process step

sloan:

In China, most websites generate an order first and then pay to complete the order.
Ya, Zen Cart inherited its current order flow from osC where orders are only stored if their payment module says it's done, leaving it up to the storeowner to handle any additional payment steps manually.

While it seems simple in concept, there are a lot of architectural issues that need to be addressed to pre-store an unpaid order and then make payments against it.

As discussed in other posts above, for individual stores there are ways to accommodate small parts of it, but one thing leads to the next, etc etc etc.

Nevertheless, it's an idea I've been wanting to tackle for awhile. Mostly just waiting for someone to fund it so I can spend focused time on it.

31 Mar 2021, 4:29 AM
#7
sloan avatar

sloan

New Zenner

Join Date:
Jul 2016
Location:
China
Posts:
23
Plugin Contributions:
0

Re: suggestion for order process step

Here is an idea I found from other website https://www.jb51.net/article/22428.htm
I not sure it fit zencart 1.5.7c, It maybe help for zencart masters.

For now, my solution is:

  1. add records code to create orders on \includes\templates\YOUR_TEMPLATES\templates\tpl_checkout_confirm.php
if ($_SESSION['payment'] == 'paypalwpp' and !isset($_SESSION['order_number_created'])) { 

// create the order record
$insert_id = $order->create($order_totals, 2);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE', $insert_id);
$payment_modules->after_order_create($insert_id);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE', $insert_id);
// store the product info to the order
$order->create_add_products($insert_id);
$_SESSION['order_number_created'] = $insert_id;

} 
  1. add unset $_SESSION['order_number_created'] on \includes\modules\pages\checkout_payment\header_php.php
unset($_SESSION['order_number_created']);
  1. hide the 'Pendding' orders on \tpl_account_default.php and \tpl_account_history_default.php

So it will create order records on the admin page, but the clients will not saw the unpaid (duplicated) order on account page.

31 Mar 2021, 6:01 AM
#8
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: suggestion for order process step

i would suggest to you that your order payment module needs some work. the payments recorded in ZC should exactly reflect what is recorded on the payment gateway.
The gateway needs to communicate the payment to the shop (behind the scenes). Sometimes that comms fails....it's a gateway issue. And yes, it is rubbish.

6 Apr 2021, 1:31 PM
#9
shrimp_gumbo_mmmhhh avatar

shrimp_gumbo_mmmhhh

Totally Zenned

Join Date:
Jun 2007
Location:
Texas, USA
Posts:
1,436
Plugin Contributions:
0

Re: suggestion for order process step

DrByte:

Ya, Zen Cart inherited its current order flow from osC where orders are only stored if their payment module says it's done, leaving it up to the storeowner to handle any additional payment steps manually.

While it seems simple in concept, there are a lot of architectural issues that need to be addressed to pre-store an unpaid order and then make payments against it.

As discussed in other posts above, for individual stores there are ways to accommodate small parts of it, but one thing leads to the next, etc etc etc.

Nevertheless, it's an idea I've been wanting to tackle for awhile. Mostly just waiting for someone to fund it so I can spend focused time on it.

May I ask is this implemented in ZC 2.0? Would this code implemented in 1.5.7x be easily moved to 2.0? How much do you think it would cost to fund this?

6 Apr 2021, 5:09 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: suggestion for order process step

shrimp-gumbo-mmmhhh:

Would this code implemented in 1.5.7x be easily moved to [another version]?
As part of building it I'd definitely explore whether it could be made portable to other versions. Definitely forward to future versions. Much harder for older versions (and plugins) though.

shrimp-gumbo-mmmhhh:

How much do you think it would cost to fund this?
If 5-10 people were to fund $250 USD each I'd be willing to get started on it ASAP.

9 Apr 2021, 6:15 AM
#11
sloan avatar

sloan

New Zenner

Join Date:
Jul 2016
Location:
China
Posts:
23
Plugin Contributions:
0

Re: suggestion for order process step

DrByte:

As part of building it I'd definitely explore whether it could be made portable to other versions. Definitely forward to future versions. Much harder for older versions (and plugins) though.

If 5-10 people were to fund $250 USD each I'd be willing to get started on it ASAP.

I just sponsor $100 USD, Not only for this order project, but also thanks to the zencart team, zencart help my business alot.
Thank ZenCart!