But as I try to go forward and build my test site using 3.0.3.8 I need a cron-like feature to run an admin script. How would this be possible in 3.0.3.8?
Now if someone suggests an event I'll kindly ask how the admin event would get kicked off? To add info to that question let me say my store is set up in such a way that I do not need to log into the admin side every day. As I understand it, an admin events would require the admin to be logged into, correct or not?
Thank you,
Mike
cue4cheap not cheap quality
OC 3.1.x is the preprocessor of the current OC 4.x branch.
And has nothing todo with OC 3.x
Cron: either define a cronjob (on your server or by an external service - enough free on the market) which is calling the backend (admin) function (or frontend function) - no need for any event.Cue4cheap wrote: ↑Wed Jan 12, 2022 12:15 pmBut as I try to go forward and build my test site using 3.0.3.8 I need a cron-like feature to run an admin script. How would this be possible in 3.0.3.8?
Now if someone suggests an event I'll kindly ask how the admin event would get kicked off? To add info to that question let me say my store is set up in such a way that I do not need to log into the admin side every day. As I understand it, an admin events would require the admin to be logged into, correct or not?
Or do the same with an event (and further script in the backend) for the frontend (e.g. header) - but that requires that you have visitors ..
We do such similiar at some clients with data from external sources to update the product (stock, etc.).
Mostly via frontend functions (they can do the same as evey backend script).
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Naturally, but I've seen some providers not offering them.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
In that case you can use something like: https://www.easycron.com/
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
For 2.3.0.2 I had to use this: https://github.com/iSenseLabs/oc_cli (Which BTW works very well.)
Does OC 3.0.3.8 not have a need for this same work around?
Mike
cue4cheap not cheap quality
OC v3.0.3.8 does not have this same workaround. The best option would be to use the domain one offered by your host. If you're not sure if your host does provide that feature, contact their support lines and, if they do offer it, get the cron path in order to initiate your crons on your PHP files. The reason why it may not always be provided by your host is based on the hosting plans being offered and purchased.Cue4cheap wrote: ↑Wed Jan 12, 2022 8:51 pmI don't get how it works calling the admin script using my hosts cron. What about admin log in?
For 2.3.0.2 I had to use this: https://github.com/iSenseLabs/oc_cli (Which BTW works very well.)
Does OC 3.0.3.8 not have a need for this same work around?
Mike
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
straightlight wrote: ↑Wed Jan 12, 2022 8:57 pmOC v3.0.3.8 does not have this same workaround. The best option would be to use the domain one offered by your host. If you're not sure if your host does provide that feature, contact their support lines and, if they do offer it, get the cron path in order to initiate your crons on your PHP files. The reason why it may not always be provided by your host is based on the hosting plans being offered and purchased.Cue4cheap wrote: ↑Wed Jan 12, 2022 8:51 pmI don't get how it works calling the admin script using my hosts cron. What about admin log in?
For 2.3.0.2 I had to use this: https://github.com/iSenseLabs/oc_cli (Which BTW works very well.)
Does OC 3.0.3.8 not have a need for this same work around?
Mike
My host offers cron and I use it now. My question is the admin authentication to run an admin side script. Admin scripts need to have you log into admin to run, right?
Mike
cue4cheap not cheap quality
How do you call an admin side script via webhost cron when admin scripts require username / login?OSWorX wrote: ↑Wed Jan 12, 2022 12:50 pmCron: either define a cronjob (on your server or by an external service - enough free on the market) which is calling the backend (admin) function (or frontend function) - no need for any event.
Or do the same with an event (and further script in the backend) for the frontend (e.g. header) - but that requires that you have visitors ..
We do such similiar at some clients with data from external sources to update the product (stock, etc.).
Mostly via frontend functions (they can do the same as evey backend script).
Do you have this working? If so what is the mechanism you use to bypass the username/login requirement?
Thank you,
Mike
cue4cheap not cheap quality
I'll give this one a shot when I duplicate the 3.0.3.8 I'm building. I don't wish to 'muddy' my new (clean) build.xxvirusxx wrote: ↑Wed Jan 12, 2022 9:34 pmTest
https://www.opencart.com/index.php?rout ... n_id=36239
Thank you,
Mike
cue4cheap not cheap quality
By building an API: viewtopic.php?f=202&t=220903#p805005 .Cue4cheap wrote: ↑Thu Jan 13, 2022 7:35 amHow do you call an admin side script via webhost cron when admin scripts require username / login?OSWorX wrote: ↑Wed Jan 12, 2022 12:50 pmCron: either define a cronjob (on your server or by an external service - enough free on the market) which is calling the backend (admin) function (or frontend function) - no need for any event.
Or do the same with an event (and further script in the backend) for the frontend (e.g. header) - but that requires that you have visitors ..
We do such similiar at some clients with data from external sources to update the product (stock, etc.).
Mostly via frontend functions (they can do the same as evey backend script).
Do you have this working? If so what is the mechanism you use to bypass the username/login requirement?
Thank you,
Mike
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Funny, I just realized I tried that extension on my current 2.3.0.2 store and it didn't work for me so I used the https://github.com/iSenseLabs/oc_cli one.xxvirusxx wrote: ↑Wed Jan 12, 2022 9:34 pmTest
https://www.opencart.com/index.php?rout ... n_id=36239
I'll give it a shout on 3.0.3.8 once duplicated.
Mike
cue4cheap not cheap quality
With the code changes of 3.x we do such always via frontend scripts.
As written, they can have functionalities like backend scripts (only a few php code lines).
Therefore no complicated calls for API, access, user, etc. is needed.
Only a security phrase/key - which is defined in the backend - has to be submitted together.
Each package consists of 2 parts:
1. backend
2. frontend
All in all 5 (small) scripts:
1-3: backend > controller, language, view
4 & 5: frontend > controller, model
Easy to update, easy to maintain.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Could you elaborate a little?OSWorX wrote: ↑Thu Jan 13, 2022 6:01 pmWith the code changes of 3.x we do such always via frontend scripts.
As written, they can have functionalities like backend scripts (only a few php code lines).
Therefore no complicated calls for API, access, user, etc. is needed.
Only a security phrase/key - which is defined in the backend - has to be submitted together.
Each package consists of 2 parts:
1. backend
2. frontend
All in all 5 (small) scripts:
1-3: backend > controller, language, view
4 & 5: frontend > controller, model
Easy to update, easy to maintain.
I have one main script that does inventory download and updates the levels. I am pretty leery of allowing it on the catalog side.
Thank you,
Mike
cue4cheap not cheap quality
Why leery?
You call the frontend script with the key you define in the backend - without, no further operations are done (the script stops).
That way, nobody can do nothing if that key is not send (included in the cronjob call).
Basically the same way as you would call any backend script (until OC 3.x) or calling any existing (or not existing) API in 3.x which needs the definded and existing API user credentials, session etc.
Only simplier - but safe the same way.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Two reasons... one I don't know the method you reference to pass/verify the key and two I don't like anything dealing with database updates open to the general public.OSWorX wrote: ↑Fri Jan 14, 2022 3:58 pmWhy leery?
You call the frontend script with the key you define in the backend - without, no further operations are done (the script stops).
That way, nobody can do nothing if that key is not send (included in the cronjob call).
Basically the same way as you would call any backend script (until OC 3.x) or calling any existing (or not existing) API in 3.x which needs the definded and existing API user credentials, session etc.
Only simplier - but safe the same way.
I'll see if I can find an example of passing/verifying a key.
Mike
cue4cheap not cheap quality
The post I referred on my previous reply demonstrates how to obtain an API key from Opencart dynamically.Cue4cheap wrote: ↑Sat Jan 15, 2022 10:44 amTwo reasons... one I don't know the method you reference to pass/verify the key and two I don't like anything dealing with database updates open to the general public.OSWorX wrote: ↑Fri Jan 14, 2022 3:58 pmWhy leery?
You call the frontend script with the key you define in the backend - without, no further operations are done (the script stops).
That way, nobody can do nothing if that key is not send (included in the cronjob call).
Basically the same way as you would call any backend script (until OC 3.x) or calling any existing (or not existing) API in 3.x which needs the definded and existing API user credentials, session etc.
Only simplier - but safe the same way.
I'll see if I can find an example of passing/verifying a key.
Mike
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: Bing [Bot], OSWorX, paulfeakins and 413 guests