Post by shaftoe » Thu Sep 29, 2016 9:35 pm

addOrder (confirm) triggered by continue button payment_method?

Opencart 2.2.0.0 - modified

Hello,

At the moment orders are added to the database after selecting a payment method, agreeing to the terms and conditions and clicking continue.

Not, as i expected, in the next step "Order Confirmation".

Perhaps this is normal and intended behaviour but perhaps I have made a modification somewhere that causes this.

In any case, I would like the addOrder (confirm) action to be triggerd by the actual "confirm order" button in checkout step "order confirmation".

Where and how can I change this?

Thanks in advance,

Jurgen Gardenier

Newbie

Posts

Joined
Fri May 20, 2016 4:38 pm

Post by paulfeakins » Thu Sep 29, 2016 10:28 pm

I believe this is intended behaviour and I'm guessing it's so that the item is taken out of stock at that point.

Perhaps if you tell us why you want to change it, we could suggest another way?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by shaftoe » Thu Sep 29, 2016 10:42 pm

Hello Paul,

The main reason is that if, at that stage, a customer decides to (for example) choose another delivery address (step 2) and then continues to place the order, yet another order is added to the database and the original (first) order also stays in the database. Albeit with the status "processing".

That way I will end up with a lot of 'unfinished' orders. I would like to prevent that.

Jurgen

Newbie

Posts

Joined
Fri May 20, 2016 4:38 pm

Post by shaftoe » Thu Sep 29, 2016 11:01 pm

Added:

Therefore it would be much better if the addOrder would be triggered in the final step (confirm order), after which the customer is redirected to the payment portal. At that point it would be logical that the order is stored in the database.

Same for taking the quantity from stock.

Newbie

Posts

Joined
Fri May 20, 2016 4:38 pm

Post by shaftoe » Thu Sep 29, 2016 11:19 pm

Another addition:

As far as I can see, the final (order confirmation) step does not rely on data from the order table to show the order contents. For that it uses session data and cart data.

Therefore I expect it to be possible to have the "confirm order" button to trigger addOrder.

But how to do that? I cannot find where addOrder is triggered now. :-(

Newbie

Posts

Joined
Fri May 20, 2016 4:38 pm
Who is online

Users browsing this forum: Mike Guenther and 232 guests