Post by soscodes » Sat Apr 27, 2024 5:48 pm

Hi, I tried opencart 4 events but its not calling function of my class. My file name is soscodes_custom.php and I created it under "extension/soscodes/admin/controller/event/soscodes_custom.php"

Code: Select all

namespace Opencart\Admin\Controller\Extension\Soscodes\Event;

class SoscodesCustom extends \Opencart\System\Engine\Controller {

    public function product_data_form_after(string &$route, array &$data, mixed &$output): void {  
echo "here" exit;
}
}

I have inserted event entry directly to event table of database.
Trigger: admin/view/catalog/product_form/after
Action: extension/soscodes/event/soscodes_custom.product_data_form_after

Any suggestion or any step I missed?

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by straightlight » Mon Apr 29, 2024 2:01 am

What does your event status field shows and what does your install.json file also stating?

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 soscodes » Mon Apr 29, 2024 1:45 pm

The event status field was active, and I was able to resolve it. The issue was that I needed to create an ocmod.zip file for my extension and install it using Extension->Installer. After doing this, everything is working fine. Previously, I was attempting to implement my code directly in the extension directory.
I apologize for any confusion; I'm new to OpenCart and transitioning from Magento 2.
However, I haven't been able to locate documentation or specific steps for developing OpenCart 4 extensions or extending/overwriting core functionality.

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by paulfeakins » Mon Apr 29, 2024 8:04 pm

soscodes wrote:
Mon Apr 29, 2024 1:45 pm
However, I haven't been able to locate documentation or specific steps for developing OpenCart 4 extensions or extending/overwriting core functionality.
OC4 isn't really ready for production yet as the current release doesn't have OCMOD which is the correct way to overwrite or change core functionality.

At this point, in my opinion and that of many other experienced developers, you should still use OC3.

There isn't much documentation on how to develop extensions, but you could look at extensions from the good quality developers I list here:
https://www.antropy.co.uk/blog/good-qua ... xtensions/

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


User avatar
Legendary Member
Online

Posts

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

Post by soscodes » Tue Apr 30, 2024 2:44 pm

paulfeakins wrote:
Mon Apr 29, 2024 8:04 pm
soscodes wrote:
Mon Apr 29, 2024 1:45 pm
However, I haven't been able to locate documentation or specific steps for developing OpenCart 4 extensions or extending/overwriting core functionality.
OC4 isn't really ready for production yet as the current release doesn't have OCMOD which is the correct way to overwrite or change core functionality.

At this point, in my opinion and that of many other experienced developers, you should still use OC3.

There isn't much documentation on how to develop extensions, but you could look at extensions from the good quality developers I list here:
https://www.antropy.co.uk/blog/good-qua ... xtensions/
If I do not have any customizations and only use high-quality developer extensions, will OpenCart 4.0.2.3 be good for live use and stable?

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by OSWorX » Tue Apr 30, 2024 4:44 pm

soscodes wrote:
Tue Apr 30, 2024 2:44 pm
If I do not have any customizations and only use high-quality developer extensions, will OpenCart 4.0.2.3 be good for live use and stable?
No, not really.
Wait until the next 4.x release and use 3.0.4.0 (currently 3.0.xx) in the meantime - available here OpenCart 3.0.4.0 (currently 3.0.x.x)

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by soscodes » Tue Apr 30, 2024 9:21 pm

OSWorX wrote:
Tue Apr 30, 2024 4:44 pm
soscodes wrote:
Tue Apr 30, 2024 2:44 pm
If I do not have any customizations and only use high-quality developer extensions, will OpenCart 4.0.2.3 be good for live use and stable?
No, not really.
Wait until the next 4.x release and use 3.0.4.0 (currently 3.0.xx) in the meantime - available here OpenCart 3.0.4.0 (currently 3.0.x.x)
Can you please share an official statement or notice that I can share with Visa Card and other payment gateway teams? They are urging us to use the latest OpenCart 4, but we've heard that it may not be stable, despite being released 2 years ago. ??? ???

Or Is there any information available about the release date for OpenCart 4.x?

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by paulfeakins » Tue Apr 30, 2024 10:00 pm

soscodes wrote:
Tue Apr 30, 2024 9:21 pm
Can you please share an official statement or notice that I can share with Visa Card and other payment gateway teams? They are urging us to use the latest OpenCart 4, but we've heard that it may not be stable, despite being released 2 years ago. ??? ???
There is no official statement, but the top OC devs agree:
viewtopic.php?t=233342

soscodes wrote:
Tue Apr 30, 2024 9:21 pm
Or Is there any information available about the release date for OpenCart 4.x?
You mean 4.0.2.4 and there is no release date other than "soon".

You will notice the most recent release of OC is 3.0.3.9:
https://www.opencart.com/index.php?rout ... ad/history

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


User avatar
Legendary Member
Online

Posts

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

Post by straightlight » Tue Apr 30, 2024 11:10 pm

It was discussed last month on the Github Opencart Discussion groups that an expected release of OC v4.0.2.4 was about to get released by the end of last month. However, this trajectory has changed by the founder in order to add more features into the OC v4.1.0.0 prior to know the next time an official release will be published.

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 soscodes » Wed May 01, 2024 12:50 pm

straightlight wrote:
Tue Apr 30, 2024 11:10 pm
It was discussed last month on the Github Opencart Discussion groups that an expected release of OC v4.0.2.4 was about to get released by the end of last month. However, this trajectory has changed by the founder in order to add more features into the OC v4.1.0.0 prior to know the next time an official release will be published.
So, according to you, will the next release (4.0.2.4 or 4.1.0.0) be stable enough for use in a live environment?
Additionally, could you please list the issues causing instability in the current version? If a store does not have any customizations (and therefore does not require OCMOD), would the current version(4.0.2.3) be stable in that scenario?

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by OSWorX » Wed May 01, 2024 3:08 pm

soscodes wrote:
Wed May 01, 2024 12:50 pm
straightlight wrote:
Tue Apr 30, 2024 11:10 pm
It was discussed last month on the Github Opencart Discussion groups that an expected release of OC v4.0.2.4 was about to get released by the end of last month. However, this trajectory has changed by the founder in order to add more features into the OC v4.1.0.0 prior to know the next time an official release will be published.
So, according to you, will the next release (4.0.2.4 or 4.1.0.0) be stable enough for use in a live environment?
Who knows?
"Calling" a version "stable enough" depends on the used installations after a timeframe of at least a few weeks.
Because a new version is published does not mean at OpenCart that it will be stable enough to use it in a live environment.

soscodes wrote:
Wed May 01, 2024 12:50 pm
Additionally, could you please list the issues causing instability in the current version? If a store does not have any customizations (and therefore does not require OCMOD), would the current version(4.0.2.3) be stable in that scenario?
Simply read by yourself here: https://github.com/opencart/opencart/is ... s%3Aclosed

To come to an end (of this use- and endless) discussion: use the latest 4.0.2.3 release on your own risk.
Trust the developers and users here - or not.

soscodes wrote: Can you please share an official statement or notice that I can share with Visa Card and other payment gateway teams? They are urging us to use the latest OpenCart 4 ..
Because someone tell you to jump out of the window, are you jumping?
Or doing always what others (with no background) are saying?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by soscodes » Wed May 01, 2024 4:17 pm

OSWorX wrote:
Wed May 01, 2024 3:08 pm
Simply read by yourself here: https://github.com/opencart/opencart/is ... s%3Aclosed

To come to an end (of this use- and endless) discussion: use the latest 4.0.2.3 release on your own risk.
Trust the developers and users here - or not.
The list of issues will always exist after 1, 2, 3... years. My query was simple: Can OpenCart 4.0.2.3 be used in a live environment if no customization is needed using OCMOD or extensions? Otherwise, we can develop a custom ecommerce website using PHP frameworks or React.js, or consider Magento 2 as a better alternative.
soscodes wrote:
Wed May 01, 2024 12:50 pm
soscodes wrote: Can you please share an official statement or notice that I can share with Visa Card and other payment gateway teams? They are urging us to use the latest OpenCart 4 ..
Because someone tell you to jump out of the window, are you jumping?
Or doing always what others (with no background) are saying?
No one is forcing us to use OpenCart 4; it's our requirement because we have been using OpenCart 3 for the past 5 years. If OpenCart cannot offer stability several years after the release of version 4, then that's okay. Instead of creating the application from scratch in OpenCart 4, we can explore alternative options like Magento 2, ReactJS with API integration, etc., since we are rebuilding it.

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by paulfeakins » Wed May 01, 2024 6:55 pm

soscodes wrote:
Wed May 01, 2024 4:17 pm
no customization is needed since we are rebuilding it
So what "rebuilding" are you doing if no customisation or extensions? Just importing the data?

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


User avatar
Legendary Member
Online

Posts

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

Post by soscodes » Wed May 01, 2024 7:27 pm

paulfeakins wrote:
Wed May 01, 2024 6:55 pm
soscodes wrote:
Wed May 01, 2024 4:17 pm
no customization is needed since we are rebuilding it
So what "rebuilding" are you doing if no customisation or extensions? Just importing the data?
I only need frontend layout style and color adjustments, which can be accomplished using CSS. No other extensive customizations are required. The payment gateway is PayPal, a native OpenCart feature, with flat shipping rates. The remaining work involves integrating our inventory and shipping platform using their API on the backend. :)

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by straightlight » Wed May 01, 2024 11:35 pm

OSWorX wrote:
Wed May 01, 2024 3:08 pm
soscodes wrote:
Wed May 01, 2024 12:50 pm
straightlight wrote:
Tue Apr 30, 2024 11:10 pm
It was discussed last month on the Github Opencart Discussion groups that an expected release of OC v4.0.2.4 was about to get released by the end of last month. However, this trajectory has changed by the founder in order to add more features into the OC v4.1.0.0 prior to know the next time an official release will be published.
So, according to you, will the next release (4.0.2.4 or 4.1.0.0) be stable enough for use in a live environment?
Who knows?
"Calling" a version "stable enough" depends on the used installations after a timeframe of at least a few weeks.
Because a new version is published does not mean at OpenCart that it will be stable enough to use it in a live environment.

soscodes wrote:
Wed May 01, 2024 12:50 pm
Additionally, could you please list the issues causing instability in the current version? If a store does not have any customizations (and therefore does not require OCMOD), would the current version(4.0.2.3) be stable in that scenario?
Simply read by yourself here: https://github.com/opencart/opencart/is ... s%3Aclosed

To come to an end (of this use- and endless) discussion: use the latest 4.0.2.3 release on your own risk.
Trust the developers and users here - or not.

soscodes wrote: Can you please share an official statement or notice that I can share with Visa Card and other payment gateway teams? They are urging us to use the latest OpenCart 4 ..
Because someone tell you to jump out of the window, are you jumping?
Or doing always what others (with no background) are saying?
Since OC v4.1.0.0 is still under development and taking the lead over OC v4.0.2.4 release, either questions leads to either response not to recommend using either versions for production until the next OC 4 version is ready from the Github Opencart releases or from opencart.com . Even there, it should still be done by questioning its flexibility.

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 straightlight » Wed May 01, 2024 11:38 pm

soscodes wrote:
Wed May 01, 2024 7:27 pm
paulfeakins wrote:
Wed May 01, 2024 6:55 pm
soscodes wrote:
Wed May 01, 2024 4:17 pm
no customization is needed since we are rebuilding it
So what "rebuilding" are you doing if no customisation or extensions? Just importing the data?
I only need frontend layout style and color adjustments, which can be accomplished using CSS. No other extensive customizations are required. The payment gateway is PayPal, a native OpenCart feature, with flat shipping rates. The remaining work involves integrating our inventory and shipping platform using their API on the backend. :)
In this case, as most developers should already be aware, API services should not be used on production websites specifically - until knowing they're ready - which is why most API payment and shipping extensions includes a Debug Mode setting.

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 soscodes » Thu May 02, 2024 4:29 pm

straightlight wrote:
Wed May 01, 2024 11:38 pm
soscodes wrote:
Wed May 01, 2024 7:27 pm
paulfeakins wrote:
Wed May 01, 2024 6:55 pm

So what "rebuilding" are you doing if no customisation or extensions? Just importing the data?
I only need frontend layout style and color adjustments, which can be accomplished using CSS. No other extensive customizations are required. The payment gateway is PayPal, a native OpenCart feature, with flat shipping rates. The remaining work involves integrating our inventory and shipping platform using their API on the backend. :)
In this case, as most developers should already be aware, API services should not be used on production websites specifically - until knowing they're ready - which is why most API payment and shipping extensions includes a Debug Mode setting.
Ok Thank you.
OpenCart is very frustrating for us. We have been waiting for 2 years for OpenCart 4 to stabilize, but it's still not suitable for a simple ecommerce website. Based on this experience, we feel that it's not a good time to invest further in OpenCart. Instead, we are switching to Magento 2, which is more stable, secure, and reliable. Magento consistently releases stable versions and patches.

Newbie

Posts

Joined
Fri Sep 20, 2019 6:50 pm

Post by paulfeakins » Thu May 02, 2024 6:35 pm

soscodes wrote:
Thu May 02, 2024 4:29 pm
OpenCart is very frustrating for us. We have been waiting for 2 years for OpenCart 4 to stabilize, but it's still not suitable for a simple ecommerce website.
And what is the problem with sticking with 3?

soscodes wrote:
Thu May 02, 2024 4:29 pm
#Magento 2, which is more stable, secure, and reliable. Magento consistently releases stable versions and patches.
If that's what you think you're in for a nasty shock :laugh:

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


User avatar
Legendary Member
Online

Posts

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

Post by straightlight » Thu May 02, 2024 9:26 pm

soscodes wrote:
Thu May 02, 2024 4:29 pm
straightlight wrote:
Wed May 01, 2024 11:38 pm
soscodes wrote:
Wed May 01, 2024 7:27 pm


I only need frontend layout style and color adjustments, which can be accomplished using CSS. No other extensive customizations are required. The payment gateway is PayPal, a native OpenCart feature, with flat shipping rates. The remaining work involves integrating our inventory and shipping platform using their API on the backend. :)
In this case, as most developers should already be aware, API services should not be used on production websites specifically - until knowing they're ready - which is why most API payment and shipping extensions includes a Debug Mode setting.
Ok Thank you.
OpenCart is very frustrating for us. We have been waiting for 2 years for OpenCart 4 to stabilize, but it's still not suitable for a simple ecommerce website. Based on this experience, we feel that it's not a good time to invest further in OpenCart. Instead, we are switching to Magento 2, which is more stable, secure, and reliable. Magento consistently releases stable versions and patches.
Happy trails!

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
Who is online

Users browsing this forum: No registered users and 26 guests