S
S
Sergey Nalomenko2021-03-15 18:52:31
Command line
Sergey Nalomenko, 2021-03-15 18:52:31

OpenCart CLI scripts - best practices for creating custom scripts?

Good day to all!

I understand that the question may turn out to be tritely simple and trivial, but I had to face an urgent task on OpenCart, which I hadn’t dealt with before, and, most likely, I won’t have in the future.

Task:
Using the crown (or by hand) to run the script for synchronizing the commodity base with some external accounting system.

Actually, the question is:
Physical placement in the directory structure, the basic architecture of such scripts, taking into account the fact that from the inside you need to be able to use the internal classes and opencart components responsible for working with the product catalog (adding/removing/modifying categories, products, etc.). )

Actually, an alternative approach:
If the best practice for solving such problems is WebCron, and not CLI (something pulled by wget, for example),

OpenCart version: 3.0.3.2 is also suitable

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VVCh, 2021-03-16
@VVCh

pulling the wget task you get the user environment with all the limits
Using the cli you are more or less unlimited resources

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question