Post by straightlight » Wed May 08, 2019 5:07 am

// Not sure what to do when there is an error with curl, send email? Store in DB and retry? TBD for now.
Either send an email or add to error logs with: $this->log->write .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by head_dunce » Wed May 08, 2019 5:35 am

straightlight wrote:
Wed May 08, 2019 5:07 am
// Not sure what to do when there is an error with curl, send email? Store in DB and retry? TBD for now.
Either send an email or add to error logs with: $this->log->write .
I'd rather have it try again every X minutes for a while before throwing an error. So an error might have to get passed to a Perl script, or stored in a DB with a crontab that picks it up. I dunno yet. Not too worried about it. I still need to make a screen, or modify the current order screen, so you can re-post an order too.

For now, I'm moving onto the next project.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by straightlight » Wed May 08, 2019 5:40 am

head_dunce wrote:
Wed May 08, 2019 5:35 am
straightlight wrote:
Wed May 08, 2019 5:07 am
// Not sure what to do when there is an error with curl, send email? Store in DB and retry? TBD for now.
Either send an email or add to error logs with: $this->log->write .
I'd rather have it try again every X minutes for a while before throwing an error. So an error might have to get passed to a Perl script, or stored in a DB with a crontab that picks it up. I dunno yet. Not too worried about it. I still need to make a screen, or modify the current order screen, so you can re-post an order too.

For now, I'm moving onto the next project.
$this->log->write will not throw any errors. It will rather capture background error operations and store them into your log file which can then be viewable either from FTP in your storage/logs folder or from your OC admin - > systems - > maintenance - > error log page.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by head_dunce » Wed May 08, 2019 9:24 am

Yes, but I need it to throw errors that are captured, and then the post needs to retry many times. Many larger stores use a shopping cart front end that connect to a larger back end, stuff like http://ordermotion.com - (I wrote my own.) Basically, the cart does its thing for the front end, but after the order is placed everything else is done by a completely different system. I was a bit shocked someone hasn't written a real time order post script already, this isn't much more than re-naming variables and posted them to another location.

So I need real time order posting, and if the post fails, I need it to retry on its own. If it still fails after a while, I need it to let me know the fail happened, and then I need a simple way to re-trigger the post for orders X to X when whatever problem happened. Pretty simple to just store the post url in a db to re-try. Also could add something to the order pages on the admin side that allowed a re-post. Anyway, just logging it to a file isn't going to be enough. In a perfect world there would never been an error, but when things happen and have you a few hundred orders that are hung up, there needs to be an easy way to re-trigger all the posts so that you can keep the customers happy and unknowing that anything went wrong.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm
Who is online

Users browsing this forum: No registered users and 276 guests