WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: mgeene on October 08, 2015, 02:21:23 PM

Title: is it possible to store data during the order in the database?
Post by: mgeene on October 08, 2015, 02:21:23 PM
is it possible to store data during the order in the database? Sometimes I have the problem that after teh client have paid there is no stored data or a order, the customer will pay, but then you have to wait when the customer contacts me. This happened a few times and this is according to Mollie a problem with Bakery. Has anyone this problem too? And is there a solution?

Thanks for your respons.
Title: Re: is it possible to store data during the order in the database?
Post by: Ruud on October 08, 2015, 03:50:10 PM
Did you try my new version?

http://www.dev4me.nl/modules-snippets/opensource/bakery-betaal-plugin-voor-mollie/

This one finishes the order (and sends the confirmation mails) on the mollie server2server response, not the returning visitor (what not always happens).
Title: Re: is it possible to store data during the order in the database?
Post by: Gast on October 08, 2015, 04:05:36 PM
only a idea, i've read about this, but not test (and also possible, that i misunterstand the problem)

it give's a new Bakery version 1.73 with a implemented mollie-payment-methode - see http://www.bakery-shop.ch/
Title: Re: is it possible to store data during the order in the database?
Post by: CodeALot on February 20, 2017, 06:23:18 PM
I am using the Mollie V2 from Ruud in Bakery, and just had an order paid through Mollie, but the order is NOT in the Bakery database.
wb_mod_bakery_order shows the order number and (luckily) the SKU, but
wb_mod_bakery_customer is empty

Customer did pay, I can find his details in the Mollie-administration but the order is not visible in Bakery in the back-end. Only by going into the PHPMyAdmin I can retrieve some info. (in wb_mod_bakery_order )
 
After that happened, I did a test-buy myself and everything worked OK. So I think the customer ended the transaction too soon, and WB never got word from Mollie that the payment had been finished. What's just weird (in my opinion) is that the customer data is NOT written to the database. The customer has to enter that data BEFORE going to Mollie, so why not save it??
Title: Re: is it possible to store data during the order in the database?
Post by: Ruud on February 20, 2017, 11:30:48 PM
Customer did pay, I can find his details in the Mollie-administration but the order is not visible in Bakery in the back-end.

These kind of problems typically happen when the visitor is taking a long time between the start of ordering and actually paying.

Bakery clears unfinished orders after some timeout (to give back any reserved items). In the current version it is a 1 hour timeout. The fun part is that this clearing is only done when another order is started, so on low-traffic websites this problem is less likely to happen.
The PHP session could still be active - holding the ordered items - and the payment process could still be done by the visitor. The payment notification however cannot be linked to an order anymore.
The result is that no confirmation/shop emails are sent, and nothing about the order can be found in the backend anymore.

If you have access to the webserver logs, and know what time the order went wrong, you might be able to find this caused the problem.
There is no real soution for this. You could change the timeout to a much longer period causing products being reserved for a longer period (if you use the stock functionalty).

In Bakery 1.7.8 it is done in view.php.
Line 191 sets the timeout to 60 * 60 * 1. (the value in seconds)
Setting this to 60 * 60 * 3 will allow the visitor to wait between order and payment for 3 hours.

Title: Re: is it possible to store data during the order in the database?
Post by: CodeALot on February 21, 2017, 02:21:24 PM
Thanks Ruud, I have increased the timeout now. Hope it helps :)